|
SDL
2.0
|
Include dependency graph for SDL_iconv.c:Go to the source code of this file.
Data Structures | |
| struct | SDL_iconv_t |
Macros | |
| #define | UNICODE_BOM 0xFEFF |
| #define | UNKNOWN_ASCII '?' |
| #define | UNKNOWN_UNICODE 0xFFFD |
| #define | ENCODING_UTF16NATIVE ENCODING_UTF16BE |
| #define | ENCODING_UTF32NATIVE ENCODING_UTF32BE |
| #define | ENCODING_UCS2NATIVE ENCODING_UCS2BE |
| #define | ENCODING_UCS4NATIVE ENCODING_UCS4BE |
Functions | |
| static const char * | getlocale (char *buffer, size_t bufsize) |
| SDL_iconv_t | SDL_iconv_open (const char *tocode, const char *fromcode) |
| size_t | SDL_iconv (SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) |
| int | SDL_iconv_close (SDL_iconv_t cd) |
| char * | SDL_iconv_string (const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft) |
Variables | |
| struct { | |
| const char * name | |
| int format | |
| } | encodings [] |
| #define ENCODING_UCS2NATIVE ENCODING_UCS2BE |
Definition at line 119 of file SDL_iconv.c.
| #define ENCODING_UCS4NATIVE ENCODING_UCS4BE |
Definition at line 120 of file SDL_iconv.c.
| #define ENCODING_UTF16NATIVE ENCODING_UTF16BE |
Definition at line 117 of file SDL_iconv.c.
Referenced by SDL_iconv().
| #define ENCODING_UTF32NATIVE ENCODING_UTF32BE |
Definition at line 118 of file SDL_iconv.c.
Referenced by SDL_iconv().
| #define UNICODE_BOM 0xFEFF |
Definition at line 94 of file SDL_iconv.c.
Referenced by SDL_iconv().
| #define UNKNOWN_ASCII '?' |
Definition at line 96 of file SDL_iconv.c.
Referenced by SDL_iconv().
| #define UNKNOWN_UNICODE 0xFFFD |
Definition at line 97 of file SDL_iconv.c.
Referenced by SDL_iconv().
| anonymous enum |
Definition at line 99 of file SDL_iconv.c.
|
static |
Definition at line 172 of file SDL_iconv.c.
References NULL, ptr, SDL_getenv, SDL_strchr, SDL_strcmp, and SDL_strlcpy.
Referenced by SDL_iconv_open().
| size_t SDL_iconv | ( | SDL_iconv_t | cd, |
| const char ** | inbuf, | ||
| size_t * | inbytesleft, | ||
| char ** | outbuf, | ||
| size_t * | outbytesleft | ||
| ) |
Definition at line 247 of file SDL_iconv.c.
References ENCODING_ASCII, ENCODING_LATIN1, ENCODING_UCS2BE, ENCODING_UCS2LE, ENCODING_UCS4BE, ENCODING_UCS4LE, ENCODING_UTF16, ENCODING_UTF16BE, ENCODING_UTF16LE, ENCODING_UTF16NATIVE, ENCODING_UTF32, ENCODING_UTF32BE, ENCODING_UTF32LE, ENCODING_UTF32NATIVE, ENCODING_UTF8, SDL_FALSE, SDL_ICONV_E2BIG, SDL_ICONV_EINVAL, SDL_TRUE, UNICODE_BOM, UNKNOWN_ASCII, and UNKNOWN_UNICODE.
Referenced by SDL_iconv_string().
| int SDL_iconv_close | ( | SDL_iconv_t | cd | ) |
Definition at line 851 of file SDL_iconv.c.
References SDL_free().
Referenced by SDL_iconv_string().
| SDL_iconv_t SDL_iconv_open | ( | const char * | tocode, |
| const char * | fromcode | ||
| ) |
Definition at line 207 of file SDL_iconv.c.
References SDL_iconv_t::dst_fmt, ENCODING_UNKNOWN, encodings, getlocale(), i, SDL_arraysize, SDL_malloc, SDL_strcasecmp, and SDL_iconv_t::src_fmt.
Referenced by SDL_iconv_string().
| char* SDL_iconv_string | ( | const char * | tocode, |
| const char * | fromcode, | ||
| const char * | inbuf, | ||
| size_t | inbytesleft | ||
| ) |
This function converts a string between encodings in one pass, returning a string that must be freed with SDL_free() or NULL on error.
Definition at line 862 of file SDL_iconv.c.
References NULL, SDL_iconv(), SDL_iconv_close(), SDL_ICONV_E2BIG, SDL_ICONV_EILSEQ, SDL_ICONV_EINVAL, SDL_ICONV_ERROR, SDL_iconv_open(), SDL_malloc, SDL_memset, and SDL_realloc.
| struct { ... } encodings[] |
Referenced by SDL_iconv_open().
| int format |
Definition at line 137 of file SDL_iconv.c.
| const char* name |
Definition at line 136 of file SDL_iconv.c.