delorie.com/djgpp/doc/libc/libc_312.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

fdopen

Syntax

 
#include <stdio.h>

FILE *fdopen(int fd, const char *mode);

Description

This function opens a stream-type file that uses the given fd file, which must already be open. The file is opened with the modes specified by mode, which is the same as for fopen. See section fopen.

Return Value

The newly created FILE *, or NULL on error.

Portability

ANSI/ISO C No
POSIX 1003.2-1992; 1003.1-2001

Example

 
FILE *stdprn = fdopen(4, "w");


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004