home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume19 / rkive / part01 / efopen.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-06-29  |  828 b   |  36 lines

  1. /*
  2. **
  3. ** This software is Copyright (c) 1989 by Kent Landfield.
  4. **
  5. ** Permission is hereby granted to copy, distribute or otherwise 
  6. ** use any part of this package as long as you do not try to make 
  7. ** money from it or pretend that you wrote it.  This copyright 
  8. ** notice must be maintained in any copy made.
  9. **
  10. **
  11. **  History:
  12. **    Creation: Tue Feb 21 08:52:35 CST 1989 due to necessity.
  13. **                                                               
  14. */
  15. #ifndef lint
  16. static char SID[] = "@(#)efopen.c    1.1 6/1/89";
  17. #endif
  18.  
  19. #include <stdio.h>
  20.  
  21. extern FILE *errfp;
  22.  
  23. FILE *efopen(file,mode)       
  24. char *file, *mode;
  25. {
  26.      FILE *fp;
  27.      FILE *fopen();
  28.      void exit();
  29.  
  30.      if ((fp = fopen (file, mode)) == NULL) {
  31.          (void) fprintf (errfp, "Can't open file %s\n", file);
  32.          exit(1);
  33.      }
  34.      return (fp);
  35. }
  36.