home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / tex / texsrc1 / Src / lib / c / xfopen-pas < prev    next >
Encoding:
Text File  |  1993-05-02  |  490 b   |  27 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.   char *cp;
  14.  
  15.   make_c_string (&name);
  16.   result = fopen (name, mode);
  17.  
  18.   if (result != NULL)
  19.     {
  20.       make_pascal_string (&name);
  21.       return result;
  22.     }
  23.   
  24.   FATAL_PERROR (name);
  25.   return NULL; /* Stop compiler warnings.  */
  26. }
  27.