Mercurial > kinput2.yaz
comparison lib/Xsj3clib/sj3ctype.h @ 0:92745d501b9a
initial import from kinput2-v3.1
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 08 Mar 2010 04:44:30 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:92745d501b9a |
---|---|
1 /* $Id: sj3ctype.h,v 2.2 1992/10/20 08:50:46 nao Exp $ */ | |
2 /* | |
3 * Copyright 1991 Sony Corporation | |
4 * | |
5 * Permission to use, copy, modify, distribute, and sell this software and its | |
6 * documentation for any purpose is hereby granted without fee, provided that | |
7 * the above copyright notice appear in all copies and that both that | |
8 * copyright notice and this permission notice appear in supporting | |
9 * documentation, and that the name of Sony not be used in advertising or | |
10 * publicity pertaining to distribution of the software without specific, | |
11 * written prior permission. Sony makes no representations about the | |
12 * suitability of this software for any purpose. It is provided "as is" | |
13 * without express or implied warranty. | |
14 * | |
15 * SONY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL | |
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SONY | |
17 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION | |
19 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | |
20 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
21 */ | |
22 /* | |
23 * Author: Naoshi Suzuki, SONY Corporation. (nao@sm.sony.co.jp) | |
24 */ | |
25 | |
26 #ifndef _sj3ctype_h | |
27 #define _sj3ctype_h | |
28 | |
29 extern unsigned char kan1[4][4]; | |
30 extern unsigned char kan2[4][4]; | |
31 extern wchar hira[2][2]; | |
32 extern wchar kata[2][3]; | |
33 extern wchar zalpha[2][2]; | |
34 extern wchar zupper[2][2]; | |
35 extern wchar zlower[2][2]; | |
36 extern wchar zplosive[2][2]; | |
37 extern wchar zdakuten[2][2]; | |
38 extern wchar zvowel[2][10]; | |
39 | |
40 #ifndef iskan1 | |
41 #define iskan1(c, l) ((kan1[l][0]<=(c) && (c)<=kan1[l][1]) \ | |
42 || (kan1[l][2]<=(c) && (c)<=kan1[l][3])) | |
43 #endif | |
44 #ifndef iskan2 | |
45 #define iskan2(c, l) ((kan2[l][0]<=(c) && (c)<=kan2[l][1]) \ | |
46 || (kan2[l][2]<=(c) && (c)<=kan2[l][3])) | |
47 #endif | |
48 #ifndef ishira | |
49 #define ishira(c, l) (hira[l][0]<=(c) && (c)<=hira[l][1]) | |
50 #endif | |
51 #ifndef iskata | |
52 #define iskata(c, l) (kata[l][0]<=(c) && (c)<=kata[l][1]\ | |
53 && (c)!=kata[l][2]) | |
54 #endif | |
55 #ifndef iszalpha | |
56 #define iszalpha(c, l) (zalpha[l][0]<=(c) && (c)<=zalpha[l][1]) | |
57 #endif | |
58 #ifndef iszupper | |
59 #define iszupper(c, l) (zupper[l][0]<=(c) && (c)<=zupper[l][1]) | |
60 #endif | |
61 #ifndef iszlower | |
62 #define iszlower(c, l) (zlower[l][0]<=(c) && (c)<=zlower[l][1]) | |
63 #endif | |
64 #ifndef isplosive | |
65 #define isplosive(c, l) ((c)==zplosive[l][0] || (c)==zplosive[l][1]) | |
66 #endif | |
67 #ifndef iszdakuten | |
68 #define iszdakuten(c, l) ((c)==zdakuten[l][0] || (c)==zdakuten[l][1]) | |
69 #endif | |
70 #ifndef iszvowel | |
71 #define iszvowel(c, l) ((zvowel[l][0]<=(c) && (c)<=zvowel[l][1]) || \ | |
72 (zvowel[l][2]<=(c) && (c)<=zvowel[l][3])) | |
73 #endif | |
74 | |
75 #ifndef issjis1 | |
76 #define issjis1(x) ((0x81<=(x) && (x)<=0x9f) || (0xe0<=(x) && (x)<=0xfc)) | |
77 #endif | |
78 #ifndef issjis2 | |
79 #define issjis2(x) ((0x40<=(x) && (x)<=0x7e) || (0x80<=(x) && (x)<=0xfc)) | |
80 #endif | |
81 #ifdef iskana | |
82 #undef iskana | |
83 #endif | |
84 #define iskana(x) (0xa1<=(x) && (x)<=0xdf) | |
85 #ifndef iskana2 | |
86 #define iskana2(x) (0xa1<=(x) && (x)<=0xdf) | |
87 #endif | |
88 #ifndef iseuc | |
89 #define iseuc(x) (0xa1<=(x) && (x)<=0xfe) | |
90 #endif | |
91 #ifndef iseuckana | |
92 #define iseuckana(x) ((x)==0x8e) | |
93 #endif | |
94 #ifndef isjis | |
95 #define isjis(x) (0x21<=(x) && (x)<=0x7e) | |
96 #endif | |
97 | |
98 #ifndef isvowel | |
99 #define isvowel(x) ((x)==0x61 || (x)==0x65 || (x)==0x69 || (x)==0x6f || \ | |
100 (x)==0x75 || (x)==0x41 || (x)==0x45 || (x)==0x49 || (x)==0x4f || (x)==0x55) | |
101 #endif | |
102 #ifndef isdakuten | |
103 #define isdakuten(x) (0xde<=(x) && (x)<=0xdf) | |
104 #endif | |
105 #ifndef isdakuon | |
106 #define isdakuon(x) (((x)>=0xb6 && (x)<=0xc4) || ((x)>=0xca && (x)<=0xce)) | |
107 #endif | |
108 | |
109 #endif /* _sj3ctype_h */ |