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

NAME

6       explain_ftello_or_die - get stream position and report errors
7

SYNOPSIS

9       #include <libexplain/ftello.h>
10       off_t explain_ftello_or_die(FILE *fp);
11       off_t explain_ftello_on_error(FILE *fp);
12

DESCRIPTION

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

RETURN VALUE

26       The  explain_ftello_or_die  function  only  returns  on  success,   see
27       ftello(3)  for  more information. On failure, prints an explanation and
28       exits, it does not return.
29
30       The explain_ftello_on_error function always returns the value return by
31       the wrapped ftello(3) system call.
32

EXAMPLE

34       The  explain_ftello_or_die function is intended to be used in a fashion
35       similar to the following example:
36              off_t result = explain_ftello_or_die(fp);
37

SEE ALSO

39       ftello(3)
40               get stream position
41
42       explain_ftello(3)
43               explain ftello(3) errors
44
45       exit(2) terminate the calling process
46
48       libexplain version 1.4
49       Copyright (C) 2013 Peter Miller
50
51
52
53                                                      explain_ftello_or_die(3)
Impressum