home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-src.tgz / tar.out / contrib / unixtex / web2c / lib / xfopen-pas.c < prev    next >
C/C++ Source or Header  |  1996-09-28  |  478b  |  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.