]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/unicode_fold2_key.c
44f8cb6600710b4631547c8ff808e059c2dafd42
1 /* This file was converted by gperf_fold_key_conv.py
2 from gperf output file. */
3 /* ANSI-C code produced by gperf version 3.1 */
4 /* Command-line: /usr/local/bin/gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N onigenc_unicode_fold2_key unicode_fold2_key.gperf */
5 /* Computed positions: -k'3,6' */
9 /* This gperf source file was generated by make_unicode_fold_data.py */
12 * Copyright (c) 2017-2018 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
13 * All rights reserved.
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
24 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 #define TOTAL_KEYWORDS 59
40 #define MIN_WORD_LENGTH 6
41 #define MAX_WORD_LENGTH 6
42 #define MIN_HASH_VALUE 0
43 #define MAX_HASH_VALUE 58
44 /* maximum key range = 59, duplicates = 0 */
55 hash(OnigCodePoint codes
[])
57 static const unsigned char asso_values
[] =
59 58, 57, 56, 55, 54, 53, 52, 16, 50, 59,
60 15, 59, 25, 59, 59, 59, 59, 59, 59, 3,
61 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
62 59, 59, 49, 48, 47, 46, 45, 44, 43, 42,
63 59, 59, 59, 59, 59, 59, 59, 59, 59, 21,
64 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
65 59, 59, 59, 59, 59, 59, 2, 59, 59, 59,
66 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
67 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
68 59, 59, 59, 59, 59, 59, 40, 20, 39, 38,
69 37, 14, 5, 36, 20, 7, 25, 34, 29, 32,
70 16, 59, 31, 59, 59, 2, 1, 59, 25, 15,
71 59, 14, 59, 59, 28, 59, 2, 59, 59, 59,
72 11, 59, 59, 59, 59, 59, 59, 59, 59, 59,
73 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
74 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
75 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
76 59, 59, 24, 59, 22, 59, 59, 11, 59, 59,
77 59, 59, 59, 7, 59, 0, 59, 59, 16, 59,
78 1, 59, 59, 16, 59, 59, 59, 15, 59, 59,
79 59, 6, 59, 59, 59, 59, 0, 59, 59, 59,
80 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
81 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
82 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
83 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
84 59, 59, 59, 59, 59, 59
86 return asso_values
[(unsigned char)onig_codes_byte_at(codes
, 5)] + asso_values
[(unsigned char)onig_codes_byte_at(codes
, 2)];
90 onigenc_unicode_fold2_key(OnigCodePoint codes
[])
92 static const short int wordlist
[] =
214 int key
= hash(codes
);
215 if (key
<= MAX_HASH_VALUE
) {
216 int index
= wordlist
[key
];
217 if (index
>= 0 && onig_codes_cmp(codes
, OnigUnicodeFolds2
+ index
, 2) == 0)