File: props.src

package info (click to toggle)
ruby2.5 2.5.5-3%2Bdeb10u4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 101,532 kB
  • sloc: ruby: 732,598; ansic: 669,262; xml: 25,363; yacc: 20,963; javascript: 6,680; sh: 3,610; lisp: 2,627; makefile: 596; python: 198; sed: 76; perl: 62; awk: 36; asm: 35
file content (52 lines) | stat: -rw-r--r-- 1,180 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
%{/* -*- c -*- */
#define GPERF_DOWNCASE 1
#define GPERF_CASE_STRNCMP 1

static inline int
gperf_case_strncmp(const char *s1, const char *s2, size_t n)
{
    const UChar *str = (const UChar *)s1;
    const UChar *s = (const UChar *)s2;
    return onigenc_with_ascii_strnicmp(ONIG_ENCODING_ASCII, str, str + n, s, (int)n);
}

enum onigenc_jis_ctype {
    onigenc_jis_min = ONIGENC_MAX_STD_CTYPE,
    onigenc_jis_hiragana,
    onigenc_jis_katakana,
    onigenc_jis_han,
    onigenc_jis_latin,
    onigenc_jis_greek,
    onigenc_jis_cyrillic,
    onigenc_jis_max
};

enum {PropertyListNum = onigenc_jis_max - onigenc_jis_min - 1};

static const OnigCodePoint* const PropertyList[PropertyListNum] = {
    CR_Hiragana,
    CR_Katakana,
    CR_Han,
    CR_Latin,
    CR_Greek,
    CR_Cyrillic,
};

struct enc_property {
    signed char name;
    unsigned char ctype;
};

static const struct enc_property *onig_jis_property(/*!ANSI{*/const char *str, unsigned int len/*}!ANSI*/);
%}

struct enc_property;

%%
hiragana, onigenc_jis_hiragana
katakana, onigenc_jis_katakana
han,      onigenc_jis_han
latin,    onigenc_jis_latin
greek,    onigenc_jis_greek
cyrillic, onigenc_jis_cyrillic
%%