XFGETS(CS533) Misc. Reference Manual Pages XFGETS(CS533) NAME xfgets - read in a one line at a time SYNOPSIS int xfgets(fd, buf, sz) int fd, sz; char *buf; DESCRIPTION The xfgets function reads in one line at a time. A line is defined as any number of characters terminated with a new- line character. fd is the file descriptor to read from. buf is the pointer to a buffer allocated by the caller of size sz. If sz -1 bytes have been read and a newline has not been seen so far, xfgets returns the number of bytes read. If a newline is read before the above condition occurs, then the newline is replaced by a null and the number of characters read (including the newline) is returned. If there is an error it returns an error code of -1. SEE ALSO read(2) AUTHOR Charles D. Cranor SunOS 5.4 Last change: 27 Oct 1990 1