1: /* $Header$ */ 2: 3: /* 4: * Author: Peter J. Nicklin 5: */ 6: 7: /* 8: * mustfopen() opens a file in the manner of fopen(3). However, if the file 9: * cannot be accessed, exit(1) is called. 10: */ 11: #include <stdio.h> 12: 13: FILE * 14: mustfopen(filename,mode) 15: char *filename; 16: char *mode; 17: { 18: FILE *stream; /* file stream */ 19: 20: if ((stream = fopen(filename,mode)) == NULL) 21: fatal("can't open %s",filename); 22: return(stream); 23: }