<!DOCTYPE File PUBLIC "-//Liam Quin//DTD C API Documentation v1.1//EN" "doc.dtd"><File>
<Entry dir="liblqutil">
<Function File="../../src/liblqutil/elseek.c">
<Name>LQU_Elseek</Name>
<Class>Utilities/Files
<Purpose>
<P>This is a wrapper for the lseek(2) system call.  On an error,
the given Name (which should reflect the corresponding file name,
but need not be suitable to access that file) and What, which should
be a terse description of the way in which the program is using the
file, are used to construct a message passed to Error with the
given Severity.</P>
<P>The fd, Position and Whence arguments are as for the lseek(2)
system call.</P>
<Returns>
The new file offset on success, or -1 on failure.
<Errors>
Generates an Error at the given Severity if lseek fails, adding
(with bitwise or) E_SYS if appropriate.
<Example>
Where = LQU_lseek(E_FATAL, "passwd", "user database", 0, 0L, SEEK_SET);
</Example>
</Function>
<Decl>
API off_t
LQU_Elseek(Severity, Name, What, fd, Position, Whence)
    int Severity;
    CONST char *Name;
    CONST char *What;
    int fd;
    long Position;
    int Whence;
</Decl>
</Entry>
