File: adt_sp.c

package info (click to toggle)
bglibs 2.04%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,468 kB
  • sloc: ansic: 15,821; perl: 674; sh: 63; makefile: 29
file content (24 lines) | stat: -rw-r--r-- 395 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdlib.h>
#include <string.h>

#include "adt_common.h"

int adt_cmpsp(const char* const* a, const char* const* b)
{
  return strcmp(*a, *b);
}

int adt_copysp(const char** a, const char* const* b)
{
  return (*a = strdup(*b)) != 0;
}

adt_hash_t adt_hashsp(const char* const* p)
{
  return adt_hashs((const unsigned char*)*p);
}

void adt_freesp(const char** a)
{
  free((char*)*a);
}