]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/unicode_fold3_key.c
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/bin/gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N onigenc_unicode_fold3_key unicode_fold3_key.gperf */
5 /* Computed positions: -k'3,6,9' */
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 14
40 #define MIN_WORD_LENGTH 9
41 #define MAX_WORD_LENGTH 9
42 #define MIN_HASH_VALUE 0
43 #define MAX_HASH_VALUE 13
44 /* maximum key range = 14, duplicates = 0 */
55 hash(OnigCodePoint codes
[])
57 static const unsigned char asso_values
[] =
59 6, 3, 14, 14, 14, 14, 14, 14, 1, 14,
60 14, 14, 14, 14, 14, 14, 14, 14, 14, 0,
61 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
62 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
63 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
64 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
65 14, 14, 14, 14, 14, 14, 0, 14, 14, 14,
66 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
67 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
68 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
69 14, 14, 4, 14, 14, 5, 14, 14, 4, 14,
70 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
71 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
72 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
73 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
74 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
75 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
76 14, 14, 14, 14, 14, 14, 14, 10, 14, 14,
77 14, 14, 14, 9, 14, 1, 14, 14, 14, 14,
78 14, 14, 14, 14, 14, 14, 14, 0, 14, 14,
79 14, 8, 14, 14, 14, 14, 14, 14, 14, 14,
80 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
81 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
82 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
83 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
84 14, 14, 14, 14, 14, 14
86 return asso_values
[(unsigned char)onig_codes_byte_at(codes
, 8)] + asso_values
[(unsigned char)onig_codes_byte_at(codes
, 5)] + asso_values
[(unsigned char)onig_codes_byte_at(codes
, 2)];
90 onigenc_unicode_fold3_key(OnigCodePoint codes
[])
92 static const short int wordlist
[] =
126 int key
= hash(codes
);
128 if (key
<= MAX_HASH_VALUE
)
130 int index
= wordlist
[key
];
132 if (index
>= 0 && onig_codes_cmp(codes
, OnigUnicodeFolds3
+ index
, 3) == 0)