1explain_telldir_or_die(3) Library Functions Manual explain_telldir_or_die(3)
2
3
4
6 explain_telldir_or_die - current location in directory and report
7 errors
8
10 #include <libexplain/telldir.h>
11 off_t explain_telldir_or_die(DIR *dir);
12 off_t explain_telldir_on_error(DIR *dir);
13
15 The explain_telldir_or_die function is used to call the telldir(3) sys‐
16 tem call. On failure an explanation will be printed to stderr, obtained
17 from the explain_telldir(3) function, and then the process terminates
18 by calling exit(EXIT_FAILURE).
19
20 The explain_telldir_on_error function is used to call the telldir(3)
21 system call. On failure an explanation will be printed to stderr,
22 obtained from the explain_telldir(3) function, but still returns to the
23 caller.
24
25 dir The dir, exactly as to be passed to the telldir(3) system call.
26
28 The explain_telldir_or_die function only returns on success, see
29 telldir(3) for more information. On failure, prints an explanation and
30 exits, it does not return.
31
32 The explain_telldir_on_error function always returns the value return
33 by the wrapped telldir(3) system call.
34
36 The explain_telldir_or_die function is intended to be used in a fashion
37 similar to the following example:
38 off_t result = explain_telldir_or_die(dir);
39
41 telldir(3)
42 return current location in directory stream
43
44 explain_telldir(3)
45 explain telldir(3) errors
46
47 exit(2) terminate the calling process
48
50 libexplain version 1.4
51 Copyright (C) 2009 Peter Miller
52
53
54
55 explain_telldir_or_die(3)