diff options
Diffstat (limited to 'source/include/kanji.h')
-rw-r--r-- | source/include/kanji.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/source/include/kanji.h b/source/include/kanji.h index cf303659208..865ac3b2c90 100644 --- a/source/include/kanji.h +++ b/source/include/kanji.h @@ -27,6 +27,8 @@ #ifndef _KANJI_H_ #define _KANJI_H_ +#ifdef KANJI + /* FOR SHIFT JIS CODE */ #define is_shift_jis(c) \ ((0x81 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0x9f) \ @@ -105,8 +107,16 @@ #else /* not _KANJI_C_ */ -extern char *(*_dos_to_unix)(char *str, BOOL overwrite); -extern char *(*_unix_to_dos)(char *str, BOOL overwrite); +extern char* (*_dos_to_unix) (const char *str, BOOL overwrite); +extern char* (*_unix_to_dos) (const char *str, BOOL overwrite); + +#define unix_to_dos (*_unix_to_dos) +#define dos_to_unix (*_dos_to_unix) + +extern char *sj_strtok (char *s1, const char *s2); +extern char *sj_strchr (const char *s, int c); +extern char *sj_strrchr (const char *s, int c); +extern char *sj_strstr (const char *s1, const char *s2); #define strchr sj_strchr #define strrchr sj_strrchr @@ -127,7 +137,11 @@ extern char *(*_unix_to_dos)(char *str, BOOL overwrite); int interpret_coding_system (char *str, int def); +#else + #define unix_to_dos(x,y) unix2dos_format(x,y) #define dos_to_unix(x,y) dos2unix_format(x,y) +#endif /* not KANJI */ + #endif /* _KANJI_H_ */ |