tesseract 3.04.01

cutil/efio.h File Reference

#include <stdio.h>

Go to the source code of this file.

Defines

#define FOPENERROR   3000

Functions

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

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

                                                 { 
  FILE *File;
  char ErrorMessage[MAXERRORMESSAGE];

  File = fopen (Name, Mode);
  if (File == NULL) {
    sprintf (ErrorMessage, "Unable to open %s", Name);
    DoError(FOPENERROR, ErrorMessage); 
    return (NULL);
  }
  else
    return (File);
}                                /* Efopen */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines