static char *SccsId = "@(#)fopen.c 4.3 (TU-Delft) 01/28/93";
/**********************************************************

Name/Version      : aux/4.3

Language          : C
Operating system  : UNIX SYSTEM V
Host machine      : HP9000

Authors           : A.J. van Genderen
                  : N.P. van der Meijs
Creation date     : 15-Mar-1988
Modified by       :
Modification date :


        Delft University of Technology
        Department of Electrical Engineering
        Network Theory Section
        Mekelweg 4 - P.O.Box 5031
        2600 GA DELFT
        The Netherlands

        Phone : 015 - 786234

        COPYRIGHT (C) 1988. All rights reserved.
**********************************************************/
# include <stdio.h>

extern int errno;
extern char *sys_errlist [];

/*
 * fopen with error checking.
 * A message is given, using say (), when fopen failed.
 * The message is composed from <file> and sys_errlist[errno].
 */
FILE * cfopen (file, mode)
char *file, *mode;
{
    FILE * fp = fopen (file, mode);

    if (!fp)
	say ("Can't open %s (%s)", file, sys_errlist[errno]), die ();

    return (fp);
}
