summaryrefslogtreecommitdiff
path: root/man3/getline.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/getline.3')
-rw-r--r--man3/getline.311
1 files changed, 7 insertions, 4 deletions
diff --git a/man3/getline.3 b/man3/getline.3
index acf8be1bd..5681437ed 100644
--- a/man3/getline.3
+++ b/man3/getline.3
@@ -40,14 +40,16 @@ storing the address of the buffer containing the text into
The buffer is null-terminated and includes the newline character, if
one was found.
-.\" FIXME what happens if *lineptr is NULL but *n isn't zero ?
-.\" Answer: *n is ignored and a new buffer is allocated
If
.IR "*lineptr"
is NULL, then
.BR getline ()
-will allocate a buffer for storing the line, which should be freed
-by the user program.
+will allocate a buffer for storing the line,
+which should be freed by the user program.
+(The value in
+.I *n
+is ignored.)
+
Alternatively, before calling
.BR getline (),
.IR "*lineptr"
@@ -65,6 +67,7 @@ updating
and
.IR "*n"
as necessary.
+
In either case, on a successful call,
.IR "*lineptr"
and