All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
efio.h File Reference
#include <stdio.h>

Go to the source code of this file.

Macros

#define FOPENERROR   3000
 

Functions

FILE * Efopen (const char *Name, const char *Mode)
 

Macro Definition Documentation

#define FOPENERROR   3000

Include Files and Type Defines

Definition at line 26 of file efio.h.

Function Documentation

FILE* Efopen ( const char *  Name,
const char *  Mode 
)

Public Function Prototype

This routine attempts to open the specified file in the specified mode. If the file can be opened, a pointer to the open file is returned. If the file cannot be opened, an error is trapped.

Parameters
Namename of file to be opened
Modemode to be used to open file
Returns
Pointer to open file.
Note
Globals: None
Exceptions: FOPENERROR unable to open specified file
History: 5/21/89, DSJ, Created.

Definition at line 43 of file efio.cpp.

43  {
44  FILE *File;
45  char ErrorMessage[MAXERRORMESSAGE];
46 
47  File = fopen (Name, Mode);
48  if (File == NULL) {
49  sprintf (ErrorMessage, "Unable to open %s", Name);
50  DoError(FOPENERROR, ErrorMessage);
51  return (NULL);
52  }
53  else
54  return (File);
55 } /* Efopen */
#define MAXERRORMESSAGE
Definition: efio.cpp:26
#define FOPENERROR
Definition: efio.h:26
void DoError(int Error, const char *Message)
Definition: danerror.cpp:42
#define NULL
Definition: host.h:144