diff options
author | Jeremy Allison <jra@samba.org> | 1998-04-09 00:07:17 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-04-09 00:07:17 +0000 |
commit | 3339f170c2d8a40c8941555b3ea0ad8b8b2f457f (patch) | |
tree | ca4c9947eb2cd45e8c07bf58e7664ec240a9bd1e /source3/include | |
parent | 1af95effe96284c30c0f3f1782677e8f1873ceca (diff) | |
download | samba-3339f170c2d8a40c8941555b3ea0ad8b8b2f457f.tar.gz samba-3339f170c2d8a40c8941555b3ea0ad8b8b2f457f.tar.bz2 samba-3339f170c2d8a40c8941555b3ea0ad8b8b2f457f.zip |
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)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/kanji.h | 6 | ||||
-rw-r--r-- | source3/include/smb.h | 1 |
2 files changed, 6 insertions, 1 deletions
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_ */ diff --git a/source3/include/smb.h b/source3/include/smb.h index 88d9a9de09..21bf346c62 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1115,6 +1115,7 @@ enum case_handling {CASE_LOWER,CASE_UPPER}; #define KANJI_CODEPAGE 932 #define HANGUL_CODEPAGE 949 #define BIG5_CODEPAGE 950 +#define SIMPLIFIED_CHINESE_CODEPAGE 936 #ifdef KANJI /* |