Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/stdio mention what happens if the line contains NUL's.



details:   https://anonhg.NetBSD.org/src/rev/5f1b650e4f9d
branches:  trunk
changeset: 332321:5f1b650e4f9d
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Sep 15 23:41:16 2014 +0000

description:
mention what happens if the line contains NUL's.

diffstat:

 lib/libc/stdio/getdelim.3 |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 73a862b847e3 -r 5f1b650e4f9d lib/libc/stdio/getdelim.3
--- a/lib/libc/stdio/getdelim.3 Mon Sep 15 23:31:17 2014 +0000
+++ b/lib/libc/stdio/getdelim.3 Mon Sep 15 23:41:16 2014 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: getdelim.3,v 1.11 2014/09/15 23:31:17 christos Exp $
+.\"     $NetBSD: getdelim.3,v 1.12 2014/09/15 23:41:16 christos Exp $
 .\"
 .\" Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -147,7 +147,8 @@
 .Sh SEE ALSO
 .Xr ferror 3 ,
 .Xr fgets 3 ,
-.Xr fopen 3
+.Xr fopen 3 ,
+.Xr strlen 3
 .Sh STANDARDS
 The
 .Fn getdelim
@@ -155,3 +156,14 @@
 .Fn getline
 functions conform to
 .St -p1003.1-2008 .
+.Sh NOTES
+The
+.Fn getdelim
+and
+.Fn getline
+functions can return strings with length (as returned by
+.Xr strlen 3
+on the returned line) less than the return value of the functions
+if the line happened to contain
+.Dv NUL
+characters.



Home | Main Index | Thread Index | Old Index