NAME
get_token - Gets the next non-whitespace chunk
SYNOPSIS
#include "l/l_parse.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
size_t get_token
(
char **input_line_ptr,
char *output_string,
size_t max_len
);
DESCRIPTION
This routine parses the string pointed to by "input_line_ptr" by skipping
over white space (blanks, tabs), and then copying characters into the buffer
output_string up to the next terminating blank or tab. A maximun of
max_len-ONE characters are copied. If this limit is reached, then the
routine behaves as if a blank was found. The buffer output_string will
always be NULL terminated. The routine returns the number of characters
copied into output_string. If there is nothing other than white space in the
string beyond the parse location, then NO_MORE_TOKENS (#defined as 0) is
returned. The string location pointer is set beyond the token just parsed.
RETURNS
The number of characters copied to the buffer excluding the NULL. This
means that if there are no characters left, then NO_MORE_TOKENS is
returned which is #defined as 0.
MACROS
BUFF_GET_TOKEN, BUFF_GET_TOKEN_OK
NOTE
Expressing the fact that the first argument to this routine should be (const
char**) leads to no end of trouble. Hence there are two versions of this
routine. This one should be used when the agument that you want to send is
in fact (char**). This is preferable to casting which causes trouble with
some C++ compilers.
NOTE
The documentation for BUFF_GET_TOKEN has a short example of which
illustrates the general use of this grouup of parsing routines.
RELATED
BUFF_GET_TOKEN(), BUFF_CONST_GET_TOKEN(), const_get_token()
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Kobus Barnard
SEE ALSO
next_token
,
const_next_token
,
const_get_token
,
match_quote_get_token
,
const_match_quote_get_token
,
match_get_token
,
const_match_get_token
,
gen_get_token
,
const_gen_get_token
,
gen_char_get_token
,
gen_match_quote_get_token
,
const_gen_match_quote_get_token
,
gen_match_get_token
,
const_gen_match_get_token
,
alpha_get_token
,
gen_get_last_token
,
gen_get_last_token_2
,
gen_split_at_last_token
,
gen_split_at_last_token_2
,
parse_on_string
,
parse_positive_integer_list
,
parse_options
,
free_options
,
ic_parse_key_words
,
get_boolean_value
,
is_no_value_word
,
parse_path
,
get_base_name
,
get_base_path