spBase
読み取り中…
検索中…
一致する文字列を見つけられません
spKanji.h
[詳解]
1
4#ifndef __SPKANJI_H
5#define __SPKANJI_H
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
14 /*----@addtogroup spKanjiGroup----*/
15
16typedef enum {
17 SP_KANJI_CODE_UNKNOWN = -1,
18 SP_KANJI_CODE_JIS = 0,
19 SP_KANJI_CODE_EUC = 1,
20 SP_KANJI_CODE_SJIS = 2,
21 SP_KANJI_CODE_ZENKAKU_SJIS = 3,
22 SP_KANJI_CODE_ZENKAKU_JIS = 4,
23 SP_KANJI_CODE_ZENKAKU_EUC = 5,
24 SP_KANJI_CODE_UTF8 = 10,
25} spKanjiCode;
26
27#define SP_KANJI_CODE_CURRENT SP_KANJI_CODE_UNKNOWN
28
29 /*----@addtogroup spKanjiGroup----*/
30
31#if defined(_WIN32) || defined(MACOS)
32#define SP_KANJI_CODE_DEFAULT SP_KANJI_CODE_SJIS
33#else
34#define SP_KANJI_CODE_DEFAULT SP_KANJI_CODE_EUC
35#endif
36#if (defined(_WIN32) && !defined(__CYGWIN32__)) || defined(MACOS)
37#define SP_KANJI_CODE_INTERNAL SP_KANJI_CODE_SJIS
38#else
39#define SP_KANJI_CODE_INTERNAL SP_KANJI_CODE_EUC
40#endif
41
42#if defined(MACOS)
43#pragma import on
44#endif
45
47 /*----@addtogroup spKanjiGroup----*/
48
50extern int spSetKanjiOptions(int n, const char **options);
52extern void spKanjiUsage(const char *name);
54extern void spDecodeMime(int flag);
56extern void spSetDefaultKanjiCode(spKanjiCode code);
58extern void spSetKanjiCode(spKanjiCode icode, spKanjiCode ocode);
60extern spKanjiCode spGetKanjiCode(void);
62extern const char *spGetKanjiCodeLabel(spKanjiCode code);
64extern const char *spGetKanjiCodeEncoding(spKanjiCode code);
66extern spKanjiCode spGetLocaleKanjiCode(const char *lang);
67
68/* converted buffer always terminated with null */
70extern spKanjiCode spConvertKanji(const unsigned char *lin, unsigned char *lout, int size);
72extern spKanjiCode spConvertKanjiCode(const unsigned char *lin, unsigned char *lout,
73 int size, spKanjiCode icode, spKanjiCode ocode);
75extern spKanjiCode spConvertKanjiFromLocaleCode(unsigned char *iobuf, int size, spKanjiCode ocode);
77extern spKanjiCode spConvertKanjiToLocaleCode(unsigned char *iobuf, int size, spKanjiCode icode);
78
79 /*----@addtogroup spKanjiGroup----*/
80
81#if defined(MACOS)
82#pragma import off
83#endif
84
85#ifdef __cplusplus
86} /* Close scope of 'extern "C"' declaration */
87#endif
88
89#endif /* __SPKANJI_H */
spKanjiCode spConvertKanjiCode(const unsigned char *lin, unsigned char *lout, int size, spKanjiCode icode, spKanjiCode ocode)
void spDecodeMime(int flag)
spKanjiCode spConvertKanji(const unsigned char *lin, unsigned char *lout, int size)
void spSetKanjiCode(spKanjiCode icode, spKanjiCode ocode)
spKanjiCode spGetLocaleKanjiCode(const char *lang)
const char * spGetKanjiCodeLabel(spKanjiCode code)
spKanjiCode spGetKanjiCode(void)
int spSetKanjiOptions(int n, const char **options)
void spKanjiUsage(const char *name)