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

NAME

6       explain_vprintf_or_die - formatted output conversion and report errors
7

SYNOPSIS

9       #include <libexplain/vprintf.h>
10       int explain_vprintf_or_die(const char *format, va_list ap);
11       int explain_vprintf_on_error(const char *format, va_list ap);
12

DESCRIPTION

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

RETURN VALUE

30       The  explain_vprintf_or_die  function  only  returns  on  success,  see
31       vprintf(3)  for more information. On failure, prints an explanation and
32       exits, it does not return.
33
34       The explain_vprintf_on_error function always returns the  value  return
35       by the wrapped vprintf(3) system call.
36

EXAMPLE

38       The explain_vprintf_or_die function is intended to be used in a fashion
39       similar to the following example:
40              int result = explain_vprintf_or_die(format, ap);
41

SEE ALSO

43       vprintf(3)
44               formatted output conversion
45
46       explain_vprintf(3)
47               explain vprintf(3) errors
48
49       exit(2) terminate the calling process
50
52       libexplain version 1.4
53       Copyright (C) 2010 Peter Miller
54
55
56
57                                                     explain_vprintf_or_die(3)
Impressum