In the past (and occasionally today, I use the following construct:
FILE *myfile;
if ( !(myfile = fopen( filename, "r"))
{
fprintf( stderr, "Couldn\'t open %s - exiting\n", filename);
exit (1);
}
Yes, it only saves a line, but neatly describes what's being done.
--Chuck