diff options
author | 2000-10-18 14:33:36 +0000 | |
---|---|---|
committer | 2000-10-18 14:33:36 +0000 | |
commit | 3713e69a50f2bfd4e0e3ab36947b90de74ce81ef (patch) | |
tree | fe53c5af8f13249ceb0a549c540b8cdded5d78b0 /lib/libc/stdio/fopen.3 | |
parent | hardcoded "gcc" -> ${CC}; ok espie@ (diff) | |
download | wireguard-openbsd-3713e69a50f2bfd4e0e3ab36947b90de74ce81ef.tar.xz wireguard-openbsd-3713e69a50f2bfd4e0e3ab36947b90de74ce81ef.zip |
fdopen(3) takes two args, not one; spotted by fries@. Also, move the CAVEATS
section to the end like most man pages.
Diffstat (limited to 'lib/libc/stdio/fopen.3')
-rw-r--r-- | lib/libc/stdio/fopen.3 | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/libc/stdio/fopen.3 b/lib/libc/stdio/fopen.3 index 8bfa9ae25fe..232419f4363 100644 --- a/lib/libc/stdio/fopen.3 +++ b/lib/libc/stdio/fopen.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fopen.3,v 1.9 2000/04/20 01:39:31 aaron Exp $ +.\" $OpenBSD: fopen.3,v 1.10 2000/10/18 14:33:36 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -221,6 +221,24 @@ for any of the errors specified for the routines .Xr fclose 3 and .Xr fflush 3 . +.Sh SEE ALSO +.Xr open 2 , +.Xr fclose 3 , +.Xr fseek 3 , +.Xr funopen 3 +.Sh STANDARDS +The +.Fn fopen +and +.Fn freopen +functions +conform to +.St -ansiC . +The +.Fn fdopen +function +conforms to +.St -p1003.1-88 . .Sh CAVEATS Proper code using .Fn fdopen @@ -234,7 +252,7 @@ the resulting FILE * in case of success. FILE *file; int fd; - if ((file = fdopen(fd)) != NULL) { + if ((file = fdopen(fd, "r")) != NULL) { /* perform operations on the FILE * */ fclose(file); } else { @@ -242,21 +260,3 @@ the resulting FILE * in case of success. close(fd); } .Ed -.Sh SEE ALSO -.Xr open 2 , -.Xr fclose 3 , -.Xr fseek 3 , -.Xr funopen 3 -.Sh STANDARDS -The -.Fn fopen -and -.Fn freopen -functions -conform to -.St -ansiC . -The -.Fn fdopen -function -conforms to -.St -p1003.1-88 . |