32 #include "opencc_types.h"
43 #define OPENCC_DEFAULT_CONFIG_SIMP_TO_TRAD "zhs2zht.ini"
50 #define OPENCC_DEFAULT_CONFIG_TRAD_TO_SIMP "zht2zhs.ini"
131 const char* dict_filename,
132 opencc_dictionary_type dict_type);
145 opencc_conversion_mode conversion_mode);
char * opencc_convert_utf8(opencc_t od, const char *inbuf, size_t length)
Converts UTF-8 string from inbuf.
opencc_t opencc_open(const char *config_file)
Makes an instance of opencc.
void opencc_convert_utf8_free(char *buf)
Releases allocated buffer by opencc_convert_utf8.
int opencc_close(opencc_t od)
Destroys an instance of opencc.
int opencc_dict_load(opencc_t od, const char *dict_filename, opencc_dictionary_type dict_type)
Loads a dictionary to default dictionary chain.
opencc_error opencc_errno(void)
Returns an opencc_convert_errno_t which describes the last error.
void opencc_perror(const char *spec)
Prints the error message to stderr.
void opencc_set_conversion_mode(opencc_t od, opencc_conversion_mode conversion_mode)
Changes the mode of conversion.
size_t opencc_convert(opencc_t od, ucs4_t **inbuf, size_t *inbufleft, ucs4_t **outbuf, size_t *outbufleft)
Converts a UCS-4 string from *inbuf to *outbuf.