FreeBSD manual

download PDF document: js_getline.3.pdf

JS_GETLINE(3) Schily's LIBRARY FUNCTIONS JS_GETLINE(3)
NAME js_getline() - reads a line from standard input
SYNOPSIS #include <schily/schily.h>
int js_getline(buffer,length) char *buffer; int length;
DESCRIPTION js_getline() reads up to length characters from the standard input using getc() (q.v.). The transfer is also terminated by a newline, end of file, or read error. The buffer is NULL ('\0') terminated with the new line removed.
RETURNS Returns either the number of bytes in the buffer or a standard system error code (including EOF).
NOTES getline() always reads to the end of the input line, even if the line is longer than the buffer. Unless NO_SCHILY_GETLINE is defined, including the header <schily/schily.h> causes getline() to be defined to be an alias to js_getline().
Joerg Schilling 2022/09/09 JS_GETLINE(3)