Debian Codegraph @

vendor/onigmo-source/enc/jis/props.kwd

raw
1 %{/* -*- c -*- */
2 #define GPERF_DOWNCASE 1
3 #define GPERF_CASE_STRNCMP 1
4
5 static inline int
6 gperf_case_strncmp(const char *s1, const char *s2, unsigned int n)
7 {
8 const UChar *str = (const UChar *)s1;
9 const UChar *s = (const UChar *)s2;
10 return onigenc_with_ascii_strnicmp(ONIG_ENCODING_ASCII, str, str + n, s, n);
11 }
12
13 enum onigenc_jis_ctype {
14 onigenc_jis_min = ONIGENC_MAX_STD_CTYPE,
15 onigenc_jis_hiragana,
16 onigenc_jis_katakana,
17 onigenc_jis_han,
18 onigenc_jis_latin,
19 onigenc_jis_greek,
20 onigenc_jis_cyrillic,
21 onigenc_jis_max
22 };
23
24 enum {PropertyListNum = onigenc_jis_max - onigenc_jis_min - 1};
25
26 static const OnigCodePoint* const PropertyList[PropertyListNum] = {
27 CR_Hiragana,
28 CR_Katakana,
29 CR_Han,
30 CR_Latin,
31 CR_Greek,
32 CR_Cyrillic,
33 };
34
35 struct enc_property {
36 signed char name;
37 unsigned char ctype;
38 };
39
40 static const struct enc_property *onig_jis_property(const char *str, unsigned int len);
41 %}
42
43 struct enc_property;
44
45 %%
46 hiragana, onigenc_jis_hiragana
47 katakana, onigenc_jis_katakana
48 han, onigenc_jis_han
49 latin, onigenc_jis_latin
50 greek, onigenc_jis_greek
51 cyrillic, onigenc_jis_cyrillic
52 %%