. \" Manual Seite fuer getline . \" @(#)getline.3 1.1 . \" .if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a .if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o .if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u .if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A .if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O .if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U .if t .ds s \(*b .if t .ds S SS .if n .ds a ae .if n .ds o oe .if n .ds u ue .if n .ds s sz .TH GETLINE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" .SH NAME getline() \- reads a line from standard input .SH SYNOPSIS .nf .B int getline(buffer,length) .B char *buffer; .B int length; .fi .SH DESCRIPTION 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. .SH RETURNS Returns either the number of bytes in the buffer or a standard system error code (including EOF). .SH NOTES getline() always reads to the end of the input line, even if the line is longer than the buffer.