home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / unixtex-6.1b-src.lha / unixtex-6.1b / web2c / lib / xfopen-pas.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-21  |  478 b   |  26 lines

  1. /* xfopen-pas.c: Open a file; don't return if any error occurs.  NAME
  2.    should be a Pascal string; it is changed to a C string and then
  3.    changed back.  */
  4.  
  5. #include "config.h"
  6.  
  7. FILE *
  8. xfopen_pas (name, mode)
  9.   char *name;
  10.   char *mode;
  11. {
  12.   FILE *result;
  13.  
  14.   make_c_string (&name);
  15.   result = fopen (name, mode);
  16.  
  17.   if (result != NULL)
  18.     {
  19.       make_pascal_string (&name);
  20.       return result;
  21.     }
  22.   
  23.   FATAL_PERROR (name);
  24.   return NULL; /* Stop compiler warnings.  */
  25. }
  26.