BOOTSTRAP (kutils) functions
LIBRARY ROUTINE
kfile_reopen - re-open a stream khoros transport
LIBRARY CALL
kfile *kfile_reopen(
char *path,
char *type,
kfile *file)
INPUT
- path - is the string containing the path name to the
desired file to be open. The path name identifies
the file to be opened, just like the regular UNIX
freopen() command.
- type - how the file is to be re-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 overwrite
"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 overwrite
- file - the existing khoros stream transport to be reopened
for the specified filename.
OUTPUT
none
RETURN VALUE
returns the kfile structure or NULL upon failure
DESCRIPTION
This function is similar to the khoros kfreopen()
call. The only difference is that kfile_reopen()
re-open the a khoros stream transport as well close
and re-open all of transports that have been kdup'ed
from the existing transport.
kfile_reopen() will open a specified file on for an existing
stream. The existings stream is closed before the new
filename is opened. This function is typically used to
open a specified file as one of the predefined streams;
such as standard input, standard output, or standard error.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$BOOTSTRAP/objects/library/kutils/src/kfile.c
SEE ALSO
kutils(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.