- sb
- Where to store the next line of text from stream.
- size
- The maximum number of characters that sb can hold.
- stream
- The FILE stream to read a line from.
Upon successful completion, returns sb. If end-of-file occurs before any characters are read, returns null and the contents of sb remains unchanged. If an error occurs, null is returned and the contents of sb are indeterminate. fgets does not distinguish between end-of-file and error, and callers must use Stdlib.feof(3) and Stdlib.ferror(3) to determine which occurred.
Usage
The following errors are specified:
Error Details Errno.EBADF The given stream is not a readable stream. fgetpos may also fail for any of the error specified for the routines Stdlib.fflush(3), Syscall.fstat(2), Syscall.read(2), or Stdlib.malloc(3).