Manpage of FREOPEN

Google
Web www.fiveanddime.net

FREOPEN

Section: NEWLIB (3)
Updated: 2005 Feb 23
Index Return to Main Contents
 

NAME

3.16 `freopen'--open a file using an existing file descriptor

 

SYNOPSIS


     #include <stdio.h>
     FILE *freopen(const char *FILE, const char *MODE,
         FILE *FP);
     FILE *_freopen_r(struct _reent *PTR, const char *FILE,
         const char *MODE, FILE *FP);  

DESCRIPTION

Use this variant of `fopen' if you wish to specify a particular file descriptor FP (notably `stdin', `stdout', or `stderr') for the file.


   If FP was associated with another file or stream, `freopen' closes that other file or stream (but ignores any errors while closing it).


   FILE and MODE are used just as in `fopen'.

 

RETURNS

If successful, the result is the same as the argument FP. If the file cannot be opened as specified, the result is `NULL'.

 

PORTABILITY

ANSI C requires `freopen'.


   Supporting OS subroutines required: `close', `fstat', `isatty', `lseek', `open', `read', `sbrk', `write'.

 

SEE ALSO

freopen is part of the libc library. The full documentation for libc is maintained as a Texinfo manual. If info and libc are properly installed at your site, the command
info libc

will give you access to the complete manual.


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURNS
PORTABILITY
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 21:25:17 GMT, May 16, 2005



www.fiveanddime.net








Google
Web www.fiveanddime.net