1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

Comments.

This commit is contained in:
Bruno Haible
2003-01-20 14:16:08 +00:00
parent 6bc6a5c4e0
commit 0a3597e6c2
2 changed files with 15 additions and 5 deletions

View File

@@ -29,11 +29,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Always add at least this many bytes when extending the buffer. */ /* Always add at least this many bytes when extending the buffer. */
#define MIN_CHUNK 64 #define MIN_CHUNK 64
/* Read up to (and including) a TERMINATOR from STREAM into *LINEPTR /* Reads up to (and including) a TERMINATOR from STREAM into *LINEPTR + OFFSET
+ OFFSET (and null-terminate it). *LINEPTR is a pointer returned from (and null-terminate it). *LINEPTR is a pointer returned from new [] (or
malloc (or NULL), pointing to *N characters of space. It is realloc'd NULL), pointing to *N characters of space. It is realloc'd as
as necessary. Return the number of characters read (not including the necessary. Returns the number of characters read (not including the
null terminator), or -1 on error or EOF. null terminator), or -1 on error or immediate EOF.
NOTE: There is another getstr() function declared in <curses.h>. */ NOTE: There is another getstr() function declared in <curses.h>. */
static int static int

View File

@@ -23,8 +23,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Like the glibc functions get_line and get_delim, except that the result /* Like the glibc functions get_line and get_delim, except that the result
must be freed using delete[], not free(). */ must be freed using delete[], not free(). */
/* Reads up to (and including) a newline from STREAM into *LINEPTR
(and null-terminate it). *LINEPTR is a pointer returned from new [] (or
NULL), pointing to *N characters of space. It is realloc'd as
necessary. Returns the number of characters read (not including the
null terminator), or -1 on error or immediate EOF. */
extern int get_line (char **lineptr, size_t *n, FILE *stream); extern int get_line (char **lineptr, size_t *n, FILE *stream);
/* Reads up to (and including) a DELIMITER from STREAM into *LINEPTR
(and null-terminate it). *LINEPTR is a pointer returned from new [] (or
NULL), pointing to *N characters of space. It is realloc'd as
necessary. Returns the number of characters read (not including the
null terminator), or -1 on error or immediate EOF. */
extern int get_delim (char **lineptr, size_t *n, int delimiter, FILE *stream); extern int get_delim (char **lineptr, size_t *n, int delimiter, FILE *stream);
#endif /* not GETLINE_H_ */ #endif /* not GETLINE_H_ */