inbuf_sareadline -- read line from an input buffer into a stralloc object
#include <afblib/inbuf_sareadline.h>
int inbuf_sareadline(inbuf* ibuf, stralloc* sa);
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.
Andreas F. Borchert