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

NAME

6       explain_setvbuf_or_die - stream buffering operations and report errors
7

SYNOPSIS

9       #include <libexplain/setvbuf.h>
10       void  explain_setvbuf_or_die(FILE  *fp,  char  *data,  int mode, size_t
11       size);
12       int explain_setvbuf_on_error(FILE *fp, char  *data,  int  mode,  size_t
13       size);
14

DESCRIPTION

16       The explain_setvbuf_or_die function is used to call the setvbuf(3) sys‐
17       tem call. On failure an explanation will be printed to stderr, obtained
18       from  the  explain_setvbuf(3) function, and then the process terminates
19       by calling exit(EXIT_FAILURE).
20
21       The explain_setvbuf_on_error function is used to  call  the  setvbuf(3)
22       system  call.  On  failure  an  explanation  will be printed to stderr,
23       obtained from the explain_setvbuf(3) function, but still returns to the
24       caller.
25
26       fp      The fp, exactly as to be passed to the setvbuf(3) system call.
27
28       data    The  data,  exactly  as  to  be passed to the setvbuf(3) system
29               call.
30
31       mode    The mode, exactly as to be  passed  to  the  setvbuf(3)  system
32               call.
33
34       size    The  size,  exactly  as  to  be passed to the setvbuf(3) system
35               call.
36

RETURN VALUE

38       The  explain_setvbuf_or_die  function  only  returns  on  success,  see
39       setvbuf(3)  for more information. On failure, prints an explanation and
40       exits, it does not return.
41
42       The explain_setvbuf_on_error function always returns the  value  return
43       by the wrapped setvbuf(3) system call.
44

EXAMPLE

46       The explain_setvbuf_or_die function is intended to be used in a fashion
47       similar to the following example:
48              explain_setvbuf_or_die(fp, data, mode, size);
49

SEE ALSO

51       setvbuf(3)
52               stream buffering operations
53
54       explain_setvbuf(3)
55               explain setvbuf(3) errors
56
57       exit(2) terminate the calling process
58
60       libexplain version 1.4
61       Copyright (C) 2010 Peter Miller
62
63
64
65                                                     explain_setvbuf_or_die(3)
Impressum