NAME

inbuf_sareadline -- read line from an input buffer into a stralloc object


SYNOPSIS

   #include <afblib/inbuf_sareadline.h>
   int inbuf_sareadline(inbuf* ibuf, stralloc* sa);


DESCRIPTION

inbuf_sareadline reads a sequence of characters from the given input buffer until a line terminator (LF) or end of file is encountered. In case of success, 1 is returned, and sa is filled with the input line (but no newline and also no null-byte).

In case of errors, 0 is returned. If a read error is encountered while some input was already gathered, the so far processed input is to be found in sa.


AUTHOR

Andreas F. Borchert