summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorjruoho <jruoho@NetBSD.org>2010-04-30 06:00:14 +0000
committerjruoho <jruoho@NetBSD.org>2010-04-30 06:00:14 +0000
commitb0e9ddf6098e2a9bd80747cb37a4dc3bf277b2c4 (patch)
tree4c7405e17f962003e7e421238ebe6061e65116a4 /lib/libc/stdio
parent1b80a21f092834bc4912b021778e551d83e390c6 (diff)
They've finally made gets(3) obsolete (in POSIX, at least).
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/fgets.315
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/libc/stdio/fgets.3 b/lib/libc/stdio/fgets.3
index ee2e774f697..7e1d7dd1ec5 100644
--- a/lib/libc/stdio/fgets.3
+++ b/lib/libc/stdio/fgets.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: fgets.3,v 1.19 2003/12/09 21:40:54 grant Exp $
+.\" $NetBSD: fgets.3,v 1.20 2010/04/30 06:00:14 jruoho Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" @(#)fgets.3 8.1 (Berkeley) 6/4/93
.\"
-.Dd June 4, 1993
+.Dd April 30, 2010
.Dt FGETS 3
.Os
.Sh NAME
@@ -133,7 +133,16 @@ The functions
and
.Fn gets
conform to
-.St -ansiC .
+.St -ansiC
+and
+.St -p1003.1-2001 .
+The
+.St -p1003.1-2008
+revision marked
+.Fn gets
+as obsolescent, recommending the use of
+.Fn fgets
+instead.
.Sh CAVEATS
The following bit of code illustrates a case where the programmer assumes a
string is too long if it does not contain a newline: