1explain_getchar_or_die(3) Library Functions Manual explain_getchar_or_die(3)
2
3
4
6 explain_getchar_or_die - input of characters and report errors
7
9 #include <libexplain/getchar.h>
10 void explain_getchar_or_die(void);
11
13 The explain_getchar_or_die function is used to call the getchar(3) sys‐
14 tem call. On failure an explanation will be printed to stderr,
15 obtained from explain_getchar(3), and then the process terminates by
16 calling exit(EXIT_FAILURE).
17
18 This function is intended to be used in a fashion similar to the fol‐
19 lowing example:
20 int c = explain_getchar_or_die();
21
22 Returns:
23 This function only returns on success. On failure, prints an
24 explanation and exits.
25
27 getchar(3)
28 input of characters
29
30 explain_getchar(3)
31 explain getchar(3) errors
32
33 exit(2) terminate the calling process
34
36 libexplain version 1.4
37 Copyright (C) 2008 Peter Miller
38
39
40
41 explain_getchar_or_die(3)