Other Alias
VistaIOOpenInputFileSYNOPSIS
#include <vistaio.h>
FILE *VistaIOOpenInputFile (VistaIOStringConst filename, VistaIOBoolean nofail);
FILE *VistaIOOpenOutputFile (VistaIOStringConst filename, VistaIOBoolean nofail);
ARGUMENTS
- filename
- Specifies he name of the file to be opened.
- nofail
- Specifies whether the routine should exit the program if the file cannot be opened.
DESCRIPTION
These routines open a file while checking for failure and recognizing the special filename ``-'' as denoting the standard input or output stream.If filename is or it is the string ``-'', either stdin or stdout is returned. Otherwise, an attempt is made to open the named file for either reading or writing, as appropriate. If the attempt is successful, the resulting file pointer is returned.
The nofail argument determines what happens if a file cannot be opened. If nofail is then a warning message is issued and is returned. If nofail is then a fatal error message is issued and the program is terminated.
RETURN VALUES
Either routing returns a pointer to the opened FILE if successful. Otherwise it returns or doesn't return at all (depending on nofail).DIAGNOSTICS
- ``Unable to open input/output file filename.''
