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

NAME

6       explain_iconv_or_die  -  perform  character  set  conversion and report
7       errors
8

SYNOPSIS

10       #include <libexplain/iconv.h>
11       size_t   explain_iconv_or_die(iconv_t   cd,   char   **inbuf,    size_t
12       *inbytesleft, char **outbuf, size_t *outbytesleft);
13       size_t   explain_iconv_on_error(iconv_t   cd,   char   **inbuf,  size_t
14       *inbytesleft, char **outbuf, size_t *outbytesleft);
15

DESCRIPTION

17       The explain_iconv_or_die function is used to call the  iconv(3)  system
18       call.  On  failure  an  explanation will be printed to stderr, obtained
19       from the explain_iconv(3) function, and then the process terminates  by
20       calling exit(EXIT_FAILURE).
21
22       The explain_iconv_on_error function is used to call the iconv(3) system
23       call. On failure an explanation will be  printed  to  stderr,  obtained
24       from the explain_iconv(3) function, but still returns to the caller.
25
26       cd      The cd, exactly as to be passed to the iconv(3) system call.
27
28       inbuf   The inbuf, exactly as to be passed to the iconv(3) system call.
29
30       inbytesleft
31               The inbytesleft, exactly as to be passed to the iconv(3) system
32               call.
33
34       outbuf  The outbuf, exactly as to be  passed  to  the  iconv(3)  system
35               call.
36
37       outbytesleft
38               The  outbytesleft, exactly as to be passed to the iconv(3) sys‐
39               tem call.
40

RETURN VALUE

42       The explain_iconv_or_die function only returns on success, see iconv(3)
43       for  more  information. On failure, prints an explanation and exits, it
44       does not return.
45
46       The explain_iconv_on_error function always returns the value return  by
47       the wrapped iconv(3) system call.
48

EXAMPLE

50       The  explain_iconv_or_die  function is intended to be used in a fashion
51       similar to the following example:
52              size_t result = explain_iconv_or_die(cd, inbuf, inbytesleft, outbuf,
53                  outbytesleft);
54

SEE ALSO

56       iconv(3)
57               perform character set conversion
58
59       explain_iconv(3)
60               explain iconv(3) errors
61
62       exit(2) terminate the calling process
63
65       libexplain version 1.4
66       Copyright (C) 2013 Peter Miller
67
68
69
70                                                       explain_iconv_or_die(3)
Impressum