zenilib: zenilib/jni/external/sdl/src/stdlib/SDL_iconv.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Enumerations | Functions | Variables
SDL_iconv.c File Reference
`#include "SDL_config.h"`
`#include "SDL_stdinc.h"`
`#include "SDL_endian.h"`

Go to the source code of this file.

## Macros

#define | ENCODING_UCS2NATIVE ENCODING_UCS2BE
#define | ENCODING_UCS4NATIVE ENCODING_UCS4BE
#define | ENCODING_UTF16NATIVE ENCODING_UTF16BE
#define | ENCODING_UTF32NATIVE ENCODING_UTF32BE
#define | UNICODE_BOM 0xFEFF
#define | UNKNOWN_ASCII '?'
#define | UNKNOWN_UNICODE 0xFFFD

## Enumerations

enum

{
ENCODING_UNKNOWN, ENCODING_ASCII, ENCODING_LATIN1, ENCODING_UTF8,
ENCODING_UTF16, ENCODING_UTF16BE, ENCODING_UTF16LE, ENCODING_UTF32,
ENCODING_UTF32BE, ENCODING_UTF32LE, ENCODING_UCS2BE, ENCODING_UCS2LE,
ENCODING_UCS4BE, ENCODING_UCS4LE
}

## Functions

static const char * | getlocale (char *buffer, size_t bufsize)
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)
SDL_iconv_t | SDL_iconv_open (const char *tocode, const char *fromcode)
char * | SDL_iconv_string (const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft)

## Variables

struct {
int format
const char * name
} | encodings []

## Macro Definition Documentation

#define ENCODING_UCS2NATIVE ENCODING_UCS2BE

Definition at line 112 of file SDL_iconv.c.

#define ENCODING_UCS4NATIVE ENCODING_UCS4BE

Definition at line 113 of file SDL_iconv.c.

#define ENCODING_UTF16NATIVE ENCODING_UTF16BE

Definition at line 110 of file SDL_iconv.c.

Referenced by SDL_iconv().

#define ENCODING_UTF32NATIVE ENCODING_UTF32BE

Definition at line 111 of file SDL_iconv.c.

Referenced by SDL_iconv().

#define UNICODE_BOM 0xFEFF

Definition at line 87 of file SDL_iconv.c.

Referenced by SDL_iconv().

#define UNKNOWN_ASCII '?'

Definition at line 89 of file SDL_iconv.c.

Referenced by SDL_iconv().

#define UNKNOWN_UNICODE 0xFFFD

Definition at line 90 of file SDL_iconv.c.

Referenced by SDL_iconv().

## Enumeration Type Documentation

anonymous enum

Enumerator
ENCODING_UNKNOWN |
ENCODING_ASCII |
ENCODING_LATIN1 |
ENCODING_UTF8 |
ENCODING_UTF16 |
ENCODING_UTF16BE |
ENCODING_UTF16LE |
ENCODING_UTF32 |
ENCODING_UTF32BE |
ENCODING_UTF32LE |
ENCODING_UCS2BE |
ENCODING_UCS2LE |
ENCODING_UCS4BE |
ENCODING_UCS4LE |

Definition at line 92 of file SDL_iconv.c.

## Function Documentation

static const char* getlocale | ( | char * | buffer,
|  | size_t | bufsize
| ) |  |

static

Definition at line 165 of file SDL_iconv.c.

References NULL, 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 240 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 844 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 200 of file SDL_iconv.c.

References ENCODING_UNKNOWN, encodings, getlocale(), i, SDL_arraysize, SDL_malloc(), and SDL_strcasecmp().

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 855 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().

## Variable Documentation

struct { ... } encodings[]

Referenced by bdf_cmap_char_index(), bdf_cmap_char_next(), pcf_cmap_char_index(), pcf_cmap_char_next(), and SDL_iconv_open().

int format

Definition at line 130 of file SDL_iconv.c.

const char* name

Definition at line 129 of file SDL_iconv.c.