EFOPEN
Section: Standard I/O Functions (3S)
Updated: 11 May 1986
Index
Return to Main Contents
NAME
efopen - open a stream, exiting with message in case of failure
SYNOPSIS
#include <stdio.h>
extern char *progname;
FILE
*efopen(filename, type)
char *filename, *type;
DESCRIPTION
Efopen
calls
fopen(3S)
to open the file named by
filename,
and if successful returns a pointer to be used to identify the stream in
subsequent operations.
If
filename
is the string -
efopen
will return
stdin.
Type
is a character string as in
fopen(3S).
On failure,
efopen
exits, after printing out the name of the program (if a value has been
given to
progname
by main), the name of the file, and calling
perror(3).
SEE ALSO
fopen(3S),
open(2),
fclose(3)
AUTHOR
Modified by Mohamed el Lozy from program given in
The UNIX Programming Environment
by Brian W. Kernighan and Rob Pike, p 182.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- SEE ALSO
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 06:38:21 GMT, December 12, 2024