summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/fgets.3
diff options
context:
space:
mode:
authorjmc <jmc@openbsd.org>2003-06-01 18:56:04 +0000
committerjmc <jmc@openbsd.org>2003-06-01 18:56:04 +0000
commit244c8edd80d3be9fd659ff97f35eb4a52426526c (patch)
treeb7fe0dc97a7970a8373f496e3ddce729f10eaa2a /lib/libc/stdio/fgets.3
parentinitialize minaddr before calling uvm_km_suballoc. (diff)
downloadwireguard-openbsd-244c8edd80d3be9fd659ff97f35eb4a52426526c.tar.xz
wireguard-openbsd-244c8edd80d3be9fd659ff97f35eb4a52426526c.zip
- section reorder
- kill unnecessary .Ns macros - add some man page section numbers to .Xr's
Diffstat (limited to 'lib/libc/stdio/fgets.3')
-rw-r--r--lib/libc/stdio/fgets.324
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/libc/stdio/fgets.3 b/lib/libc/stdio/fgets.3
index a192125a1ec..3c1fb9cd21c 100644
--- a/lib/libc/stdio/fgets.3
+++ b/lib/libc/stdio/fgets.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: fgets.3,v 1.17 2003/05/17 10:30:10 pjanzen Exp $
+.\" $OpenBSD: fgets.3,v 1.18 2003/06/01 18:56:04 jmc Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -134,6 +134,17 @@ may also fail and set
.Va errno
for any of the errors specified for the routine
.Xr getchar 3 .
+.Sh SEE ALSO
+.Xr feof 3 ,
+.Xr ferror 3 ,
+.Xr fgetln 3
+.Sh STANDARDS
+The functions
+.Fn fgets
+and
+.Fn gets
+conform to
+.St -ansiC .
.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:
@@ -179,17 +190,6 @@ which may indeed include a newline.
Consider using
.Xr fgetln 3
instead when dealing with untrusted input.
-.Sh SEE ALSO
-.Xr feof 3 ,
-.Xr ferror 3 ,
-.Xr fgetln 3
-.Sh STANDARDS
-The functions
-.Fn fgets
-and
-.Fn gets
-conform to
-.St -ansiC .
.Sh BUGS
Since it is usually impossible to ensure that the next input line
is less than some arbitrary length, and because overflowing the