1explain_setbuffer_or_die(3)Library Functions Manualexplain_setbuffer_or_die(3)
2
3
4

NAME

6       explain_setbuffer_or_die  -  stream  buffering  operations  and  report
7       errors
8

SYNOPSIS

10       #include <libexplain/setbuffer.h>
11       void explain_setbuffer_or_die(FILE *fp, char *data, size_t size);
12       void explain_setbuffer_on_error(FILE *fp, char *data, size_t size);
13

DESCRIPTION

15       The explain_setbuffer_or_die function is used to call the  setbuffer(3)
16       system  call.  On  failure  an  explanation  will be printed to stderr,
17       obtained from the explain_setbuffer(3) function, and then  the  process
18       terminates by calling exit(EXIT_FAILURE).
19
20       The  explain_setbuffer_on_error  function  is  used  to  call  the set‐
21       buffer(3) system call. On failure an explanation  will  be  printed  to
22       stderr,  obtained  from  the  explain_setbuffer(3)  function, but still
23       returns to the caller.
24
25       fp      The fp, exactly as to be  passed  to  the  setbuffer(3)  system
26               call.
27
28       data    The  data,  exactly  as to be passed to the setbuffer(3) system
29               call.
30
31       size    The size, exactly as to be passed to  the  setbuffer(3)  system
32               call.
33

RETURN VALUE

35       The explain_setbuffer_or_die function only returns on success, see set‐
36       buffer(3) for more information. On failure, prints an  explanation  and
37       exits, it does not return.
38
39       The explain_setbuffer_on_error function always returns the value return
40       by the wrapped setbuffer(3) system call.
41

EXAMPLE

43       The explain_setbuffer_or_die function is intended to be used in a fash‐
44       ion similar to the following example:
45              void result = explain_setbuffer_or_die(fp, data, size);
46

SEE ALSO

48       setbuffer(3)
49               stream buffering operations
50
51       explain_setbuffer(3)
52               explain setbuffer(3) errors
53
54       exit(2) terminate the calling process
55
57       libexplain version 1.4
58       Copyright (C) 2010 Peter Miller
59
60
61
62                                                   explain_setbuffer_or_die(3)
Impressum