[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
readlinebuffer doc tweak
From: |
Bruno Haible |
Subject: |
readlinebuffer doc tweak |
Date: |
Sat, 12 May 2007 18:18:31 +0200 |
User-agent: |
KMail/1.5.4 |
Jim Meyering wrote:
> Thanks. I've checked that in, with some trivial syntactic changes:
> wrap long lines and add 2007 to the list of copyright years in the .h file.
May I commit these doc tweaks?
- Typo.
- Better distinction between the number 0, the pointer NULL and the ASCII
character NUL.
--- lib/linebuffer.c 12 May 2007 15:59:59 -0000 1.22
+++ lib/linebuffer.c 12 May 2007 16:14:38 -0000
@@ -47,9 +47,9 @@
}
/* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
- Consder lines to be terminated by DELIMITER.
+ Consider lines to be terminated by DELIMITER.
Keep the delimiter; append DELIMITER if it's the last line of a file
- that ends in a character other than DELIMITER. Do not null terminate.
+ that ends in a character other than DELIMITER. Do not NUL-terminate.
Therefore the stream can contain NUL bytes, and the length
(including the delimiter) is returned in linebuffer->length.
Return NULL when stream is empty. Return NULL and set errno upon
--- lib/linebuffer.h 12 May 2007 15:59:59 -0000 1.16
+++ lib/linebuffer.h 12 May 2007 16:14:38 -0000
@@ -37,15 +37,15 @@
/* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
Consider lines to be terminated by DELIMITER.
Keep the delimiter; append DELIMITER if we reach EOF and it wasn't
- the last character in the file. Do not null terminate.
- Return LINEBUFFER, except at end of file return 0. */
+ the last character in the file. Do not NUL-terminate.
+ Return LINEBUFFER, except at end of file return NULL. */
struct linebuffer *readlinebuffer_delim (struct linebuffer *linebuffer,
FILE *stream, char delimiter);
/* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
Keep the newline; append a newline if it's the last line of a file
- that ends in a non-newline character. Do not null terminate.
- Return LINEBUFFER, except at end of file return 0. */
+ that ends in a non-newline character. Do not NUL-terminate.
+ Return LINEBUFFER, except at end of file return NULL. */
struct linebuffer *readlinebuffer (struct linebuffer *linebuffer, FILE
*stream);
/* Free linebuffer LINEBUFFER and its data, all allocated with malloc. */