changeset 9239:efc89a591244

Tweak doc of getdelim and getline declarations.
author Bruno Haible <bruno@clisp.org>
date Sun, 30 Sep 2007 05:53:48 +0200
parents 6d715fbc981c
children b0dfb2406d1a
files ChangeLog lib/stdio_.h
diffstat 2 files changed, 19 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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  <bruno@clisp.org>
+
+	* lib/stdio_.h (getdelim, getline): Add identifiers. Doc tweak.
+
 2007-09-29  Bruno Haible  <bruno@clisp.org>
 
 	* lib/xreadlink.c (xreadlink): Simplify to a wrapper around areadlink.
--- 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