/home/unity/src/rpm/BUILD/sc68-2.2.1/file68/istream68_fd.h File Reference

file descriptor stream operation. More...

#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.


Detailed Description

file descriptor stream operation.

Author:
benjamin gerard
Date:
2003/08/08
Id
istream68_fd.h,v 1.2 2003/09/30 06:29:57 benjihan Exp

isteam68_fd implements istream_t for 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 Mon Aug 24 02:56:25 2009 for sc68fordevelopers by  doxygen 1.5.9