1 --- fopen.3.bsdnew 2009-11-11 13:33:06.000000000 -0800
2 +++ fopen.3 2009-11-11 13:33:07.000000000 -0800
11 .Nd stream open functions
17 -.Fn fopen "const char * restrict path" "const char * restrict mode"
20 +.Fa "const char *mode"
23 -.Fn fdopen "int fildes" "const char *mode"
25 +.Fa "const char *restrict filename"
26 +.Fa "const char *restrict mode"
29 -.Fn freopen "const char *path" "const char *mode" "FILE *stream"
31 +.Fa "const char *restrict filename"
32 +.Fa "const char *restrict mode"
33 +.Fa "FILE *restrict stream"
39 opens the file whose name is the string pointed to by
42 and associates a stream with it.
45 @@ -103,6 +113,17 @@ This is strictly for compatibility with
47 and has no effect; the ``b'' is ignored.
49 +Finally, as an extension to the standards (and thus may not be portable),
51 +string may end with the letter ``x'', which insists on creating a new file
52 +when used with ``w'' or ``a''.
55 +exists, then an error is returned (this is the equivalent of specifying
60 Any created files will have mode
63 @@ -144,7 +165,7 @@ The
66 opens the file whose name is the string pointed to by
69 and associates the stream pointed to by
72 @@ -156,7 +177,7 @@ argument is used just as in the
81 @@ -200,7 +221,7 @@ or
83 Upon successful completion