Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/stdio Fix documentation to reflect what happens whe...



details:   https://anonhg.NetBSD.org/src/rev/7bc258d202df
branches:  trunk
changeset: 332319:7bc258d202df
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Sep 15 23:29:16 2014 +0000

description:
Fix documentation to reflect what happens when EOF is found before delimiter,
aligning us with POSIX.

diffstat:

 lib/libc/stdio/getdelim.3 |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 7281d6593f82 -r 7bc258d202df lib/libc/stdio/getdelim.3
--- a/lib/libc/stdio/getdelim.3 Mon Sep 15 20:24:55 2014 +0000
+++ b/lib/libc/stdio/getdelim.3 Mon Sep 15 23:29:16 2014 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: getdelim.3,v 1.9 2011/04/20 23:37:51 enami Exp $
+.\"     $NetBSD: getdelim.3,v 1.10 2014/09/15 23:29:16 christos Exp $
 .\"
 .\" Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 30, 2010
+.Dd September 15, 2014
 .Dt GETDELIM 3
 .Os
 .Sh NAME
@@ -48,12 +48,14 @@
 function reads from the
 .Fa stream
 until it encounters a character matching
-.Fa delimiter ,
+.Fa delimiter 
+or.
+.DV EOF ,
 storing the input in
 .Fa *lineptr .
 The buffer is
 .Dv NUL Ns No -terminated
-and includes the delimiter.
+and includes the delimiter, if one was found.
 The
 .Fa delimiter
 character must be representable as an unsigned char.
@@ -88,7 +90,8 @@
 .Fn getdelim
 and
 .Fn getline
-functions return the number of characters read, including the delimiter.
+functions return the number of characters read, including the delimiter if
+one was found.
 If no characters were read and the stream is at end-of-file, the functions
 return \-1.
 If an error occurs, the functions return \-1 and the global variable



Home | Main Index | Thread Index | Old Index