BOOTSTRAP (kutils) functions
LIBRARY ROUTINE
kfdopen - open an existing transport descriptor as a data transport stream
LIBRARY CALL
kfile *kfdopen(
int id,
const char *type)
INPUT
- id - the transport identifier opened earlier
- type - how the data transport is to be opened.
"r" - Open file for only reading
"w" - Open file for only writing
"a" - Append file for only writing
"A" - Append file for writing; non over-write
"r+" - Open file for both reading & writing
"w+" - Open file for both reading & writing
"a+" - Append file for only writing
"A+" - Append file for writing; non over-write
OUTPUT
none
RETURN VALUE
The kfile pointer representing the open stream
to the data transport on success, NULL on failure
DESCRIPTION
This function is a replacement for the system "fdopen"
call; kfdopen() supports all data transport mechanisms,
not just unix files.
The kfdopen() function associates a data transport stream
with an existing transport descriptor previously obtained
from a call to kopen(), kdup(), kdup2(), or kpipe(). These
functions open data transports, but do not return pointers
to kfile structures; many of the khoros I/O functions require
pointers to the kfile structure. Note that the type of
khoros data transport must agree with the mode of the open
data transport.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$BOOTSTRAP/objects/library/kutils/src/kstdio.c
SEE ALSO
kutils(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.