libexplain
1.4.D001
|
#include <libexplain/ac/errno.h>
#include <libexplain/ac/iconv.h>
#include <libexplain/iconv_open.h>
#include <libexplain/output.h>
Go to the source code of this file.
Defines | |
#define | FAIL ((iconv_t)(-1)) |
Functions | |
iconv_t | explain_iconv_open_or_die (const char *tocode, const char *fromcode) |
iconv_t | explain_iconv_open_on_error (const char *tocode, const char *fromcode) |
#define FAIL ((iconv_t)(-1)) |
Definition at line 26 of file iconv_open_or_die.c.
iconv_t explain_iconv_open_on_error | ( | const char * | tocode, |
const char * | fromcode | ||
) |
The explain_iconv_open_on_error function is used to call the iconv_open(3) system call. On failure an explanation will be printed to stderr, obtained from the explain_iconv_open(3) function.
tocode | The tocode, exactly as to be passed to the iconv_open(3) system call. |
fromcode | The fromcode, exactly as to be passed to the iconv_open(3) system call. |
iconv_t result = explain_iconv_open_on_error(tocode, fromcode); if (result < 0) { ...cope with error ...no need to print error message }
Definition at line 44 of file iconv_open_or_die.c.
iconv_t explain_iconv_open_or_die | ( | const char * | tocode, |
const char * | fromcode | ||
) |
The explain_iconv_open_or_die function is used to call the iconv_open(3) system call. On failure an explanation will be printed to stderr, obtained from the explain_iconv_open(3) function, and then the process terminates by calling exit(EXIT_FAILURE)
.
tocode | The tocode, exactly as to be passed to the iconv_open(3) system call. |
fromcode | The fromcode, exactly as to be passed to the iconv_open(3) system call. |
iconv_t result = explain_iconv_open_or_die(tocode, fromcode);
Definition at line 30 of file iconv_open_or_die.c.