BUFGETS(3)

NAME
bufgets - get a line from a buffer

SYNOPSIS
#include <pgplib.h>
int
bufgets(u_char *line, int linelen, u_char *buf, int buflen);

DESCRIPTION
Copy at most linelen - 1 bytes from buffer into line, stopping after the first newline has been found or buflen bytes have been copied. In any case, a NULL is appended to the string.

RETURN VALUES
If some parameter is unreasonable, 0 is returned, if not, the number of bytes consumed from buf is returned. If a one-byte line is passed in, 0 will obviously be returned.

SEE ALSO
fgets(3)

HISTORY
Written by Tage Stabell-Kulų. First appeared in PGPlib 0.1.