From 3339f170c2d8a40c8941555b3ea0ad8b8b2f457f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 9 Apr 1998 00:07:17 +0000 Subject: Added codepage 936 (simplified Chineses). In doing so I realized that much code was being duplicated between Hangul, Big5 and Simplified Chinese - so I re-arranged kanji.[ch] to go through generic functions for all multibyte characters that can be identified by a single code range (not Kanji - but all the others). Jeremy. (This used to be commit b6c965c396eb3d4f0e6dfd863e70b28390c59f66) --- source3/include/kanji.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/include/kanji.h') diff --git a/source3/include/kanji.h b/source3/include/kanji.h index 302db13a27..db3731e41b 100644 --- a/source3/include/kanji.h +++ b/source3/include/kanji.h @@ -109,6 +109,9 @@ /* For traditional Chinese (known as Big5 encoding - code page 950). */ #define is_big5_c1(c) ((0xa1 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xf9)) +/* For simplified Chinese (code page - 936). */ +#define is_simpch_c1(c) ((0xa1 <= ((unsigned char) (c)) && ((unsigned char) (c)) <= 0xf7)) + #else /* not _KANJI_C_ */ /* @@ -143,6 +146,7 @@ extern char *(*multibyte_strtok)(char *s1, char *s2); extern char *(*_dos_to_unix)(char *str, BOOL overwrite); extern char *(*_unix_to_dos)(char *str, BOOL overwrite); extern BOOL (*is_multibyte_char)(char c); +extern int (*_skip_multibyte_char)(char c); #define strchr(s1, c) ((*multibyte_strchr)((s1), (c))) #define strrchr(s1, c) ((*multibyte_strrchr)((s1), (c))) @@ -150,7 +154,7 @@ extern BOOL (*is_multibyte_char)(char c); #define strtok(s1, s2) ((*multibyte_strtok)((s1), (s2))) #define dos_to_unix(x,y) ((*_dos_to_unix)((x), (y))) #define unix_to_dos(x,y) ((*_unix_to_dos)((x), (y))) -#define skip_multibyte_char(c) ((*is_multibyte_char)((c))) +#define skip_multibyte_char(c) ((*_skip_multibyte_char)((c))) #endif /* _KANJI_C_ */ -- cgit