Lines Matching full:file
20 <<freopen>>---open a file using an existing file descriptor
29 FILE *freopen(const char *restrict <[file]>, const char *restrict <[mode]>,
30 FILE *restrict <[fp]>);
31 FILE *freopen( const char *restrict <[file]>,
32 const char *restrict <[mode]>, FILE *restrict <[fp]>);
35 Use this variant of <<fopen>> if you wish to specify a particular file
37 the file.
39 If <[fp]> was associated with another file or stream, <<freopen>>
40 closes that other file or stream (but ignores any errors while closing
43 <[file]> and <[mode]> are used just as in <<fopen>>.
45 If <[file]> is <<NULL>>, the underlying stream is modified rather than
46 closed. The file cannot be given a more permissive access mode (for
47 example, a <[mode]> of "w" will fail on a read-only file descriptor),
53 file cannot be opened as specified, the result is <<NULL>>.
73 * Re-direct an existing, open (probably) file to some other file.
76 FILE *
78 const char *__restrict file, in freopen() argument
80 register FILE *__restrict fp) in freopen()
111 * which file descriptor (if any) was associated with it. in freopen()
114 * This is unnecessary if it was not a Unix file. in freopen()
125 * If file is NULL, the file should not be closed. in freopen()
127 if (fp->_close != NULL && file != NULL) in freopen()
132 * Now get a new descriptor to refer to the new file, or reuse the in freopen()
133 * existing file descriptor if file is NULL. in freopen()
136 if (file != NULL) in freopen()
138 f = open ((char *) file, oflags, 0666); in freopen()
146 * Reuse the file descriptor, but only if the new access mode is in freopen()