32 for (ntoks=0, i=0; i<slen;) {
34 while (i<slen && strchr(delim, str[i]))
43 while (i<slen && !strchr(delim, str[i]))
48 tokens->
ntoks = ntoks;
49 tokens->
list = (
char **)
gk_malloc(ntoks*
sizeof(
char *),
"strtokenize: tokens->list");
53 for (ntoks=0, i=0; i<slen;) {
55 while (i<slen && strchr(delim, str[i]))
61 tokens->
list[ntoks++] = str+
i;
64 while (i<slen && !strchr(delim, str[i]))
char * gk_strdup(char *orgstr)
Duplicates a string.
void * gk_malloc(size_t nbytes, char *msg)
void gk_free(void **ptr1,...)
void gk_strtokenize(char *str, char *delim, gk_Tokens_t *tokens)
void gk_freetokenslist(gk_Tokens_t *tokens)