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

NAME

6       explain_putw_or_die - output a word (int) and report errors
7

SYNOPSIS

9       #include <libexplain/putw.h>
10       void explain_putw_or_die(int value, FILE *fp);
11       int explain_putw_on_error(int value, FILE *fp);
12

DESCRIPTION

14       The  explain_putw_or_die  function  is  used to call the putw(3) system
15       call. On failure an explanation will be  printed  to  stderr,  obtained
16       from  the  explain_putw(3) function, and then the process terminates by
17       calling exit(EXIT_FAILURE).
18
19       The explain_putw_on_error function is used to call the  putw(3)  system
20       call.  On  failure  an  explanation will be printed to stderr, obtained
21       from the explain_putw(3) function, but still returns to the caller.
22
23       value   The value, exactly as to be passed to the putw(3) system call.
24
25       fp      The fp, exactly as to be passed to the putw(3) system call.
26

RETURN VALUE

28       The explain_putw_or_die function only returns on success,  see  putw(3)
29       for  more  information. On failure, prints an explanation and exits, it
30       does not return.
31
32       The explain_putw_on_error function always returns the value  return  by
33       the wrapped putw(3) system call.
34

EXAMPLE

36       The  explain_putw_or_die  function  is intended to be used in a fashion
37       similar to the following example:
38              explain_putw_or_die(value, fp);
39

SEE ALSO

41       putw(3) output a word (int)
42
43       explain_putw(3)
44               explain putw(3) errors
45
46       exit(2) terminate the calling process
47
49       libexplain version 0.40
50       Copyright (C) 2010 Peter Miller
51
52
53
54                                                        explain_putw_or_die(3)
Impressum