1explain_fgetpos_or_die(3)  Library Functions Manual  explain_fgetpos_or_die(3)
2
3
4

NAME

6       explain_fgetpos_or_die - reposition a stream and report errors
7

SYNOPSIS

9       #include <libexplain/fgetpos.h>
10       void explain_fgetpos_or_die(FILE *fp, fpos_t *pos);
11       int explain_fgetpos_on_error(FILE *fp, fpos_t *pos);
12

DESCRIPTION

14       The explain_fgetpos_or_die function is used to call the fgetpos(3) sys‐
15       tem call. On failure an explanation will be printed to stderr, obtained
16       from  the  explain_fgetpos(3) function, and then the process terminates
17       by calling exit(EXIT_FAILURE).
18
19       The explain_fgetpos_on_error function is used to  call  the  fgetpos(3)
20       system  call.  On  failure  an  explanation  will be printed to stderr,
21       obtained from the explain_fgetpos(3) function, but still returns to the
22       caller.
23
24       fp      The fp, exactly as to be passed to the fgetpos(3) system call.
25
26       pos     The pos, exactly as to be passed to the fgetpos(3) system call.
27

RETURN VALUE

29       The  explain_fgetpos_or_die function only returns on success, see fget‐
30       pos(3) for more information. On  failure,  prints  an  explanation  and
31       exits, it does not return.
32
33       The  explain_fgetpos_on_error  function always returns the value return
34       by the wrapped fgetpos(3) system call.
35

EXAMPLE

37       The explain_fgetpos_or_die function is intended to be used in a fashion
38       similar to the following example:
39              explain_fgetpos_or_die(fp, pos);
40

SEE ALSO

42       fgetpos(3)
43               reposition a stream
44
45       explain_fgetpos(3)
46               explain fgetpos(3) errors
47
48       exit(2) terminate the calling process
49
51       libexplain version 1.4
52       Copyright (C) 2010 Peter Miller
53
54
55
56                                                     explain_fgetpos_or_die(3)
Impressum