#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <m17n-core.h>
Go to the source code of this file.
Data Structures | |
struct | MConverter |
Structure to be used in code conversion. More... | |
struct | MCodingInfoISO2022 |
Structure for a coding system of type MCODING_TYPE_ISO_2022. More... | |
struct | MCodingInfoUTF |
Structure for extra information about a coding system of type MCODING_TYPE_UTF. | |
struct | MInputDriver |
Structure of input method driver. More... | |
struct | MInputMethod |
Structure of input method. More... | |
struct | MInputContext |
Structure of input context. More... | |
Defines | |
#define | M17N_INIT() m17n_init() |
#define | M17N_FINI() m17n_fini() |
#define | MCHAR_INVALID_CODE 0xFFFFFFFF |
Typedefs | |
typedef MDatabase | MDatabase |
Type of database. | |
typedef MLocale | MLocale |
struct MLocale | |
typedef MInputMethod | MInputMethod |
typedef MInputContext | MInputContext |
typedef void(* | MInputCallbackFunc )(MInputContext *ic, MSymbol command) |
Type of input method callback functions. | |
typedef MInputDriver | MInputDriver |
Structure of input method driver. | |
Enumerations | |
enum | MConversionResult { MCONVERSION_RESULT_SUCCESS, MCONVERSION_RESULT_INVALID_BYTE, MCONVERSION_RESULT_INVALID_CHAR, MCONVERSION_RESULT_INSUFFICIENT_SRC, MCONVERSION_RESULT_INSUFFICIENT_DST, MCONVERSION_RESULT_IO_ERROR } |
Codes that represent the result of code conversion. More... | |
enum | MCodingType { MCODING_TYPE_CHARSET, MCODING_TYPE_UTF, MCODING_TYPE_ISO_2022, MCODING_TYPE_MISC } |
Types of coding system. More... | |
enum | MCodingFlagISO2022 { MCODING_ISO_RESET_AT_EOL = 0x1, MCODING_ISO_RESET_AT_CNTL = 0x2, MCODING_ISO_EIGHT_BIT = 0x4, MCODING_ISO_LONG_FORM = 0x8, MCODING_ISO_DESIGNATION_G0 = 0x10, MCODING_ISO_DESIGNATION_G1 = 0x20, MCODING_ISO_DESIGNATION_CTEXT = 0x40, MCODING_ISO_DESIGNATION_CTEXT_EXT = 0x80, MCODING_ISO_LOCKING_SHIFT = 0x100, MCODING_ISO_SINGLE_SHIFT = 0x200, MCODING_ISO_SINGLE_SHIFT_7 = 0x400, MCODING_ISO_EUC_TW_SHIFT = 0x800, MCODING_ISO_ISO6429 = 0x1000, MCODING_ISO_REVISION_NUMBER = 0x2000, MCODING_ISO_FULL_SUPPORT = 0x3000, MCODING_ISO_FLAG_MAX } |
Bit-masks to specify the detail of coding system whose type is MCODING_TYPE_ISO_2022. More... | |
Functions | |
void | m17n_init (void) |
void | m17n_fini (void) |
MDatabase * | mdatabase_find (MSymbol tag1, MSymbol tag2, MSymbol tag3, MSymbol tag4) |
Look for a data in the database. | |
MPlist * | mdatabase_list (MSymbol tag0, MSymbol tag1, MSymbol tag2, MSymbol tag3) |
Return a data list of the m17n database. | |
void * | mdatabase_load (MDatabase *mdb) |
Load a data from the database. | |
MSymbol * | mdatabase_tag (MDatabase *mdb) |
Get tags of a data. | |
MDatabase * | mdatabase_define (MSymbol tag1, MSymbol tag2, MSymbol tag3, MSymbol tag4, void *(*loader)(MSymbol *, void *), void *extra_info) |
Define a data of the m17n database. | |
MSymbol | mchar_define_charset (char *name, MPlist *plist) |
Define a charset. | |
MSymbol | mchar_resolve_charset (MSymbol symbol) |
Resolve charset name. | |
int | mchar_list_charset (MSymbol **symbols) |
List symbols representing a charset. | |
int | mchar_decode (MSymbol charset_name, unsigned code) |
Decode a code-point. | |
unsigned | mchar_encode (MSymbol charset_name, int c) |
Encode a character code. | |
int | mchar_map_charset (MSymbol charset_name, void(*func)(int from, int to, void *arg), void *func_arg) |
Call a function for all the characters in a specified charset. | |
MSymbol | mconv_define_coding (char *name, MPlist *plist, int(*resetter)(MConverter *), int(*decoder)(unsigned char *, int, MText *, MConverter *), int(*encoder)(MText *, int, int, unsigned char *, int, MConverter *), void *extra_info) |
Define a coding system. | |
MSymbol | mconv_resolve_coding (MSymbol symbol) |
Resolve coding system name. | |
int | mconv_list_codings (MSymbol **symbols) |
List symbols representing a coding system. | |
MConverter * | mconv_buffer_converter (MSymbol coding, unsigned char *buf, int n) |
Create a code converter bound to a buffer. | |
MConverter * | mconv_stream_converter (MSymbol coding, FILE *fp) |
Create a code converter bound to a stream. | |
int | mconv_reset_converter (MConverter *converter) |
Reset a code converter. | |
void | mconv_free_converter (MConverter *converter) |
Free a code converter. | |
MConverter * | mconv_rebind_buffer (MConverter *converter, unsigned char *buf, int n) |
Bind a buffer to a code converter. | |
MConverter * | mconv_rebind_stream (MConverter *converter, FILE *fp) |
Bind a stream to a code converter. | |
MText * | mconv_decode (MConverter *converter, MText *mt) |
Decode a byte sequence into an M-text. | |
MText * | mconv_decode_buffer (MSymbol name, unsigned char *buf, int n) |
Decode a buffer area based on a coding system. | |
MText * | mconv_decode_stream (MSymbol name, FILE *fp) |
Decode a stream input based on a coding system. | |
int | mconv_encode (MConverter *converter, MText *mt) |
Encode an M-text into a byte sequence. | |
int | mconv_encode_range (MConverter *converter, MText *mt, int from, int to) |
Encode a part of an M-text. | |
int | mconv_encode_buffer (MSymbol name, MText *mt, unsigned char *buf, int n) |
Encode an M-text into a buffer area. | |
int | mconv_encode_stream (MSymbol name, MText *mt, FILE *fp) |
Encode an M-text to write to a stream. | |
int | mconv_getc (MConverter *converter) |
Read a character via a code converter. | |
int | mconv_ungetc (MConverter *converter, int c) |
Push a character back to a code converter. | |
int | mconv_putc (MConverter *converter, int c) |
Write a character via a code converter. | |
MText * | mconv_gets (MConverter *converter, MText *mt) |
Read a line using a code converter. | |
MLocale * | mlocale_set (int category, const char *locale) |
Set the current locale. | |
MSymbol | mlocale_get_prop (MLocale *locale, MSymbol key) |
Get the value of a locale property. | |
int | mtext_ftime (MText *mt, const char *format, const struct tm *tm, MLocale *locale) |
Format date and time. | |
MText * | mtext_getenv (const char *name) |
Get an environment variable. | |
int | mtext_putenv (MText *mt) |
Change or add an environment variable. | |
int | mtext_coll (MText *mt1, MText *mt2) |
Compare two M-texts using the current locale. | |
MInputMethod * | minput_open_im (MSymbol language, MSymbol name, void *arg) |
Open an input method. | |
void | minput_close_im (MInputMethod *im) |
Close an input method. | |
MInputContext * | minput_create_ic (MInputMethod *im, void *arg) |
Create an input context. | |
void | minput_destroy_ic (MInputContext *ic) |
Destroy an input context. | |
int | minput_filter (MInputContext *ic, MSymbol key, void *arg) |
Filter an input key. | |
int | minput_lookup (MInputContext *ic, MSymbol key, void *arg, MText *mt) |
Lookup a text produced in the input context. | |
void | minput_set_spot (MInputContext *ic, int x, int y, int ascent, int descent, int fontsize, MText *mt, int pos) |
Set the spot of the input context. | |
void | minput_toggle (MInputContext *ic) |
Toggle input method. | |
MSymbol | minput_char_to_key (int c) |
MInputMethod * | mdebug_dump_im (MInputMethod *im, int indent) |
Dump an input method. | |
Variables | |
char * | mdatabase_dir |
Directory for application specific data. | |
MSymbol | Mcharset_ascii |
Symbol representing the charset ASCII. | |
MSymbol | Mcharset_iso_8859_1 |
Symbol representing the charset ISO/IEC 8859/1. | |
MSymbol | Mcharset_unicode |
Symbol representing the charset Unicode. | |
MSymbol | Mcharset_m17n |
Symbol representing the largest charset. | |
MSymbol | Mcharset_binary |
Symbol representing the charset for ill-decoded characters. | |
MSymbol | Mmethod |
MSymbol | Mdimension |
MSymbol | Mmin_range |
MSymbol | Mmax_range |
MSymbol | Mmin_code |
MSymbol | Mmax_code |
MSymbol | Mascii_compatible |
MSymbol | Mfinal_byte |
MSymbol | Mrevision |
MSymbol | Mmin_char |
MSymbol | Mmapfile |
MSymbol | Mparents |
MSymbol | Msubset_offset |
MSymbol | Mdefine_coding |
MSymbol | Maliases |
MSymbol | Moffset |
Symbol for the offset type method of charset. | |
MSymbol | Mmap |
Symbol for the map type method of charset. | |
MSymbol | Munify |
Symbol for the unify type method of charset. | |
MSymbol | Msubset |
Symbol for the subset type method of charset. | |
MSymbol | Msuperset |
Symbol for the superset type method of charset. | |
MSymbol | Mcharset |
The symbol Mcharset . | |
MSymbol | Mcoding_us_ascii |
Symbol for the coding system US-ASCII. | |
MSymbol | Mcoding_iso_8859_1 |
Symbol for the coding system ISO-8859-1. | |
MSymbol | Mcoding_utf_8 |
Symbol for the coding system UTF-8. | |
MSymbol | Mcoding_utf_8_full |
UTF-8-FULL. | |
MSymbol | Mcoding_utf_16 |
UTF-16. | |
MSymbol | Mcoding_utf_16be |
UTF-16BE. | |
MSymbol | Mcoding_utf_16le |
UTF-16LE. | |
MSymbol | Mcoding_utf_32 |
UTF-32. | |
MSymbol | Mcoding_utf_32be |
UTF-32be. | |
MSymbol | Mcoding_utf_32le |
UTF-32LE. | |
MSymbol | Mcoding_sjis |
SJIS. | |
MSymbol | Mtype |
MSymbol | Mcharsets |
MSymbol | Mflags |
MSymbol | Mdesignation |
MSymbol | Minvocation |
MSymbol | Mcode_unit |
MSymbol | Mbom |
MSymbol | Mlittle_endian |
MSymbol | Mutf |
MSymbol | Miso_2022 |
MSymbol | Mreset_at_eol |
MSymbol | Mreset_at_cntl |
MSymbol | Meight_bit |
MSymbol | Mlong_form |
MSymbol | Mdesignation_g0 |
MSymbol | Mdesignation_g1 |
MSymbol | Mdesignation_ctext |
MSymbol | Mdesignation_ctext_ext |
MSymbol | Mlocking_shift |
MSymbol | Msingle_shift |
MSymbol | Msingle_shift_7 |
MSymbol | Meuc_tw_shift |
MSymbol | Miso_6429 |
MSymbol | Mrevision_number |
MSymbol | Mfull_support |
MSymbol | Mcoding |
The symbol Mcoding . | |
MSymbol | Mmaybe |
Symbol whose name is "maybe". | |
MSymbol | Mlanguage |
MSymbol | Mterritory |
MSymbol | Mmodifier |
MSymbol | Mcodeset |
MInputDriver | minput_default_driver |
The default input driver for internal input methods. | |
MSymbol | Minput_driver |
MInputDriver * | minput_driver |
The input driver for internal input methods. | |
MSymbol | Minput_preedit_start |
MSymbol | Minput_preedit_draw |
MSymbol | Minput_preedit_done |
MSymbol | Minput_status_start |
MSymbol | Minput_status_draw |
MSymbol | Minput_status_done |
MSymbol | Minput_candidates_start |
MSymbol | Minput_candidates_draw |
MSymbol | Minput_candidates_done |
MSymbol | Minput_set_spot |
MSymbol | Minput_toggle |
|
|
|
|
|
|
|
The structure The contents of this structure are implementation dependent. Its internal structure is concealed from application programs.
|
|
|
|
|
|
The type |
|
|
|
|
|
|