Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/stdio They've finally made gets(3) obsolete (in POS...



details:   https://anonhg.NetBSD.org/src/rev/94c3772b73a8
branches:  trunk
changeset: 754423:94c3772b73a8
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Fri Apr 30 06:00:14 2010 +0000

description:
They've finally made gets(3) obsolete (in POSIX, at least).

diffstat:

 lib/libc/stdio/fgets.3 |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 33965d8dc86d -r 94c3772b73a8 lib/libc/stdio/fgets.3
--- a/lib/libc/stdio/fgets.3    Fri Apr 30 05:56:14 2010 +0000
+++ b/lib/libc/stdio/fgets.3    Fri Apr 30 06:00:14 2010 +0000
@@ -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 @@
 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:



Home | Main Index | Thread Index | Old Index