diff options
Diffstat (limited to 'lib')
-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 . |