<!DOCTYPE File PUBLIC "-//Liam Quin//DTD C API Documentation v1.1//EN" "doc.dtd"><File>
<Entry dir="liblqutil">
<Function File="../../src/liblqutil/fEopen.c">
<Name>LQU_Eopen</Name>
<Class>Utilities/Files
<Purpose>
Opens the named file with the given Flags and Modes, as per open(2).
If the open fails, an error is generated with the given severity,
and including both the file name (Name) and description (What).
A diagnosis of the problem is also generated, using errno and
examining the filename to determine if (for example) a component
of the given path was not a directory.  This generally produces
much more specific, and hence, clearer, error messages than using
perror(3) would give.
<Returns>
a valid file descriptor on success, or -1 if the file couldn't
be opened.
If E_FATAL was given, LQU_Eopen does not return after an error.
<Example>
 *      LQU_Eopen(E_FATAL, "foo.c", "input C source", O_RDONLY, 0)
</Example>
</Function>
<Decl>
API int
LQU_Eopen(Severity, Name, What, Flags, Modes)
    int Severity;
    CONST char *Name;
    CONST char *What;
    int Flags;
    int Modes;
</Decl>
</Entry>
