summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-10-26 07:12:49 +0000
committerEric Andersen <andersen@codepoet.org>2000-10-26 07:12:49 +0000
commitcf4328b16efe844461420da58f4f0b0f75964418 (patch)
tree16b0bacc58eebb283c2da0385ed28b10580d0c86 /include
parent539adfd7c7cbc7d6d3bea94eb1aa2a7103ca71c0 (diff)
Add some more stuff -- {get|set}mntent, getline, getdelim, etc.
Diffstat (limited to 'include')
-rw-r--r--include/stdio.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/stdio.h b/include/stdio.h
index 654cb8e55..51a175acc 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -210,8 +210,16 @@ extern int vfscanf __P ((FILE *__restrict __s,
/* Print a message describing the meaning of the value of errno. */
extern void perror __P ((__const char *__s));
+/* Read up to (and including) a DELIMITER from STREAM into *LINEPTR
+ (and null-terminate it). *LINEPTR is a pointer returned from malloc (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 EOF. */
+extern size_t getdelim __P ((char **__restrict __lineptr,
+ size_t *__restrict __n, int __delimiter,
+ FILE *__restrict __stream));
/* Like `getdelim', but reads up to a newline. */
-extern int getline __P ((char **__restrict __lineptr,
+extern size_t getline __P ((char **__restrict __lineptr,
size_t *__restrict __n,
FILE *__restrict __stream));