Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

istream68_fd.h File Reference


Detailed Description

file descriptor stream operation.

Author:
benjamin gerard
Date:
2003/08/08
Id
istream68_fd.h,v 1.1 2003/09/17 12:00:23 benjihan Exp

isteam68_fd implements istream_t for file descriptor.

#include "file68/istream68.h"

Go to the source code of this file.

Functions

istream_tistream_fd_create (const char *fname, int fd, int mode)
 Creates a stream for "UNIX" file descriptor.


Function Documentation

istream_t* istream_fd_create const char *  fname,
int  fd,
int  mode
 

Creates a stream for "UNIX" file descriptor.

If fd parameters is not -1, it is used to as file descriptor for the stream and fname is used for naming the stream. Else the file is open as a regular file with fname as path.

Parameters:
fname path of file or 0.
fd file decriptor or -1.
mode bit-0: read access, bit-1: write access.
Returns:
stream
Return values:
0 on error
Note:
filename is internally copied.

Even if fd is given the istream_open() must be call.

Warning:
When opening a stream with an already opened descriptor the mode should match the real open mode but since no tests are performed before calling r/w access, it should not failed in case of wrong access on given mode.


Generated on Fri Sep 26 16:27:53 2003 for sc68fordevelopers by doxygen 1.3.3