parser_f.h
512dcd98
 /* 
  * $Id$
  */
 
 #ifndef parser_f_h
 #define parser_f_h
 
 char* eat_line(char* buffer, unsigned int len);
726efa25
 int is_empty(char* buffer, unsigned int len);
 
 #ifdef MACROEATER
 
 /* turn the most frequently called functions into macros */
 
 
 #define eat_space(buffer,len)                                          \
   ( {   char *p;                                                     	\
         for(p=(buffer);(p<(buffer)+(len))&& (*p==' ' || *p=='\t') ;p++);\
         p;                                                              \
   } )
 
 #define eat_token(buffer,len)						\
   ( { char *p;								\
       for (p=(buffer);(p<(buffer)+(len))&&				\
                         (*p!=' ')&&(*p!='\t')&&(*p!='\n')&&(*p!='\r');	\
                 p++);							\
       p;								\
   } )
 
 #define eat_token2(buffer,len,delim)					\
   ( { char *p;								\
       for (p=(buffer);(p<(buffer)+(len))&&				\
                         (*p!=(delim))&&(*p!='\n')&&(*p!='\r');		\
                 p++);							\
       p;								\
   } )
 
 
 #else
 
 
512dcd98
 char* eat_space(char* buffer, unsigned int len);
 char* eat_token(char* buffer, unsigned int len);
 char* eat_token2(char* buffer, unsigned int len, char delim);
726efa25
 
 /* EoMACROEATER */
 #endif
512dcd98
 
 #endif