10
/* TBB: gd_strtok_r is not portable; provide an implementation */
12
#define SEP_TEST (separators[*((unsigned char *) s)])
15
gd_strtok_r (char *s, char *sep, char **state)
19
memset (separators, 0, sizeof (separators));
21
separators[*((unsigned char *) sep)] = 1;
25
/* Pick up where we left off */
33
/* 2. Leading separators, if any */
38
/* 2a. EOS after separators only */
47
/* 3a. Token at end of string */
54
/* 4. Terminate token and skip trailing separators */
64
void * gdCalloc (size_t nmemb, size_t size)
66
return calloc (nmemb, size);
70
gdMalloc (size_t size)
76
gdRealloc (void *ptr, size_t size)
78
return realloc (ptr, size);
82
gdReallocEx (void *ptr, size_t size)
84
void *newPtr = gdRealloc (ptr, size);
90
BGD_DECLARE(void) gdFree (void *ptr)