/* * +-------------------+ Christian Schlittchen * | | Enno Rehling * | Eressea PBEM host | Katja Zedel * | (c) 1998 - 2007 | * | | This program may not be used, modified or distributed * +-------------------+ without prior permission by the authors of Eressea. * */ #ifndef UTIL_PARSER_H #define UTIL_PARSER_H #include #ifdef __cplusplus extern "C" { #endif void init_tokens_str(const char *initstr); /* initialize token parsing */ void skip_token(void); const char *parse_token_depr(const char **str); char *parse_token(const char **str, char *buffer, size_t bufsize); void parser_pushstate(void); void parser_popstate(void); bool parser_end(void); const char *getstrtoken(void); const char *gettoken(char *lbuf, size_t bufsize); unsigned int getuint(void); int getint(void); int getid(void); unsigned int atoip(const char *s); #define getshipid() getid() #define getfactionid() getid() #ifdef __cplusplus } #endif #endif