parser/parser_f.c
512dcd98
 /*
  * $Id$
  *
  * parser helper  functions
  *
  */
 
 #include  "parser_f.h"
3881f12c
 #include "../ut.h"
512dcd98
 
038e5c9e
 /* returns pointer to next line or after the end of buffer */
512dcd98
 char* eat_line(char* buffer, unsigned int len)
 {
 	char* nl;
 	char c;
 
726efa25
 	/* jku .. replace for search with a library function; not conformant
  		  as I do not care about CR
 	*/
019d863a
 	nl=(char *)q_memchr( buffer, '\n', len );
726efa25
 	if ( nl ) { 
 		c=* nl;
 		if ( nl + 1 < buffer+len)  nl++;
 		if (( nl+1<buffer+len) && * nl=='\r')  nl++;
 	} else  nl=buffer+len;
512dcd98
 	return nl;
 }