bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getline.h


From: Bruno Haible
Subject: Re: getline.h
Date: Sun, 30 Sep 2007 05:53:10 +0200
User-agent: KMail/1.5.4

Eric Blake wrote on 2007-08-22:
>       * lib/stdio_.h (getdelim, getline): Declare.

Small improvement of the doc: Say that getline reads a line. "Return" not
"Returns" (GNU style conventions). List the identifiers in the prototype.


2007-09-29  Bruno Haible  <address@hidden>

        * lib/stdio_.h (getdelim, getline): Add identifiers. Doc tweak.

*** lib/stdio_.h.orig   2007-09-30 05:44:01.000000000 +0200
--- lib/stdio_.h        2007-09-30 03:19:28.000000000 +0200
***************
*** 308,319 ****
  
  #if @GNULIB_GETDELIM@
  # if address@hidden@
!   /* 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 *);
  # endif
  #elif defined GNULIB_POSIXCHECK
  # undef getdelim
--- 308,321 ----
  
  #if @GNULIB_GETDELIM@
  # if address@hidden@
! /* 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,340 ****
  #  define getline rpl_getline
  # endif
  # if address@hidden@ || @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 *);
  # endif
  #elif defined GNULIB_POSIXCHECK
  # undef getline
--- 331,343 ----
  #  define getline rpl_getline
  # endif
  # if address@hidden@ || @REPLACE_GETLINE@
! /* 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]