returns pointer to next line or after the end of buffer */
| 26 | |
| 27 | /* returns pointer to next line or after the end of buffer */ |
| 28 | char* eat_line(char* buffer, unsigned int len) |
| 29 | { |
| 30 | char* nl; |
| 31 | |
| 32 | /* jku .. replace for search with a library function; not conforming |
| 33 | as I do not care about CR |
| 34 | */ |
| 35 | nl=(char *)q_memchr( buffer, '\n', len ); |
| 36 | if ( nl ) { |
| 37 | if ( nl + 1 < buffer+len) nl++; |
| 38 | if (( nl+1<buffer+len) && * nl=='\r') nl++; |
| 39 | } else nl=buffer+len; |
| 40 | return nl; |
| 41 | } |
| 42 |
no test coverage detected