table of contents
JS_FGETLINE(3) | Schily´s LIBRARY FUNCTIONS | JS_FGETLINE(3) |
NAME¶
js_fgetline() - gets a line from a file
SYNOPSIS¶
#include <schily/schily.h> int js_fgetline(f,buf,length) FILE *f; char *buf; int length;
DESCRIPTION¶
js_fgetline() reads up to length characters from the input file using getc() (q.v.). The transfer is also terminated by a newline, end of file, or read error. The newline character is stripped and the string is NULL ('\0') terminated.
RETURNS¶
- >=0
- the number of bytes read.
- < 0
- if an error occurred.
NOTES¶
Unless NO_SCHILY_GETLINE is defined, including the header <schily/schily.h> causes fgetline() to be defined to be an alias to js_fgetline().
2023/04/19 | Joerg Schilling |