18 #include <grass/gis.h>
40 while (!
G_index(delim, *buf) && (*buf ==
' ' || *buf ==
'\t'))
45 tokens = (
char **)G_malloc(
sizeof(
char *));
48 while (!
G_index(delim, *p) && (*p ==
' ' || *p ==
'\t'))
53 tokens = (
char **)G_realloc((
char *)tokens, (i + 1) *
sizeof(
char *));
80 for (n = 0; tokens[
n] !=
NULL; n++) {
100 if (tokens[0] !=
NULL)
void G_free(void *buf)
Free allocated memory.
char * G_store(const char *s)
Copy string to allocated memory.
int G_free_tokens(char **tokens)
Free memory allocated to tokens.
char * G_index(const char *str, int delim)
delimiter
char ** G_tokenize(const char *buf, const char *delim)
Tokenize string.
int G_number_of_tokens(char **tokens)
Return number of tokens.
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]