diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-05-16 19:03:42 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-05-16 19:03:42 +0000 |
commit | d175970f402a07706f7cf82b032be5037b2cebb5 (patch) | |
tree | 8d2b9ea7c042ab94770d0f07d66d99cb6d75ca09 /lib/getnline.h | |
parent | d6de223fa900d3d2ba3c44f3b0312bdce06653eb (diff) | |
download | gnulib-d175970f402a07706f7cf82b032be5037b2cebb5.tar.gz |
getline cleanup. This changes the getndelim2 API: both order of arguments,
and meaning of delim2 (now uses EOF, not 0, to indicate no delimiter).
Diffstat (limited to 'lib/getnline.h')
-rw-r--r-- | lib/getnline.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/getnline.h b/lib/getnline.h index e455300ab9..fae1367caf 100644 --- a/lib/getnline.h +++ b/lib/getnline.h @@ -1,6 +1,6 @@ /* getnline - Read a line from a stream, with bounded memory allocation. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,12 +19,11 @@ #ifndef GETNLINE_H #define GETNLINE_H 1 -#include <stddef.h> #include <stdio.h> - -/* Get ssize_t. */ #include <sys/types.h> +#define GETNLINE_NO_LIMIT ((size_t) -1) + /* Read a line, up to the next newline, from STREAM, and store it in *LINEPTR. *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE bytes of space. It is realloc'd as necessary. Reallocation is limited to |