GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gis/token.c File Reference
#include <stdlib.h>
#include <grass/gis.h>
Include dependency graph for gis/token.c:

Go to the source code of this file.


char ** G_tokenize (const char *buf, const char *delim)
 Tokenize string. More...
int G_number_of_tokens (char **tokens)
 Return number of tokens. More...
int G_free_tokens (char **tokens)
 Free memory allocated to tokens. More...

Function Documentation

int G_free_tokens ( char **  tokens)

Free memory allocated to tokens.

Note: G_free_tokens() must be called when finished with tokens to release memory.

always returns 0

Definition at line 98 of file gis/token.c.

References G_free(), and NULL.

Referenced by G_get_window(), G_parser(), and Vect_read_dblinks().

int G_number_of_tokens ( char **  tokens)

Return number of tokens.

Note: Function is incomplete.

number of tokens

Definition at line 76 of file gis/token.c.

References n, and NULL.

Referenced by Vect_read_dblinks().

char** G_tokenize ( const char *  buf,
const char *  delim 

Tokenize string.

Given a string, buf, turn delimiter, delim, into '\0' (NULL) and place pointers to tokens in tokens. buf must not contain a new line (

[in]bufinput string
[in]delimstring delimiter
Pointer to string token

Definition at line 33 of file gis/token.c.

References G_index(), G_store(), and NULL.

Referenced by G_get_window(), G_parser(), and Vect_read_dblinks().