# HG changeset patch # User Bruno Haible # Date 1191124428 -7200 # Node ID efc89a5912448b97ed082c94e6d710705273f867 # Parent 6d715fbc981c4c2ebd5d86bfa505e0a191c02ae3 Tweak doc of getdelim and getline declarations. diff -r 6d715fbc981c -r efc89a591244 ChangeLog --- a/ChangeLog Sun Sep 30 04:17:42 2007 +0200 +++ b/ChangeLog Sun Sep 30 05:53:48 2007 +0200 @@ -1,3 +1,7 @@ +2007-09-29 Bruno Haible + + * lib/stdio_.h (getdelim, getline): Add identifiers. Doc tweak. + 2007-09-29 Bruno Haible * lib/xreadlink.c (xreadlink): Simplify to a wrapper around areadlink. diff -r 6d715fbc981c -r efc89a591244 lib/stdio_.h --- a/lib/stdio_.h Sun Sep 30 04:17:42 2007 +0200 +++ b/lib/stdio_.h Sun Sep 30 05:53:48 2007 +0200 @@ -308,12 +308,14 @@ #if @GNULIB_GETDELIM@ # if !@HAVE_DECL_GETDELIM@ - /* Read up to (and including) a DELIMITER from FP into *LINEPTR (and - NUL-terminate it). *LINEPTR is a pointer returned from malloc (or - NULL), pointing to *N characters of space. It is realloc'ed as - necessary. Returns the number of characters read (not including - the null terminator), or -1 on error or EOF. */ - extern ssize_t getdelim (char **, size_t *, int delim, FILE *); +/* Read input, up to (and including) the next occurrence of DELIMITER, from + STREAM, store it in *LINEPTR (and NUL-terminate it). + *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE + bytes of space. It is realloc'd as necessary. + Return the number of bytes read and stored at *LINEPTR (not including the + NUL terminator), or -1 on error or EOF. */ +extern ssize_t getdelim (char **lineptr, size_t *linesize, int delimiter, + FILE *stream); # endif #elif defined GNULIB_POSIXCHECK # undef getdelim @@ -329,12 +331,13 @@ # define getline rpl_getline # endif # if !@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@ - /* Read up to (and including) a newline from FP into *LINEPTR (and - NUL-terminate it). *LINEPTR is a pointer returned from malloc (or - NULL), pointing to *N characters of space. It is realloc'ed as - necessary. Returns the number of characters read (not including - the null terminator), or -1 on error or EOF. */ - extern ssize_t getline (char **, size_t *, FILE *); +/* Read a line, up to (and including) the next newline, from STREAM, store it + in *LINEPTR (and NUL-terminate it). + *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE + bytes of space. It is realloc'd as necessary. + Return the number of bytes read and stored at *LINEPTR (not including the + NUL terminator), or -1 on error or EOF. */ +extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream); # endif #elif defined GNULIB_POSIXCHECK # undef getline