Hi Andrew,
I received a pdf file from Hartmut Brandt that he received from you and
a quick check shows that there is a function getline().
I have problems calling a function with this functionality getline().
I would have no problems with e.g. getdline() (get delimited line).
Background:
A function getline() did exists since in a commercial UNIX alike system since
1981.
SYNOPSIS
ssize_t getline(buffer, length)
char *buffer;
size_t length;
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.
RETURNS
Returns either the number of bytes in the buffer or a stan-
dard system error code (including EOF).
A similar function fgetline()
SYNOPSIS
ssize_t fgetline(f, buf, length)
FILE *f;
char *buf;
size_t length;
DESCRIPTION
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.
does also exists.
As I am using functions with the above names and the above functionality
in my portability library which has been publically published in 1993, I would
prefer a name that does not give a collision and that better describes the
functionality if the interface from the proposal.
/*--------------------------------------------------------------------------*/
Jörg
--
EMail:yyyyy@xxxxxxxxxxxxxxxxxxxxxxxxxxx (home) Jörg Schilling D-13353 Berlin
yy@xxxxxxxxxxxxxxx (uni)
yyyyyyyyy@xxxxxxxxxxxxxxxxxxx (work) Blog:
http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
|