comparison lib/linebuffer.c @ 8816:b8edbad1b48a

Tweak doc.
author Bruno Haible <bruno@clisp.org>
date Mon, 14 May 2007 21:36:29 +0000
parents 28d0ef9a0a36
children bbbbbf4cd1c5
comparison
equal deleted inserted replaced
8815:61554edc2407 8816:b8edbad1b48a
45 { 45 {
46 return readlinebuffer_delim (linebuffer, stream, '\n'); 46 return readlinebuffer_delim (linebuffer, stream, '\n');
47 } 47 }
48 48
49 /* Read an arbitrarily long line of text from STREAM into LINEBUFFER. 49 /* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
50 Consder lines to be terminated by DELIMITER. 50 Consider lines to be terminated by DELIMITER.
51 Keep the delimiter; append DELIMITER if it's the last line of a file 51 Keep the delimiter; append DELIMITER if it's the last line of a file
52 that ends in a character other than DELIMITER. Do not null terminate. 52 that ends in a character other than DELIMITER. Do not NUL-terminate.
53 Therefore the stream can contain NUL bytes, and the length 53 Therefore the stream can contain NUL bytes, and the length
54 (including the delimiter) is returned in linebuffer->length. 54 (including the delimiter) is returned in linebuffer->length.
55 Return NULL when stream is empty. Return NULL and set errno upon 55 Return NULL when stream is empty. Return NULL and set errno upon
56 error; callers can distinguish this case from the empty case by 56 error; callers can distinguish this case from the empty case by
57 invoking ferror (stream). 57 invoking ferror (stream).