Open Chinese Convert  0.4.3
A project for conversion between Traditional and Simplified Chinese
/usr/src/RPM/BUILD/opencc-0.4.3/src/opencc.h
Go to the documentation of this file.
00001 
00023 #ifndef __OPENCC_H_
00024 #define __OPENCC_H_
00025 
00032 #include "opencc_types.h"
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00043 #define OPENCC_DEFAULT_CONFIG_SIMP_TO_TRAD "zhs2zht.ini"
00044 
00050 #define OPENCC_DEFAULT_CONFIG_TRAD_TO_SIMP "zht2zhs.ini"
00051 
00061 opencc_t opencc_open(const char* config_file);
00062 
00069 int opencc_close(opencc_t od);
00070 
00086 size_t opencc_convert(opencc_t od,
00087                       ucs4_t** inbuf,
00088                       size_t* inbufleft,
00089                       ucs4_t** outbuf,
00090                       size_t* outbufleft);
00091 
00107 char* opencc_convert_utf8(opencc_t od, const char* inbuf, size_t length);
00108 
00116 void opencc_convert_utf8_free(char* buf);
00117 
00130 int opencc_dict_load(opencc_t od,
00131                      const char* dict_filename,
00132                      opencc_dictionary_type dict_type);
00133 
00144 void opencc_set_conversion_mode(opencc_t od,
00145                                 opencc_conversion_mode conversion_mode);
00146 
00152 opencc_error opencc_errno(void);
00153 
00160 void opencc_perror(const char* spec);
00161 
00162 #ifdef __cplusplus
00163 }
00164 #endif
00165 
00166 #endif /* __OPENCC_H_ */
 All Data Structures Files Functions Variables Defines