| 1 | /* -*- c-basic-offset: 2 -*- */cxx . . $ `<file>/storage/mroonga/vendor/groonga/lib/pat.c`/ |
| 2 | /* |
| 3 | Copyright(C) 2009-2017 Brazil |
| 4 | |
| 5 | This library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License version 2.1 as published by the Free Software Foundation. |
| 8 | |
| 9 | This library is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | Lesser General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU Lesser General Public |
| 15 | License along with this library; if not, write to the Free Software |
| 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA |
| 17 | */ |
| 18 | #include "grn.h"cxx . . $ `<file>/storage/mroonga/vendor/groonga/lib/grn.h`/ |
| 19 | #include <string.h> |
| 20 | #include <limits.h> |
| 21 | #include "grn_pat.h"cxx . . $ `<file>/storage/mroonga/vendor/groonga/lib/grn_pat.h`/ |
| 22 | #include "grn_output.h"cxx . . $ `<file>/storage/mroonga/vendor/groonga/lib/grn_output.h`/ |
| 23 | #include "grn_util.h"cxx . . $ `<file>/storage/mroonga/vendor/groonga/lib/grn_util.h`/ |
| 24 | #include "grn_normalizer.h"cxx . . $ `<file>/storage/mroonga/vendor/groonga/lib/grn_normalizer.h`/ |
| 25 | |
| 26 | #define GRN_PAT_DELETEDcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:26:9`! (GRN_ID_MAX + 1) |
| 27 | |
| 28 | #define GRN_PAT_SEGMENT_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:28:9`! 0x400000 |
| 29 | #define W_OF_KEY_IN_A_SEGMENTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:29:9`! 22 |
| 30 | #define W_OF_PAT_IN_A_SEGMENTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:30:9`! 18 |
| 31 | #define W_OF_SIS_IN_A_SEGMENTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:31:9`! 19 |
| 32 | #define KEY_MASK_IN_A_SEGMENTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:32:9`! 0x3fffff |
| 33 | #define PAT_MASK_IN_A_SEGMENTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:33:9`! 0x3ffff |
| 34 | #define SIS_MASK_IN_A_SEGMENTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:34:9`! 0x7ffff |
| 35 | #define SEG_NOT_ASSIGNEDcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:35:9`! 0xffff |
| 36 | #define GRN_PAT_MAX_SEGMENTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:36:9`! 0x1000 |
| 37 | #define GRN_PAT_MDELINFOScxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:37:9`! (GRN_PAT_NDELINFOScxx . . $ `storage/mroonga/vendor/groonga/lib/grn_pat.h:48:9`! - 1) |
| 38 | |
| 39 | #define GRN_PAT_BIN_KEYcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:39:9`! 0x70000 |
| 40 | |
| 41 | typedef structcxx . . $ $anonymous_type_40923699c27225f7_0# { |
| 42 | grn_idcxx . . $ grn_id# lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[2]; |
| 43 | /* |
| 44 | lr[0]: the left node. |
| 45 | lr[1]: the right node. |
| 46 | |
| 47 | The left node has 0 at the nth bit at the nth byte. |
| 48 | The right node has 1 at the nth bit at the nth byte. |
| 49 | 'check' value indicate 'at the nth bit at the nth byte'. |
| 50 | |
| 51 | The both available nodes has larger check value rather |
| 52 | than the current node. |
| 53 | |
| 54 | The first node (PAT_AT(pat, GRN_ID_NIL, node)) has only |
| 55 | the right node and the node is the start point. |
| 56 | */ |
| 57 | uint32_tcxx . . $ uint32_t# keycxx . . $ $anonymous_type_40923699c27225f7_0#key.; |
| 58 | /* |
| 59 | PAT_IMD(node) == 0: key bytes offset in memory map. |
| 60 | PAT_IMD(node) == 1: the key bytes. |
| 61 | */ |
| 62 | uint16_tcxx . . $ uint16_t# checkcxx . . $ $anonymous_type_40923699c27225f7_0#check.; |
| 63 | /* |
| 64 | nth byte: 12, nth bit: 3, terminated: 1 |
| 65 | |
| 66 | nth byte is different in key bytes: (check >> 4): max == 4095 |
| 67 | the left most byte is the 0th byte and the right most byte is the 11th byte. |
| 68 | |
| 69 | nth bit is different in nth byte: ((check >> 1) & 0b111) |
| 70 | the left most bit is the 0th bit and the right most bit is the 7th bit. |
| 71 | |
| 72 | terminated: (check & 0b1) |
| 73 | terminated == 1: key is terminated. |
| 74 | */ |
| 75 | uint16_tcxx . . $ uint16_t# bitscxx . . $ $anonymous_type_40923699c27225f7_0#bits.; |
| 76 | /* length: 13, immediate: 1, deleting: 1 */ |
| 77 | } pat_nodecxx . . $ pat_node#; |
| 78 | |
| 79 | #define PAT_DELETINGcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:79:9`! (1<<1) |
| 80 | #define PAT_IMMEDIATEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:80:9`! (1<<2) |
| 81 | |
| 82 | #define PAT_DELcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:82:9`!(x) ((x)->bits & PAT_DELETINGcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:79:9`!) |
| 83 | #define PAT_IMDcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:83:9`!(x) ((x)->bits & PAT_IMMEDIATEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:80:9`!) |
| 84 | #define PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(x) (((x)->bits >> 3) + 1) |
| 85 | #define PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(x) ((x)->check) |
| 86 | #define PAT_DEL_ONcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:86:9`!(x) ((x)->bits |= PAT_DELETINGcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:79:9`!) |
| 87 | #define PAT_IMD_ONcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:87:9`!(x) ((x)->bits |= PAT_IMMEDIATEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:80:9`!) |
| 88 | #define PAT_DEL_OFFcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:88:9`!(x) ((x)->bits &= ~PAT_DELETINGcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:79:9`!) |
| 89 | #define PAT_IMD_OFFcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:89:9`!(x) ((x)->bits &= ~PAT_IMMEDIATEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:80:9`!) |
| 90 | #define PAT_LEN_SETcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:90:9`!(x,v) ((x)->bits = ((x)->bits & ((1<<3) - 1))|(((v) - 1) << 3)) |
| 91 | #define PAT_CHK_SETcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:91:9`!(x,v) ((x)->check = (v)) |
| 92 | |
| 93 | typedef structcxx . . $ $anonymous_type_40923699c27225f7_1# { |
| 94 | grn_idcxx . . $ grn_id# childrencxx . . $ $anonymous_type_40923699c27225f7_1#children.; |
| 95 | grn_idcxx . . $ grn_id# siblingcxx . . $ $anonymous_type_40923699c27225f7_1#sibling.; |
| 96 | } sis_nodecxx . . $ sis_node#; |
| 97 | |
| 98 | enumcxx . . $ $anonymous_type_40923699c27225f7_2# { |
| 99 | segment_keycxx . . $ segment_key. = 0, |
| 100 | segment_patcxx . . $ segment_pat. = 1, |
| 101 | segment_siscxx . . $ segment_sis. = 2 |
| 102 | }; |
| 103 | |
| 104 | void grn_p_pat_nodecxx . . $ grn_p_pat_node(2ab1d2ced3fc8d67).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, pat_nodecxx . . $ pat_node# *node); |
| 105 | |
| 106 | /* error utilities */ |
| 107 | inline static int |
| 108 | grn_pat_namecxx . . $ grn_pat_name(c8d94eb36b5767e5).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, char *buffer, int buffer_size) |
| 109 | { |
| 110 | int name_size; |
| 111 | |
| 112 | if (DB_OBJcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_db.h:325:9`!(pat)->idcxx . . $ $anonymous_type_9afa47707a1d1b6d_0#id. == GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!) { |
| 113 | grn_strcpycxx . . $ `storage/mroonga/vendor/groonga/include/groonga/portability.h:100:10`!(buffer, buffer_size, "(anonymous)"); |
| 114 | name_size = strlencxx . . $ strlen(751346f8406fd082).(buffer); |
| 115 | } else { |
| 116 | name_size = grn_obj_namecxx . . $ grn_obj_name(a51d1bff955f2f21).(ctx, (grn_objcxx . . $ grn_obj# *)pat, buffer, buffer_size); |
| 117 | } |
| 118 | |
| 119 | return name_size; |
| 120 | } |
| 121 | |
| 122 | /* bit operation */ |
| 123 | |
| 124 | #define nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!(key,n,l) ((((key)[(n)>>4]) >> (7 - (((n)>>1) & 7))) & 1) |
| 125 | |
| 126 | /* segment operation */ |
| 127 | |
| 128 | /* patricia array operation */ |
| 129 | |
| 130 | #define PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat,id,n) do {\ |
| 131 | int flags = 0;\ |
| 132 | GRN_IO_ARRAY_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_io.h:319:9`!(pat->io, segment_pat, id, &flags, n);\ |
| 133 | } while (0) |
| 134 | |
| 135 | inline static pat_nodecxx . . $ pat_node# * |
| 136 | pat_getcxx . . $ pat_get(babb1334df740bfa).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id) |
| 137 | { |
| 138 | pat_nodecxx . . $ pat_node# *res; |
| 139 | int flags = GRN_TABLE_ADDcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_io.h:152:9`!; |
| 140 | if (id > GRN_ID_MAXcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:42:9`!) { return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; } |
| 141 | GRN_IO_ARRAY_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_io.h:319:9`!(pat->io, segment_pat, id, &flags, res); |
| 142 | return res; |
| 143 | } |
| 144 | |
| 145 | /* sis operation */ |
| 146 | |
| 147 | inline static sis_nodecxx . . $ sis_node# * |
| 148 | sis_atcxx . . $ sis_at(59e5564d0351a00f).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id) |
| 149 | { |
| 150 | sis_nodecxx . . $ sis_node# *res; |
| 151 | int flags = 0; |
| 152 | if (id > GRN_ID_MAXcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:42:9`!) { return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; } |
| 153 | GRN_IO_ARRAY_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_io.h:319:9`!(pat->io, segment_sis, id, &flags, res); |
| 154 | return res; |
| 155 | } |
| 156 | |
| 157 | inline static sis_nodecxx . . $ sis_node# * |
| 158 | sis_getcxx . . $ sis_get(59e5564d0351a00f).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id) |
| 159 | { |
| 160 | sis_nodecxx . . $ sis_node# *res; |
| 161 | int flags = GRN_TABLE_ADDcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_io.h:152:9`!; |
| 162 | if (id > GRN_ID_MAXcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:42:9`!) { return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; } |
| 163 | GRN_IO_ARRAY_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_io.h:319:9`!(pat->io, segment_sis, id, &flags, res); |
| 164 | return res; |
| 165 | } |
| 166 | |
| 167 | #define MAX_LEVELcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:167:9`! 16 |
| 168 | |
| 169 | static void |
| 170 | sis_collectcxx . . $ sis_collect(ba654b20daabaf48).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_hashcxx . . $ grn_hash# *h, grn_idcxx . . $ grn_id# id, uint32_tcxx . . $ uint32_t# level) |
| 171 | { |
| 172 | uint32_tcxx . . $ uint32_t# *offset; |
| 173 | sis_nodecxx . . $ sis_node# *sl = sis_atcxx . . $ sis_at(59e5564d0351a00f).(ctx, pat, id); |
| 174 | if (sl) { |
| 175 | grn_idcxx . . $ grn_id# sid = sl->childrencxx . . $ $anonymous_type_40923699c27225f7_1#children.; |
| 176 | while (sid && sid != id) { |
| 177 | if (grn_hash_addcxx . . $ grn_hash_add(251a256fc515235e).(ctx, h, &sid, sizeof(grn_idcxx . . $ grn_id#), (void **) &offset, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) { |
| 178 | *offset = level; |
| 179 | if (level < MAX_LEVELcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:167:9`!) { sis_collectcxx . . $ sis_collect(ba654b20daabaf48).(ctx, pat, h, sid, level + 1); } |
| 180 | if (!(sl = sis_atcxx . . $ sis_at(59e5564d0351a00f).(ctx, pat, sid))) { break; } |
| 181 | sid = sl->siblingcxx . . $ $anonymous_type_40923699c27225f7_1#sibling.; |
| 182 | } else { |
| 183 | /* todo : must be handled */ |
| 184 | } |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | /* key operation */ |
| 190 | |
| 191 | #define KEY_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:191:9`!(pat,pos,ptr,addp) do {\ |
| 192 | int flags = addp;\ |
| 193 | GRN_IO_ARRAY_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_io.h:319:9`!(pat->io, segment_key, pos, &flags, ptr);\ |
| 194 | } while (0) |
| 195 | |
| 196 | inline static uint32_tcxx . . $ uint32_t# |
| 197 | key_putcxx . . $ key_put(65bd69877d58afce).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# len) |
| 198 | { |
| 199 | uint32_tcxx . . $ uint32_t# res, ts; |
| 200 | // if (len >= GRN_PAT_SEGMENT_SIZE) { return 0; /* error */ } |
| 201 | res = pat->headercxx . . $ _grn_pat#header.->curr_keycxx . . $ grn_pat_header#curr_key.; |
| 202 | if (res < GRN_PAT_MAX_TOTAL_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_pat.h:30:9`! && |
| 203 | len > GRN_PAT_MAX_TOTAL_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_pat.h:30:9`! - res) { |
| 204 | char name[GRN_TABLE_MAX_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:25:9`!]; |
| 205 | int name_size; |
| 206 | name_size = grn_pat_namecxx . . $ grn_pat_name(c8d94eb36b5767e5).(ctx, pat, name, GRN_TABLE_MAX_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:25:9`!); |
| 207 | ERRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:143:9`!(GRN_NOT_ENOUGH_SPACE, |
| 208 | "[pat][key][put] total key size is over: <%.*s>: " |
| 209 | "max=%u: current=%u: new key size=%u", |
| 210 | name_size, name, |
| 211 | GRN_PAT_MAX_TOTAL_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_pat.h:30:9`!, |
| 212 | res, |
| 213 | len); |
| 214 | return 0; |
| 215 | } |
| 216 | |
| 217 | ts = (res + len) >> W_OF_KEY_IN_A_SEGMENTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:29:9`!; |
| 218 | if (res >> W_OF_KEY_IN_A_SEGMENTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:29:9`! != ts) { |
| 219 | res = pat->headercxx . . $ _grn_pat#header.->curr_keycxx . . $ grn_pat_header#curr_key. = ts << W_OF_KEY_IN_A_SEGMENTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:29:9`!; |
| 220 | } |
| 221 | { |
| 222 | uint8_tcxx . . $ uint8_t# *dest; |
| 223 | KEY_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:191:9`!(pat, res, dest, GRN_TABLE_ADDcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_io.h:152:9`!); |
| 224 | if (!dest) { |
| 225 | char name[GRN_TABLE_MAX_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:25:9`!]; |
| 226 | int name_size; |
| 227 | name_size = grn_pat_namecxx . . $ grn_pat_name(c8d94eb36b5767e5).(ctx, pat, name, GRN_TABLE_MAX_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:25:9`!); |
| 228 | ERRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:143:9`!(GRN_NO_MEMORY_AVAILABLE, |
| 229 | "[pat][key][put] failed to allocate memory for new key: <%.*s>: " |
| 230 | "new offset:%u key size:%u", |
| 231 | name_size, name, |
| 232 | res, |
| 233 | len); |
| 234 | return 0; |
| 235 | } |
| 236 | grn_memcpycxx . . $ `storage/mroonga/vendor/groonga/include/groonga/portability.h:31:11`!(dest, key, len); |
| 237 | } |
| 238 | pat->headercxx . . $ _grn_pat#header.->curr_keycxx . . $ grn_pat_header#curr_key. += len; |
| 239 | return res; |
| 240 | } |
| 241 | |
| 242 | inline static uint8_tcxx . . $ uint8_t# * |
| 243 | pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, pat_nodecxx . . $ pat_node# *n) |
| 244 | { |
| 245 | if (PAT_IMDcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:83:9`!(n)) { |
| 246 | return (uint8_tcxx . . $ uint8_t# *) &n->keycxx . . $ $anonymous_type_40923699c27225f7_0#key.; |
| 247 | } else { |
| 248 | uint8_tcxx . . $ uint8_t# *res; |
| 249 | KEY_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:191:9`!(pat, n->key, res, 0); |
| 250 | return res; |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | inline static grn_rccxx . . $ grn_rc# |
| 255 | pat_node_set_keycxx . . $ pat_node_set_key(2952bcdd2cf1a35d).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, pat_nodecxx . . $ pat_node# *n, const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# len) |
| 256 | { |
| 257 | grn_rccxx . . $ grn_rc# rc; |
| 258 | if (!key || !len) { return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; } |
| 259 | PAT_LEN_SETcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:90:9`!(n, len); |
| 260 | if (len <= sizeof(uint32_tcxx . . $ uint32_t#)) { |
| 261 | PAT_IMD_ONcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:87:9`!(n); |
| 262 | grn_memcpycxx . . $ `storage/mroonga/vendor/groonga/include/groonga/portability.h:31:11`!(&n->key, key, len); |
| 263 | rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 264 | } else { |
| 265 | PAT_IMD_OFFcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:89:9`!(n); |
| 266 | n->keycxx . . $ $anonymous_type_40923699c27225f7_0#key. = key_putcxx . . $ key_put(65bd69877d58afce).(ctx, pat, key, len); |
| 267 | rc = ctx->rccxx . . $ _grn_ctx#rc.; |
| 268 | } |
| 269 | return rc; |
| 270 | } |
| 271 | |
| 272 | /* delinfo operation */ |
| 273 | |
| 274 | enumcxx . . $ $anonymous_type_40923699c27225f7_3# { |
| 275 | /* The delinfo is currently not used. */ |
| 276 | DL_EMPTYcxx . . $ DL_EMPTY. = 0, |
| 277 | /* |
| 278 | * stat->d refers to a deleting node (in a tree). |
| 279 | * The deletion requires an additional operation. |
| 280 | */ |
| 281 | DL_PHASE1cxx . . $ DL_PHASE1., |
| 282 | /* |
| 283 | * stat->d refers to a deleted node (not in a tree). |
| 284 | * The node is pending for safety. |
| 285 | */ |
| 286 | DL_PHASE2cxx . . $ DL_PHASE2. |
| 287 | }; |
| 288 | |
| 289 | inline static grn_pat_delinfocxx . . $ grn_pat_delinfo# * |
| 290 | delinfo_searchcxx . . $ delinfo_search(5b391e2b5c01ff85).(grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id) |
| 291 | { |
| 292 | int i; |
| 293 | grn_pat_delinfocxx . . $ grn_pat_delinfo# *di; |
| 294 | for (i = (pat->headercxx . . $ _grn_pat#header.->curr_del2cxx . . $ grn_pat_header#curr_del2.) & GRN_PAT_MDELINFOScxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:37:9`!; |
| 295 | i != pat->headercxx . . $ _grn_pat#header.->curr_delcxx . . $ grn_pat_header#curr_del.; |
| 296 | i = (i + 1) & GRN_PAT_MDELINFOScxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:37:9`!) { |
| 297 | di = &pat->headercxx . . $ _grn_pat#header.->delinfoscxx . . $ grn_pat_header#delinfos.[i]; |
| 298 | if (di->statcxx . . $ $anonymous_type_9faf28e2b8411563_0#stat. != DL_PHASE1cxx . . $ DL_PHASE1.) { continue; } |
| 299 | if (di->ldcxx . . $ $anonymous_type_9faf28e2b8411563_0#ld. == id) { return di; } |
| 300 | if (di->dcxx . . $ $anonymous_type_9faf28e2b8411563_0#d. == id) { return di; } |
| 301 | } |
| 302 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 303 | } |
| 304 | |
| 305 | inline static grn_rccxx . . $ grn_rc# |
| 306 | delinfo_turn_2cxx . . $ delinfo_turn_2(87f650bb21d2dd5c).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_pat_delinfocxx . . $ grn_pat_delinfo# *di) |
| 307 | { |
| 308 | grn_idcxx . . $ grn_id# d, *p = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 309 | pat_nodecxx . . $ pat_node# *ln, *dn; |
| 310 | // grn_log("delinfo_turn_2> di->d=%d di->ld=%d stat=%d", di->d, di->ld, di->stat); |
| 311 | if (di->statcxx . . $ $anonymous_type_9faf28e2b8411563_0#stat. != DL_PHASE1cxx . . $ DL_PHASE1.) { |
| 312 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 313 | } |
| 314 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, di->ld, ln); |
| 315 | if (!ln) { |
| 316 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 317 | } |
| 318 | d = di->dcxx . . $ $anonymous_type_9faf28e2b8411563_0#d.; |
| 319 | if (!d) { |
| 320 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 321 | } |
| 322 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, d, dn); |
| 323 | if (!dn) { |
| 324 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 325 | } |
| 326 | PAT_DEL_OFFcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:88:9`!(ln); |
| 327 | PAT_DEL_OFFcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:88:9`!(dn); |
| 328 | { |
| 329 | grn_idcxx . . $ grn_id# *p0; |
| 330 | pat_nodecxx . . $ pat_node# *rn; |
| 331 | int c0 = -1, c; |
| 332 | uint32_tcxx . . $ uint32_t# len = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(dn) * 16; |
| 333 | const uint8_tcxx . . $ uint8_t# *key = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, dn); |
| 334 | if (!key) { |
| 335 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 336 | } |
| 337 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, rn); |
| 338 | p0 = &rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 339 | for (;;) { |
| 340 | grn_idcxx . . $ grn_id# r = *p0; |
| 341 | if (!r) { |
| 342 | break; |
| 343 | } |
| 344 | if (r == d) { |
| 345 | p = p0; |
| 346 | break; |
| 347 | } |
| 348 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, r, rn); |
| 349 | if (!rn) { |
| 350 | return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; |
| 351 | } |
| 352 | c = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(rn); |
| 353 | if ((int) c <= (int) c0 || (int) len <= (int) c) { |
| 354 | break; |
| 355 | } |
| 356 | if (c & 1) { |
| 357 | p0 = (c + 1 < (int) len) ? &rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] : &rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 358 | } else { |
| 359 | p0 = &rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!((uint8_t *)key, c, len)]; |
| 360 | } |
| 361 | c0 = c; |
| 362 | } |
| 363 | } |
| 364 | if (p) { |
| 365 | PAT_CHK_SETcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:91:9`!(ln, PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(dn)); |
| 366 | ln->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] = dn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 367 | ln->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0] = dn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 368 | *p = di->ldcxx . . $ $anonymous_type_9faf28e2b8411563_0#ld.; |
| 369 | } else { |
| 370 | /* debug */ |
| 371 | int j; |
| 372 | grn_idcxx . . $ grn_id# dd; |
| 373 | grn_pat_delinfocxx . . $ grn_pat_delinfo# *ddi; |
| 374 | GRN_LOGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1112:9`!(ctx, GRN_LOG_DEBUG, "failed to find d=%d", d); |
| 375 | for (j = (pat->headercxx . . $ _grn_pat#header.->curr_del2cxx . . $ grn_pat_header#curr_del2. + 1) & GRN_PAT_MDELINFOScxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:37:9`!; |
| 376 | j != pat->headercxx . . $ _grn_pat#header.->curr_delcxx . . $ grn_pat_header#curr_del.; |
| 377 | j = (j + 1) & GRN_PAT_MDELINFOScxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:37:9`!) { |
| 378 | ddi = &pat->headercxx . . $ _grn_pat#header.->delinfoscxx . . $ grn_pat_header#delinfos.[j]; |
| 379 | if (ddi->statcxx . . $ $anonymous_type_9faf28e2b8411563_0#stat. != DL_PHASE1cxx . . $ DL_PHASE1.) { continue; } |
| 380 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, ddi->ld, ln); |
| 381 | if (!ln) { continue; } |
| 382 | if (!(dd = ddi->dcxx . . $ $anonymous_type_9faf28e2b8411563_0#d.)) { continue; } |
| 383 | if (d == ddi->ldcxx . . $ $anonymous_type_9faf28e2b8411563_0#ld.) { |
| 384 | GRN_LOGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1112:9`!(ctx, GRN_LOG_DEBUG, "found!!!, d(%d) become ld of (%d)", d, dd); |
| 385 | } |
| 386 | } |
| 387 | /* debug */ |
| 388 | } |
| 389 | di->statcxx . . $ $anonymous_type_9faf28e2b8411563_0#stat. = DL_PHASE2cxx . . $ DL_PHASE2.; |
| 390 | di->dcxx . . $ $anonymous_type_9faf28e2b8411563_0#d. = d; |
| 391 | // grn_log("delinfo_turn_2< di->d=%d di->ld=%d", di->d, di->ld); |
| 392 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 393 | } |
| 394 | |
| 395 | inline static grn_rccxx . . $ grn_rc# |
| 396 | delinfo_turn_3cxx . . $ delinfo_turn_3(87f650bb21d2dd5c).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_pat_delinfocxx . . $ grn_pat_delinfo# *di) |
| 397 | { |
| 398 | pat_nodecxx . . $ pat_node# *dn; |
| 399 | uint32_tcxx . . $ uint32_t# size; |
| 400 | if (di->statcxx . . $ $anonymous_type_9faf28e2b8411563_0#stat. != DL_PHASE2cxx . . $ DL_PHASE2.) { return GRN_SUCCESScxx . . $ GRN_SUCCESS.; } |
| 401 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, di->d, dn); |
| 402 | if (!dn) { return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; } |
| 403 | if (di->sharedcxx . . $ $anonymous_type_9faf28e2b8411563_0#shared.) { |
| 404 | PAT_IMD_ONcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:87:9`!(dn); |
| 405 | size = 0; |
| 406 | } else { |
| 407 | if (PAT_IMDcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:83:9`!(dn)) { |
| 408 | size = 0; |
| 409 | } else { |
| 410 | size = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(dn); |
| 411 | } |
| 412 | } |
| 413 | di->statcxx . . $ $anonymous_type_9faf28e2b8411563_0#stat. = DL_EMPTYcxx . . $ DL_EMPTY.; |
| 414 | // dn->lr[1] = GRN_PAT_DELETED; |
| 415 | dn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0] = pat->headercxx . . $ _grn_pat#header.->garbagescxx . . $ grn_pat_header#garbages.[size]; |
| 416 | pat->headercxx . . $ _grn_pat#header.->garbagescxx . . $ grn_pat_header#garbages.[size] = di->dcxx . . $ $anonymous_type_9faf28e2b8411563_0#d.; |
| 417 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 418 | } |
| 419 | |
| 420 | inline static grn_pat_delinfocxx . . $ grn_pat_delinfo# * |
| 421 | delinfo_newcxx . . $ delinfo_new(9e6821552ee78604).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 422 | { |
| 423 | grn_pat_delinfocxx . . $ grn_pat_delinfo# *res = &pat->headercxx . . $ _grn_pat#header.->delinfoscxx . . $ grn_pat_header#delinfos.[pat->headercxx . . $ _grn_pat#header.->curr_delcxx . . $ grn_pat_header#curr_del.]; |
| 424 | uint32_tcxx . . $ uint32_t# n = (pat->headercxx . . $ _grn_pat#header.->curr_delcxx . . $ grn_pat_header#curr_del. + 1) & GRN_PAT_MDELINFOScxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:37:9`!; |
| 425 | int gap = ((n + GRN_PAT_NDELINFOScxx . . $ `storage/mroonga/vendor/groonga/lib/grn_pat.h:48:9`! - pat->headercxx . . $ _grn_pat#header.->curr_del2cxx . . $ grn_pat_header#curr_del2.) & GRN_PAT_MDELINFOScxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:37:9`!) |
| 426 | - (GRN_PAT_NDELINFOScxx . . $ `storage/mroonga/vendor/groonga/lib/grn_pat.h:48:9`! / 2); |
| 427 | while (gap-- > 0) { |
| 428 | if (delinfo_turn_2cxx . . $ delinfo_turn_2(87f650bb21d2dd5c).(ctx, pat, &pat->headercxx . . $ _grn_pat#header.->delinfoscxx . . $ grn_pat_header#delinfos.[pat->headercxx . . $ _grn_pat#header.->curr_del2cxx . . $ grn_pat_header#curr_del2.])) { |
| 429 | GRN_LOGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1112:9`!(ctx, GRN_LOG_CRIT, "d2 failed: %d", pat->header->delinfos[pat->header->curr_del2].ld); |
| 430 | } |
| 431 | pat->headercxx . . $ _grn_pat#header.->curr_del2cxx . . $ grn_pat_header#curr_del2. = (pat->headercxx . . $ _grn_pat#header.->curr_del2cxx . . $ grn_pat_header#curr_del2. + 1) & GRN_PAT_MDELINFOScxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:37:9`!; |
| 432 | } |
| 433 | if ((int) n == (int) pat->headercxx . . $ _grn_pat#header.->curr_del3cxx . . $ grn_pat_header#curr_del3.) { |
| 434 | if (delinfo_turn_3cxx . . $ delinfo_turn_3(87f650bb21d2dd5c).(ctx, pat, &pat->headercxx . . $ _grn_pat#header.->delinfoscxx . . $ grn_pat_header#delinfos.[pat->headercxx . . $ _grn_pat#header.->curr_del3cxx . . $ grn_pat_header#curr_del3.])) { |
| 435 | GRN_LOGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1112:9`!(ctx, GRN_LOG_CRIT, "d3 failed: %d", pat->header->delinfos[pat->header->curr_del3].ld); |
| 436 | } |
| 437 | pat->headercxx . . $ _grn_pat#header.->curr_del3cxx . . $ grn_pat_header#curr_del3. = (pat->headercxx . . $ _grn_pat#header.->curr_del3cxx . . $ grn_pat_header#curr_del3. + 1) & GRN_PAT_MDELINFOScxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:37:9`!; |
| 438 | } |
| 439 | pat->headercxx . . $ _grn_pat#header.->curr_delcxx . . $ grn_pat_header#curr_del. = n; |
| 440 | return res; |
| 441 | } |
| 442 | |
| 443 | /* pat operation */ |
| 444 | |
| 445 | inline static grn_patcxx . . $ grn_pat# * |
| 446 | _grn_pat_createcxx . . $ _grn_pat_create(594a7f81b5682355).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, |
| 447 | const char *path, uint32_tcxx . . $ uint32_t# key_size, |
| 448 | uint32_tcxx . . $ uint32_t# value_size, uint32_tcxx . . $ uint32_t# flags) { |
| 449 | grn_iocxx . . $ grn_io# *io; |
| 450 | pat_nodecxx . . $ pat_node# *node0; |
| 451 | struct grn_pat_headercxx . . $ grn_pat_header# *header; |
| 452 | uint32_tcxx . . $ uint32_t# entry_size, w_of_element; |
| 453 | grn_encodingcxx . . $ grn_encoding# encoding = ctx->encodingcxx . . $ _grn_ctx#encoding.; |
| 454 | if (flags & GRN_OBJ_KEY_WITH_SIScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:305:9`!) { |
| 455 | entry_size = sizeof(sis_nodecxx . . $ sis_node#) + value_size; |
| 456 | } else { |
| 457 | entry_size = value_size; |
| 458 | } |
| 459 | for (w_of_element = 0; (1 << w_of_element) < entry_size; w_of_element++) { |
| 460 | /* nop */ |
| 461 | } |
| 462 | { |
| 463 | grn_io_array_speccxx . . $ grn_io_array_spec# array_spec[3]; |
| 464 | array_spec[segment_keycxx . . $ segment_key.].w_of_elementcxx . . $ _grn_io_array_spec#w_of_element. = 0; |
| 465 | array_spec[segment_keycxx . . $ segment_key.].max_n_segmentscxx . . $ _grn_io_array_spec#max_n_segments. = 0x400; |
| 466 | array_spec[segment_patcxx . . $ segment_pat.].w_of_elementcxx . . $ _grn_io_array_spec#w_of_element. = 4; |
| 467 | array_spec[segment_patcxx . . $ segment_pat.].max_n_segmentscxx . . $ _grn_io_array_spec#max_n_segments. = 1 << (30 - (22 - 4)); |
| 468 | array_spec[segment_siscxx . . $ segment_sis.].w_of_elementcxx . . $ _grn_io_array_spec#w_of_element. = w_of_element; |
| 469 | array_spec[segment_siscxx . . $ segment_sis.].max_n_segmentscxx . . $ _grn_io_array_spec#max_n_segments. = 1 << (30 - (22 - w_of_element)); |
| 470 | io = grn_io_create_with_arraycxx . . $ grn_io_create_with_array(878445e8291bbc58).(ctx, path, sizeof(struct grn_pat_headercxx . . $ grn_pat_header#), |
| 471 | GRN_PAT_SEGMENT_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:28:9`!, grn_io_autocxx . . $ grn_io_auto., 3, array_spec); |
| 472 | } |
| 473 | if (!io) { return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; } |
| 474 | if (encoding == GRN_ENC_DEFAULTcxx . . $ GRN_ENC_DEFAULT.) { encoding = grn_gctxcxx . . $ grn_gctx..encodingcxx . . $ _grn_ctx#encoding.; } |
| 475 | header = grn_io_headercxx . . $ grn_io_header(611b9b393b7178f5).(io); |
| 476 | grn_io_set_typecxx . . $ grn_io_set_type(d505e6e1d36b3afe).(io, GRN_TABLE_PAT_KEYcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:381:9`!); |
| 477 | header->flagscxx . . $ grn_pat_header#flags. = flags; |
| 478 | header->encodingcxx . . $ grn_pat_header#encoding. = encoding; |
| 479 | header->key_sizecxx . . $ grn_pat_header#key_size. = key_size; |
| 480 | header->value_sizecxx . . $ grn_pat_header#value_size. = value_size; |
| 481 | header->n_entriescxx . . $ grn_pat_header#n_entries. = 0; |
| 482 | header->curr_reccxx . . $ grn_pat_header#curr_rec. = 0; |
| 483 | header->curr_keycxx . . $ grn_pat_header#curr_key. = 0; |
| 484 | header->curr_delcxx . . $ grn_pat_header#curr_del. = 0; |
| 485 | header->curr_del2cxx . . $ grn_pat_header#curr_del2. = 0; |
| 486 | header->curr_del3cxx . . $ grn_pat_header#curr_del3. = 0; |
| 487 | header->n_garbagescxx . . $ grn_pat_header#n_garbages. = 0; |
| 488 | header->tokenizercxx . . $ grn_pat_header#tokenizer. = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 489 | if (header->flagscxx . . $ grn_pat_header#flags. & GRN_OBJ_KEY_NORMALIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:306:9`!) { |
| 490 | header->flagscxx . . $ grn_pat_header#flags. &= ~GRN_OBJ_KEY_NORMALIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:306:9`!; |
| 491 | pat->normalizercxx . . $ _grn_pat#normalizer. = grn_ctx_getcxx . . $ grn_ctx_get(70fde0087014f9ea).(ctx, GRN_NORMALIZER_AUTO_NAMEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_normalizer.h:29:9`!, -1); |
| 492 | header->normalizercxx . . $ grn_pat_header#normalizer. = grn_obj_idcxx . . $ grn_obj_id(8dd58acc9865e889).(ctx, pat->normalizercxx . . $ _grn_pat#normalizer.); |
| 493 | } else { |
| 494 | pat->normalizercxx . . $ _grn_pat#normalizer. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 495 | header->normalizercxx . . $ grn_pat_header#normalizer. = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 496 | } |
| 497 | header->truncatedcxx . . $ grn_pat_header#truncated. = GRN_FALSEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:45:9`!; |
| 498 | GRN_PTR_INITcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1330:9`!(&(pat->token_filters), GRN_OBJ_VECTORcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1263:9`!, GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!); |
| 499 | pat->iocxx . . $ _grn_pat#io. = io; |
| 500 | pat->headercxx . . $ _grn_pat#header. = header; |
| 501 | pat->key_sizecxx . . $ _grn_pat#key_size. = key_size; |
| 502 | pat->value_sizecxx . . $ _grn_pat#value_size. = value_size; |
| 503 | pat->tokenizercxx . . $ _grn_pat#tokenizer. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 504 | pat->encodingcxx . . $ _grn_pat#encoding. = encoding; |
| 505 | pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. = header->flagscxx . . $ grn_pat_header#flags.; |
| 506 | if (!(node0 = pat_getcxx . . $ pat_get(babb1334df740bfa).(ctx, pat, 0))) { |
| 507 | grn_io_closecxx . . $ grn_io_close(117c07c672382ce3).(ctx, io); |
| 508 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 509 | } |
| 510 | node0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] = 0; |
| 511 | node0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0] = 0; |
| 512 | node0->keycxx . . $ $anonymous_type_40923699c27225f7_0#key. = 0; |
| 513 | return pat; |
| 514 | } |
| 515 | |
| 516 | grn_patcxx . . $ grn_pat# * |
| 517 | grn_pat_createcxx . . $ grn_pat_create(c536c63c37081863).(grn_ctxcxx . . $ grn_ctx# *ctx, const char *path, uint32_tcxx . . $ uint32_t# key_size, |
| 518 | uint32_tcxx . . $ uint32_t# value_size, uint32_tcxx . . $ uint32_t# flags) |
| 519 | { |
| 520 | grn_patcxx . . $ grn_pat# *pat; |
| 521 | if (!(pat = GRN_CALLOCcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:39:9`!(sizeof(grn_pat)))) { |
| 522 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 523 | } |
| 524 | GRN_DB_OBJ_SET_TYPEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:476:9`!(pat, GRN_TABLE_PAT_KEYcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:381:9`!); |
| 525 | if (!_grn_pat_createcxx . . $ _grn_pat_create(594a7f81b5682355).(ctx, pat, path, key_size, value_size, flags)) { |
| 526 | GRN_FREEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:46:9`!(pat); |
| 527 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 528 | } |
| 529 | pat->cachecxx . . $ _grn_pat#cache. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 530 | pat->cache_sizecxx . . $ _grn_pat#cache_size. = 0; |
| 531 | pat->is_dirtycxx . . $ _grn_pat#is_dirty. = GRN_FALSEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:45:9`!; |
| 532 | CRITICAL_SECTION_INITcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:234:10`!(pat->lock); |
| 533 | return pat; |
| 534 | } |
| 535 | |
| 536 | /* |
| 537 | grn_pat_cache_enable() and grn_pat_cache_disable() are not thread-safe. |
| 538 | So far, they can be used only from single threaded programs. |
| 539 | */ |
| 540 | |
| 541 | grn_rccxx . . $ grn_rc# |
| 542 | grn_pat_cache_enablecxx . . $ grn_pat_cache_enable(39634e5b6eb066c6).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, uint32_tcxx . . $ uint32_t# cache_size) |
| 543 | { |
| 544 | if (pat->cachecxx . . $ _grn_pat#cache. || pat->cache_sizecxx . . $ _grn_pat#cache_size.) { |
| 545 | ERRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:143:9`!(GRN_INVALID_ARGUMENT, "cache is already enabled"); |
| 546 | return ctx->rccxx . . $ _grn_ctx#rc.; |
| 547 | } |
| 548 | if (cache_size & (cache_size - 1)) { |
| 549 | ERRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:143:9`!(GRN_INVALID_ARGUMENT, "cache_size(%u) must be a power of two", cache_size); |
| 550 | return ctx->rccxx . . $ _grn_ctx#rc.; |
| 551 | } |
| 552 | if (!(pat->cachecxx . . $ _grn_pat#cache. = GRN_CALLOCcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:39:9`!(cache_size * sizeof(grn_id)))) { |
| 553 | return ctx->rccxx . . $ _grn_ctx#rc.; |
| 554 | } |
| 555 | pat->cache_sizecxx . . $ _grn_pat#cache_size. = cache_size; |
| 556 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 557 | } |
| 558 | |
| 559 | void |
| 560 | grn_pat_cache_disablecxx . . $ grn_pat_cache_disable(ff189d7ae511a139).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 561 | { |
| 562 | if (pat->cachecxx . . $ _grn_pat#cache.) { |
| 563 | GRN_FREEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:46:9`!(pat->cache); |
| 564 | pat->cache_sizecxx . . $ _grn_pat#cache_size. = 0; |
| 565 | pat->cachecxx . . $ _grn_pat#cache. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | grn_patcxx . . $ grn_pat# * |
| 570 | grn_pat_opencxx . . $ grn_pat_open(241ef12f9e92a2a).(grn_ctxcxx . . $ grn_ctx# *ctx, const char *path) |
| 571 | { |
| 572 | grn_iocxx . . $ grn_io# *io; |
| 573 | grn_patcxx . . $ grn_pat# *pat; |
| 574 | pat_nodecxx . . $ pat_node# *node0; |
| 575 | struct grn_pat_headercxx . . $ grn_pat_header# *header; |
| 576 | uint32_tcxx . . $ uint32_t# io_type; |
| 577 | io = grn_io_opencxx . . $ grn_io_open(f25995ba89d9e599).(ctx, path, grn_io_autocxx . . $ grn_io_auto.); |
| 578 | if (!io) { return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; } |
| 579 | header = grn_io_headercxx . . $ grn_io_header(611b9b393b7178f5).(io); |
| 580 | io_type = grn_io_get_typecxx . . $ grn_io_get_type(ee95b3f473df551b).(io); |
| 581 | if (io_type != GRN_TABLE_PAT_KEYcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:381:9`!) { |
| 582 | ERRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:143:9`!(GRN_INVALID_FORMAT, "[table][pat] file type must be %#04x: <%#04x>", |
| 583 | GRN_TABLE_PAT_KEYcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:381:9`!, io_type); |
| 584 | grn_io_closecxx . . $ grn_io_close(117c07c672382ce3).(ctx, io); |
| 585 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 586 | } |
| 587 | if (!(pat = GRN_MALLOCcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:38:9`!(sizeof(grn_pat)))) { |
| 588 | grn_io_closecxx . . $ grn_io_close(117c07c672382ce3).(ctx, io); |
| 589 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 590 | } |
| 591 | GRN_DB_OBJ_SET_TYPEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:476:9`!(pat, GRN_TABLE_PAT_KEYcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:381:9`!); |
| 592 | pat->iocxx . . $ _grn_pat#io. = io; |
| 593 | pat->headercxx . . $ _grn_pat#header. = header; |
| 594 | pat->key_sizecxx . . $ _grn_pat#key_size. = header->key_sizecxx . . $ grn_pat_header#key_size.; |
| 595 | pat->value_sizecxx . . $ _grn_pat#value_size. = header->value_sizecxx . . $ grn_pat_header#value_size.; |
| 596 | pat->encodingcxx . . $ _grn_pat#encoding. = header->encodingcxx . . $ grn_pat_header#encoding.; |
| 597 | pat->tokenizercxx . . $ _grn_pat#tokenizer. = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, header->tokenizercxx . . $ grn_pat_header#tokenizer.); |
| 598 | if (header->flagscxx . . $ grn_pat_header#flags. & GRN_OBJ_KEY_NORMALIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:306:9`!) { |
| 599 | header->flagscxx . . $ grn_pat_header#flags. &= ~GRN_OBJ_KEY_NORMALIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:306:9`!; |
| 600 | pat->normalizercxx . . $ _grn_pat#normalizer. = grn_ctx_getcxx . . $ grn_ctx_get(70fde0087014f9ea).(ctx, GRN_NORMALIZER_AUTO_NAMEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_normalizer.h:29:9`!, -1); |
| 601 | header->normalizercxx . . $ grn_pat_header#normalizer. = grn_obj_idcxx . . $ grn_obj_id(8dd58acc9865e889).(ctx, pat->normalizercxx . . $ _grn_pat#normalizer.); |
| 602 | } else { |
| 603 | pat->normalizercxx . . $ _grn_pat#normalizer. = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, header->normalizercxx . . $ grn_pat_header#normalizer.); |
| 604 | } |
| 605 | GRN_PTR_INITcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1330:9`!(&(pat->token_filters), GRN_OBJ_VECTORcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1263:9`!, GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!); |
| 606 | pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. = header->flagscxx . . $ grn_pat_header#flags.; |
| 607 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, node0); |
| 608 | if (!node0) { |
| 609 | grn_io_closecxx . . $ grn_io_close(117c07c672382ce3).(ctx, io); |
| 610 | GRN_FREEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:46:9`!(pat); |
| 611 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 612 | } |
| 613 | pat->cachecxx . . $ _grn_pat#cache. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 614 | pat->cache_sizecxx . . $ _grn_pat#cache_size. = 0; |
| 615 | pat->is_dirtycxx . . $ _grn_pat#is_dirty. = GRN_FALSEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:45:9`!; |
| 616 | CRITICAL_SECTION_INITcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:234:10`!(pat->lock); |
| 617 | return pat; |
| 618 | } |
| 619 | |
| 620 | /* |
| 621 | * grn_pat_error_if_truncated() logs an error and returns its error code if |
| 622 | * a pat is truncated by another process. |
| 623 | * Otherwise, this function returns GRN_SUCCESS. |
| 624 | * Note that `ctx` and `pat` must be valid. |
| 625 | * |
| 626 | * FIXME: A pat should be reopened if possible. |
| 627 | */ |
| 628 | static grn_rccxx . . $ grn_rc# |
| 629 | grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 630 | { |
| 631 | if (pat->headercxx . . $ _grn_pat#header.->truncatedcxx . . $ grn_pat_header#truncated.) { |
| 632 | ERRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:143:9`!(GRN_FILE_CORRUPT, |
| 633 | "pat is truncated, please unmap or reopen the database"); |
| 634 | return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; |
| 635 | } |
| 636 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 637 | } |
| 638 | |
| 639 | grn_rccxx . . $ grn_rc# |
| 640 | grn_pat_closecxx . . $ grn_pat_close(6044f5e1d38adedf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 641 | { |
| 642 | grn_rccxx . . $ grn_rc# rc; |
| 643 | |
| 644 | CRITICAL_SECTION_FINcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:237:10`!(pat->lock); |
| 645 | |
| 646 | if (pat->is_dirtycxx . . $ _grn_pat#is_dirty.) { |
| 647 | uint32_tcxx . . $ uint32_t# n_dirty_opens; |
| 648 | GRN_ATOMIC_ADD_EXcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:484:11`!(&(pat->header->n_dirty_opens), -1, n_dirty_opens); |
| 649 | } |
| 650 | |
| 651 | if ((rc = grn_io_closecxx . . $ grn_io_close(117c07c672382ce3).(ctx, pat->iocxx . . $ _grn_pat#io.))) { |
| 652 | ERRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:143:9`!(rc, "grn_io_close failed"); |
| 653 | } else { |
| 654 | grn_pvector_fincxx . . $ grn_pvector_fin(4865d068a46d0f83).(ctx, &pat->token_filterscxx . . $ _grn_pat#token_filters.); |
| 655 | if (pat->cachecxx . . $ _grn_pat#cache.) { grn_pat_cache_disablecxx . . $ grn_pat_cache_disable(ff189d7ae511a139).(ctx, pat); } |
| 656 | GRN_FREEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:46:9`!(pat); |
| 657 | } |
| 658 | |
| 659 | return rc; |
| 660 | } |
| 661 | |
| 662 | grn_rccxx . . $ grn_rc# |
| 663 | grn_pat_removecxx . . $ grn_pat_remove(cae1c943be750b4c).(grn_ctxcxx . . $ grn_ctx# *ctx, const char *path) |
| 664 | { |
| 665 | if (!path) { |
| 666 | ERRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:143:9`!(GRN_INVALID_ARGUMENT, "path is null"); |
| 667 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 668 | } |
| 669 | return grn_io_removecxx . . $ grn_io_remove(cae1c943be750b4c).(ctx, path); |
| 670 | } |
| 671 | |
| 672 | grn_rccxx . . $ grn_rc# |
| 673 | grn_pat_truncatecxx . . $ grn_pat_truncate(6044f5e1d38adedf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 674 | { |
| 675 | grn_rccxx . . $ grn_rc# rc; |
| 676 | const char *io_path; |
| 677 | char *path; |
| 678 | uint32_tcxx . . $ uint32_t# key_size, value_size, flags; |
| 679 | |
| 680 | rc = grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat); |
| 681 | if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 682 | return rc; |
| 683 | } |
| 684 | if ((io_path = grn_io_pathcxx . . $ grn_io_path(53b2e212b3c13636).(pat->iocxx . . $ _grn_pat#io.)) && *io_path != '\0') { |
| 685 | if (!(path = GRN_STRDUPcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:41:9`!(io_path))) { |
| 686 | ERRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:143:9`!(GRN_NO_MEMORY_AVAILABLE, "cannot duplicate path: <%s>", io_path); |
| 687 | return GRN_NO_MEMORY_AVAILABLEcxx . . $ GRN_NO_MEMORY_AVAILABLE.; |
| 688 | } |
| 689 | } else { |
| 690 | path = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 691 | } |
| 692 | key_size = pat->key_sizecxx . . $ _grn_pat#key_size.; |
| 693 | value_size = pat->value_sizecxx . . $ _grn_pat#value_size.; |
| 694 | flags = pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags.; |
| 695 | if (path) { |
| 696 | pat->headercxx . . $ _grn_pat#header.->truncatedcxx . . $ grn_pat_header#truncated. = GRN_TRUEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:44:9`!; |
| 697 | } |
| 698 | if ((rc = grn_io_closecxx . . $ grn_io_close(117c07c672382ce3).(ctx, pat->iocxx . . $ _grn_pat#io.))) { goto exit; } |
| 699 | grn_pvector_fincxx . . $ grn_pvector_fin(4865d068a46d0f83).(ctx, &pat->token_filterscxx . . $ _grn_pat#token_filters.); |
| 700 | pat->iocxx . . $ _grn_pat#io. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 701 | if (path && (rc = grn_io_removecxx . . $ grn_io_remove(cae1c943be750b4c).(ctx, path))) { goto exit; } |
| 702 | if (!_grn_pat_createcxx . . $ _grn_pat_create(594a7f81b5682355).(ctx, pat, path, key_size, value_size, flags)) { |
| 703 | rc = GRN_UNKNOWN_ERRORcxx . . $ GRN_UNKNOWN_ERROR.; |
| 704 | } |
| 705 | if (pat->cachecxx . . $ _grn_pat#cache. && pat->cache_sizecxx . . $ _grn_pat#cache_size.) { |
| 706 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(pat->cachecxx . . $ _grn_pat#cache., 0, pat->cache_sizecxx . . $ _grn_pat#cache_size. * sizeof(grn_idcxx . . $ grn_id#)); |
| 707 | } |
| 708 | exit: |
| 709 | if (path) { GRN_FREEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:46:9`!(path); } |
| 710 | return rc; |
| 711 | } |
| 712 | |
| 713 | inline static grn_idcxx . . $ grn_id# |
| 714 | _grn_pat_addcxx . . $ _grn_pat_add(19444550e212bc0).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# size, uint32_tcxx . . $ uint32_t# *new, uint32_tcxx . . $ uint32_t# *lkey) |
| 715 | { |
| 716 | grn_idcxx . . $ grn_id# r, r0, *p0, *p1 = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 717 | pat_nodecxx . . $ pat_node# *rn, *rn0; |
| 718 | int c, c0 = -1, c1 = -1, len; |
| 719 | uint32_tcxx . . $ uint32_t# cache_id = 0; |
| 720 | |
| 721 | *new = 0; |
| 722 | if (pat->cachecxx . . $ _grn_pat#cache.) { |
| 723 | const uint8_tcxx . . $ uint8_t# *p = key; |
| 724 | uint32_tcxx . . $ uint32_t# length = size; |
| 725 | for (cache_id = 0; length--; p++) { cache_id = (cache_id * 37) + *p; } |
| 726 | cache_id &= (pat->cache_sizecxx . . $ _grn_pat#cache_size. - 1); |
| 727 | if (pat->cachecxx . . $ _grn_pat#cache.[cache_id]) { |
| 728 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, pat->cache[cache_id], rn); |
| 729 | if (rn) { |
| 730 | const uint8_tcxx . . $ uint8_t# *k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rn); |
| 731 | if (k && size == PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(rn) && !memcmpcxx . . $ memcmp(36f949851efa3055).(k, key, size)) { |
| 732 | return pat->cachecxx . . $ _grn_pat#cache.[cache_id]; |
| 733 | } |
| 734 | } |
| 735 | } |
| 736 | } |
| 737 | |
| 738 | len = (int)size * 16; |
| 739 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, rn0); |
| 740 | p0 = &rn0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 741 | if (*p0) { |
| 742 | uint32_tcxx . . $ uint32_t# size2; |
| 743 | int xor, mask; |
| 744 | const uint8_tcxx . . $ uint8_t# *s, *d; |
| 745 | for (;;) { |
| 746 | if (!(r0 = *p0)) { |
| 747 | if (!(s = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rn0))) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 748 | size2 = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(rn0); |
| 749 | break; |
| 750 | } |
| 751 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, r0, rn0); |
| 752 | if (!rn0) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 753 | if (c0 < rn0->checkcxx . . $ $anonymous_type_40923699c27225f7_0#check. && rn0->checkcxx . . $ $anonymous_type_40923699c27225f7_0#check. < len) { |
| 754 | c1 = c0; c0 = rn0->checkcxx . . $ $anonymous_type_40923699c27225f7_0#check.; |
| 755 | p1 = p0; |
| 756 | if (c0 & 1) { |
| 757 | p0 = (c0 + 1 < len) ? &rn0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] : &rn0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 758 | } else { |
| 759 | p0 = &rn0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!(key, c0, len)]; |
| 760 | } |
| 761 | } else { |
| 762 | if (!(s = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rn0))) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 763 | size2 = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(rn0); |
| 764 | if (size == size2 && !memcmpcxx . . $ memcmp(36f949851efa3055).(s, key, size)) { |
| 765 | if (pat->cachecxx . . $ _grn_pat#cache.) { pat->cachecxx . . $ _grn_pat#cache.[cache_id] = r0; } |
| 766 | return r0; |
| 767 | } |
| 768 | break; |
| 769 | } |
| 770 | } |
| 771 | { |
| 772 | uint32_tcxx . . $ uint32_t# min = size > size2 ? size2 : size; |
| 773 | for (c = 0, d = key; min && *s == *d; c += 16, s++, d++, min--); |
| 774 | if (min) { |
| 775 | for (xor = *s ^ *d, mask = 0x80; !(xor & mask); mask >>= 1, c += 2); |
| 776 | } else { |
| 777 | c--; |
| 778 | } |
| 779 | } |
| 780 | if (c == c0 && !*p0) { |
| 781 | if (c < len - 2) { c += 2; } |
| 782 | } else { |
| 783 | if (c < c0) { |
| 784 | if (c > c1) { |
| 785 | p0 = p1; |
| 786 | } else { |
| 787 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, rn0); |
| 788 | p0 = &rn0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 789 | while ((r0 = *p0)) { |
| 790 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, r0, rn0); |
| 791 | if (!rn0) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 792 | c0 = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(rn0); |
| 793 | if (c < c0) { break; } |
| 794 | if (c0 & 1) { |
| 795 | p0 = (c0 + 1 < len) ? &rn0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] : &rn0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 796 | } else { |
| 797 | p0 = &rn0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!(key, c0, len)]; |
| 798 | } |
| 799 | } |
| 800 | } |
| 801 | } |
| 802 | } |
| 803 | if (c >= len) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 804 | } else { |
| 805 | c = len - 2; |
| 806 | } |
| 807 | { |
| 808 | uint32_tcxx . . $ uint32_t# size2 = size > sizeof(uint32_tcxx . . $ uint32_t#) ? size : 0; |
| 809 | if (*lkey && size2) { |
| 810 | if (pat->headercxx . . $ _grn_pat#header.->garbagescxx . . $ grn_pat_header#garbages.[0]) { |
| 811 | r = pat->headercxx . . $ _grn_pat#header.->garbagescxx . . $ grn_pat_header#garbages.[0]; |
| 812 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, r, rn); |
| 813 | if (!rn) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 814 | pat->headercxx . . $ _grn_pat#header.->n_entriescxx . . $ grn_pat_header#n_entries.++; |
| 815 | pat->headercxx . . $ _grn_pat#header.->n_garbagescxx . . $ grn_pat_header#n_garbages.--; |
| 816 | pat->headercxx . . $ _grn_pat#header.->garbagescxx . . $ grn_pat_header#garbages.[0] = rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 817 | } else { |
| 818 | r = pat->headercxx . . $ _grn_pat#header.->curr_reccxx . . $ grn_pat_header#curr_rec. + 1; |
| 819 | rn = pat_getcxx . . $ pat_get(babb1334df740bfa).(ctx, pat, r); |
| 820 | if (!rn) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 821 | pat->headercxx . . $ _grn_pat#header.->curr_reccxx . . $ grn_pat_header#curr_rec. = r; |
| 822 | pat->headercxx . . $ _grn_pat#header.->n_entriescxx . . $ grn_pat_header#n_entries.++; |
| 823 | } |
| 824 | PAT_IMD_OFFcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:89:9`!(rn); |
| 825 | PAT_LEN_SETcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:90:9`!(rn, size); |
| 826 | rn->keycxx . . $ $anonymous_type_40923699c27225f7_0#key. = *lkey; |
| 827 | } else { |
| 828 | if (pat->headercxx . . $ _grn_pat#header.->garbagescxx . . $ grn_pat_header#garbages.[size2]) { |
| 829 | uint8_tcxx . . $ uint8_t# *keybuf; |
| 830 | r = pat->headercxx . . $ _grn_pat#header.->garbagescxx . . $ grn_pat_header#garbages.[size2]; |
| 831 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, r, rn); |
| 832 | if (!rn) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 833 | if (!(keybuf = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rn))) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 834 | pat->headercxx . . $ _grn_pat#header.->n_entriescxx . . $ grn_pat_header#n_entries.++; |
| 835 | pat->headercxx . . $ _grn_pat#header.->n_garbagescxx . . $ grn_pat_header#n_garbages.--; |
| 836 | pat->headercxx . . $ _grn_pat#header.->garbagescxx . . $ grn_pat_header#garbages.[size2] = rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 837 | PAT_LEN_SETcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:90:9`!(rn, size); |
| 838 | grn_memcpycxx . . $ `storage/mroonga/vendor/groonga/include/groonga/portability.h:31:11`!(keybuf, key, size); |
| 839 | } else { |
| 840 | r = pat->headercxx . . $ _grn_pat#header.->curr_reccxx . . $ grn_pat_header#curr_rec. + 1; |
| 841 | rn = pat_getcxx . . $ pat_get(babb1334df740bfa).(ctx, pat, r); |
| 842 | if (!rn) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 843 | if (pat_node_set_keycxx . . $ pat_node_set_key(2952bcdd2cf1a35d).(ctx, pat, rn, key, size)) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 844 | pat->headercxx . . $ _grn_pat#header.->curr_reccxx . . $ grn_pat_header#curr_rec. = r; |
| 845 | pat->headercxx . . $ _grn_pat#header.->n_entriescxx . . $ grn_pat_header#n_entries.++; |
| 846 | } |
| 847 | *lkey = rn->keycxx . . $ $anonymous_type_40923699c27225f7_0#key.; |
| 848 | } |
| 849 | } |
| 850 | PAT_CHK_SETcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:91:9`!(rn, c); |
| 851 | PAT_DEL_OFFcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:88:9`!(rn); |
| 852 | if ((c & 1) ? (c + 1 < len) : nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!(key, c, len)) { |
| 853 | rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] = r; |
| 854 | rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0] = *p0; |
| 855 | } else { |
| 856 | rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] = *p0; |
| 857 | rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0] = r; |
| 858 | } |
| 859 | // smp_wmb(); |
| 860 | *p0 = r; |
| 861 | *new = 1; |
| 862 | if (pat->cachecxx . . $ _grn_pat#cache.) { pat->cachecxx . . $ _grn_pat#cache.[cache_id] = r; } |
| 863 | return r; |
| 864 | } |
| 865 | |
| 866 | inline static grn_boolcxx . . $ grn_bool# |
| 867 | chopcxx . . $ chop(aabb55c024fea822).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const char **key, const char *end, uint32_tcxx . . $ uint32_t# *lkey) |
| 868 | { |
| 869 | size_t len = grn_charlencxx . . $ grn_charlen(d229e8bf7c87f0f0).(ctx, *key, end); |
| 870 | if (len) { |
| 871 | *lkey += len; |
| 872 | *key += len; |
| 873 | return (end - *key) > 0; |
| 874 | } else { |
| 875 | return GRN_FALSEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:45:9`!; |
| 876 | } |
| 877 | } |
| 878 | |
| 879 | #define MAX_FIXED_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:879:9`! (sizeof(int64_t)) |
| 880 | |
| 881 | #define KEY_NEEDS_CONVERTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:881:9`!(pat,size) \ |
| 882 | (!((pat)->obj.header.flags & GRN_OBJ_KEY_VAR_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:342:9`!) && (size_t) (size) <= MAX_FIXED_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:879:9`!) |
| 883 | |
| 884 | #define KEY_ENCcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:884:9`!(pat,keybuf,key,size) do {\ |
| 885 | switch ((pat)->obj.header.flags & GRN_OBJ_KEY_MASKcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:299:9`!) {\ |
| 886 | case GRN_OBJ_KEY_UINTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:300:9`! :\ |
| 887 | if (((pat)->obj.header.domain != GRN_DB_TOKYO_GEO_POINT) &&\ |
| 888 | ((pat)->obj.header.domain != GRN_DB_WGS84_GEO_POINT)) {\ |
| 889 | grn_htoncxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:622:10`!((keybuf), (key), (size));\ |
| 890 | break;\ |
| 891 | }\ |
| 892 | case GRN_OBJ_KEY_GEO_POINTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:303:9`! :\ |
| 893 | grn_gtoncxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:674:9`!((keybuf), (key), (size));\ |
| 894 | break;\ |
| 895 | case GRN_OBJ_KEY_INTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:301:9`! :\ |
| 896 | grn_htoncxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:622:10`!((keybuf), (key), (size));\ |
| 897 | *((uint8_t *)(keybuf)) ^= 0x80;\ |
| 898 | break;\ |
| 899 | case GRN_OBJ_KEY_FLOATcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:302:9`! :\ |
| 900 | if ((size) == sizeof(int64_t)) {\ |
| 901 | int64_t v = *(int64_t *)(key);\ |
| 902 | v ^= ((v >> 63)|(1ULL << 63));\ |
| 903 | grn_htoncxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:622:10`!((keybuf), &v, (size));\ |
| 904 | }\ |
| 905 | break;\ |
| 906 | }\ |
| 907 | } while (0) |
| 908 | |
| 909 | #define KEY_DECcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:909:9`!(pat,keybuf,key,size) do {\ |
| 910 | switch ((pat)->obj.header.flags & GRN_OBJ_KEY_MASKcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:299:9`!) {\ |
| 911 | case GRN_OBJ_KEY_UINTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:300:9`! :\ |
| 912 | if (((pat)->obj.header.domain != GRN_DB_TOKYO_GEO_POINT) &&\ |
| 913 | ((pat)->obj.header.domain != GRN_DB_WGS84_GEO_POINT)) {\ |
| 914 | grn_ntohcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:636:9`!((keybuf), (key), (size));\ |
| 915 | break;\ |
| 916 | }\ |
| 917 | case GRN_OBJ_KEY_GEO_POINTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:303:9`! :\ |
| 918 | grn_ntogcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:694:9`!((keybuf), (key), (size));\ |
| 919 | break;\ |
| 920 | case GRN_OBJ_KEY_INTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:301:9`! :\ |
| 921 | grn_ntohicxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:628:10`!((keybuf), (key), (size));\ |
| 922 | break;\ |
| 923 | case GRN_OBJ_KEY_FLOATcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:302:9`! :\ |
| 924 | if ((size) == sizeof(int64_t)) {\ |
| 925 | int64_t v;\ |
| 926 | grn_htoncxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:622:10`!(&v, (key), (size));\ |
| 927 | *((int64_t *)(keybuf)) = v ^ ((((int64_t)(v^(1ULL<<63)))>> 63)|(1ULL<<63)); \ |
| 928 | }\ |
| 929 | break;\ |
| 930 | }\ |
| 931 | } while (0) |
| 932 | |
| 933 | #define KEY_ENCODEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:933:9`!(pat,keybuf,key,size) do {\ |
| 934 | if (KEY_NEEDS_CONVERTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:881:9`!(pat,size)) {\ |
| 935 | KEY_ENCcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:884:9`!((pat), (keybuf), (key), (size));\ |
| 936 | (key) = (keybuf);\ |
| 937 | }\ |
| 938 | } while (0) |
| 939 | |
| 940 | grn_idcxx . . $ grn_id# |
| 941 | grn_pat_addcxx . . $ grn_pat_add(73f23071831c7e2a).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const void *key, uint32_tcxx . . $ uint32_t# key_size, |
| 942 | void **value, int *added) |
| 943 | { |
| 944 | uint32_tcxx . . $ uint32_t# new, lkey = 0; |
| 945 | grn_idcxx . . $ grn_id# r0; |
| 946 | uint8_tcxx . . $ uint8_t# keybuf[MAX_FIXED_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:879:9`!]; |
| 947 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 948 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 949 | } |
| 950 | if (!key || !key_size) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 951 | if (key_size > GRN_TABLE_MAX_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:25:9`!) { |
| 952 | ERRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:143:9`!(GRN_INVALID_ARGUMENT, "too long key: (%u)", key_size); |
| 953 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 954 | } |
| 955 | KEY_ENCODEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:933:9`!(pat, keybuf, key, key_size); |
| 956 | r0 = _grn_pat_addcxx . . $ _grn_pat_add(19444550e212bc0).(ctx, pat, (uint8_tcxx . . $ uint8_t# *)key, key_size, &new, &lkey); |
| 957 | if (r0 == GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 958 | if (added) { *added = new; } |
| 959 | if (r0 && (pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_KEY_WITH_SIScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:305:9`!) && |
| 960 | (*((uint8_tcxx . . $ uint8_t# *)key) & 0x80)) { // todo: refine!! |
| 961 | sis_nodecxx . . $ sis_node# *sl, *sr; |
| 962 | grn_idcxx . . $ grn_id# l = r0, r; |
| 963 | if (new && (sl = sis_getcxx . . $ sis_get(59e5564d0351a00f).(ctx, pat, l))) { |
| 964 | const char *sis = key, *end = sis + key_size; |
| 965 | sl->childrencxx . . $ $anonymous_type_40923699c27225f7_1#children. = l; |
| 966 | sl->siblingcxx . . $ $anonymous_type_40923699c27225f7_1#sibling. = 0; |
| 967 | while (chopcxx . . $ chop(aabb55c024fea822).(ctx, pat, &sis, end, &lkey)) { |
| 968 | if (!(*sis & 0x80)) { break; } |
| 969 | if (!(r = _grn_pat_addcxx . . $ _grn_pat_add(19444550e212bc0).(ctx, pat, (uint8_tcxx . . $ uint8_t# *)sis, end - sis, &new, &lkey))) { |
| 970 | break; |
| 971 | } |
| 972 | if (!(sr = sis_getcxx . . $ sis_get(59e5564d0351a00f).(ctx, pat, r))) { break; } |
| 973 | if (new) { |
| 974 | sl->siblingcxx . . $ $anonymous_type_40923699c27225f7_1#sibling. = r; |
| 975 | sr->childrencxx . . $ $anonymous_type_40923699c27225f7_1#children. = l; |
| 976 | sr->siblingcxx . . $ $anonymous_type_40923699c27225f7_1#sibling. = 0; |
| 977 | } else { |
| 978 | sl->siblingcxx . . $ $anonymous_type_40923699c27225f7_1#sibling. = sr->childrencxx . . $ $anonymous_type_40923699c27225f7_1#children.; |
| 979 | sr->childrencxx . . $ $anonymous_type_40923699c27225f7_1#children. = l; |
| 980 | break; |
| 981 | } |
| 982 | l = r; |
| 983 | sl = sr; |
| 984 | } |
| 985 | } |
| 986 | } |
| 987 | if (r0 && value) { |
| 988 | bytecxx . . $ byte# *v = (bytecxx . . $ byte# *)sis_getcxx . . $ sis_get(59e5564d0351a00f).(ctx, pat, r0); |
| 989 | if (pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_KEY_WITH_SIScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:305:9`!) { |
| 990 | *value = v + sizeof(sis_nodecxx . . $ sis_node#); |
| 991 | } else { |
| 992 | *value = v; |
| 993 | } |
| 994 | } |
| 995 | return r0; |
| 996 | } |
| 997 | |
| 998 | inline static grn_idcxx . . $ grn_id# |
| 999 | _grn_pat_getcxx . . $ _grn_pat_get(fa992a8ddbc8af6f).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const void *key, uint32_tcxx . . $ uint32_t# key_size, void **value) |
| 1000 | { |
| 1001 | grn_idcxx . . $ grn_id# r; |
| 1002 | pat_nodecxx . . $ pat_node# *rn; |
| 1003 | int c0 = -1, c; |
| 1004 | uint32_tcxx . . $ uint32_t# len = key_size * 16; |
| 1005 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, rn); |
| 1006 | for (r = rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; r;) { |
| 1007 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, r, rn); |
| 1008 | if (!rn) { break; /* corrupt? */ } |
| 1009 | c = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(rn); |
| 1010 | if ((int) len <= c) { break; } |
| 1011 | if (c <= c0) { |
| 1012 | const uint8_tcxx . . $ uint8_t# *k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rn); |
| 1013 | if (k && key_size == PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(rn) && !memcmpcxx . . $ memcmp(36f949851efa3055).(k, key, key_size)) { |
| 1014 | if (value) { |
| 1015 | bytecxx . . $ byte# *v = (bytecxx . . $ byte# *)sis_getcxx . . $ sis_get(59e5564d0351a00f).(ctx, pat, r); |
| 1016 | if (pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_KEY_WITH_SIScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:305:9`!) { |
| 1017 | *value = v + sizeof(sis_nodecxx . . $ sis_node#); |
| 1018 | } else { |
| 1019 | *value = v; |
| 1020 | } |
| 1021 | } |
| 1022 | return r; |
| 1023 | } |
| 1024 | break; |
| 1025 | } |
| 1026 | if (c & 1) { |
| 1027 | r = (c + 1 < (int) len) ? rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] : rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 1028 | } else { |
| 1029 | r = rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!((uint8_t *)key, c, len)]; |
| 1030 | } |
| 1031 | c0 = c; |
| 1032 | } |
| 1033 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 1034 | } |
| 1035 | |
| 1036 | grn_idcxx . . $ grn_id# |
| 1037 | grn_pat_getcxx . . $ grn_pat_get(fa992a8ddbc8af6f).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const void *key, uint32_tcxx . . $ uint32_t# key_size, void **value) |
| 1038 | { |
| 1039 | uint8_tcxx . . $ uint8_t# keybuf[MAX_FIXED_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:879:9`!]; |
| 1040 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1041 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 1042 | } |
| 1043 | KEY_ENCODEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:933:9`!(pat, keybuf, key, key_size); |
| 1044 | return _grn_pat_getcxx . . $ _grn_pat_get(fa992a8ddbc8af6f).(ctx, pat, key, key_size, value); |
| 1045 | } |
| 1046 | |
| 1047 | grn_idcxx . . $ grn_id# |
| 1048 | grn_pat_nextidcxx . . $ grn_pat_nextid(16c60b50be975ec9).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const void *key, uint32_tcxx . . $ uint32_t# key_size) |
| 1049 | { |
| 1050 | grn_idcxx . . $ grn_id# r = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 1051 | if (pat && key) { |
| 1052 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1053 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 1054 | } |
| 1055 | if (!(r = pat->headercxx . . $ _grn_pat#header.->garbagescxx . . $ grn_pat_header#garbages.[key_size > sizeof(uint32_tcxx . . $ uint32_t#) ? key_size : 0])) { |
| 1056 | r = pat->headercxx . . $ _grn_pat#header.->curr_reccxx . . $ grn_pat_header#curr_rec. + 1; |
| 1057 | } |
| 1058 | } |
| 1059 | return r; |
| 1060 | } |
| 1061 | |
| 1062 | static void |
| 1063 | get_tccxx . . $ get_tc(559586e144c32511).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_hashcxx . . $ grn_hash# *h, pat_nodecxx . . $ pat_node# *rn) |
| 1064 | { |
| 1065 | grn_idcxx . . $ grn_id# id; |
| 1066 | pat_nodecxx . . $ pat_node# *node; |
| 1067 | id = rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 1068 | if (id) { |
| 1069 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 1070 | if (node) { |
| 1071 | if (PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node) > PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(rn)) { |
| 1072 | get_tccxx . . $ get_tc(559586e144c32511).(ctx, pat, h, node); |
| 1073 | } else { |
| 1074 | grn_hash_addcxx . . $ grn_hash_add(251a256fc515235e).(ctx, h, &id, sizeof(grn_idcxx . . $ grn_id#), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1075 | } |
| 1076 | } |
| 1077 | } |
| 1078 | id = rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 1079 | if (id) { |
| 1080 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 1081 | if (node) { |
| 1082 | if (PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node) > PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(rn)) { |
| 1083 | get_tccxx . . $ get_tc(559586e144c32511).(ctx, pat, h, node); |
| 1084 | } else { |
| 1085 | grn_hash_addcxx . . $ grn_hash_add(251a256fc515235e).(ctx, h, &id, sizeof(grn_idcxx . . $ grn_id#), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1086 | } |
| 1087 | } |
| 1088 | } |
| 1089 | } |
| 1090 | |
| 1091 | grn_rccxx . . $ grn_rc# |
| 1092 | grn_pat_prefix_searchcxx . . $ grn_pat_prefix_search(b68d5b0fe0baf8db).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, |
| 1093 | const void *key, uint32_tcxx . . $ uint32_t# key_size, grn_hashcxx . . $ grn_hash# *h) |
| 1094 | { |
| 1095 | int c0 = -1, c; |
| 1096 | const uint8_tcxx . . $ uint8_t# *k; |
| 1097 | uint32_tcxx . . $ uint32_t# len = key_size * 16; |
| 1098 | grn_idcxx . . $ grn_id# r; |
| 1099 | pat_nodecxx . . $ pat_node# *rn; |
| 1100 | uint8_tcxx . . $ uint8_t# keybuf[MAX_FIXED_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:879:9`!]; |
| 1101 | grn_rccxx . . $ grn_rc# rc = grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat); |
| 1102 | if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1103 | return rc; |
| 1104 | } |
| 1105 | KEY_ENCODEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:933:9`!(pat, keybuf, key, key_size); |
| 1106 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, rn); |
| 1107 | r = rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 1108 | while (r) { |
| 1109 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, r, rn); |
| 1110 | if (!rn) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 1111 | c = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(rn); |
| 1112 | if (c0 < c && c < (int) len - 1) { |
| 1113 | if (c & 1) { |
| 1114 | r = (c + 1 < (int) len) ? rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] : rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 1115 | } else { |
| 1116 | r = rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!((uint8_t *)key, c, len)]; |
| 1117 | } |
| 1118 | c0 = c; |
| 1119 | continue; |
| 1120 | } |
| 1121 | if (!(k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rn))) { break; } |
| 1122 | if (PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(rn) < key_size) { break; } |
| 1123 | if (!memcmpcxx . . $ memcmp(36f949851efa3055).(k, key, key_size)) { |
| 1124 | if (c >= (int) len - 1) { |
| 1125 | get_tccxx . . $ get_tc(559586e144c32511).(ctx, pat, h, rn); |
| 1126 | } else { |
| 1127 | grn_hash_addcxx . . $ grn_hash_add(251a256fc515235e).(ctx, h, &r, sizeof(grn_idcxx . . $ grn_id#), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1128 | } |
| 1129 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 1130 | } |
| 1131 | break; |
| 1132 | } |
| 1133 | return GRN_END_OF_DATAcxx . . $ GRN_END_OF_DATA.; |
| 1134 | } |
| 1135 | |
| 1136 | grn_hashcxx . . $ grn_hash# * |
| 1137 | grn_pat_prefix_search2cxx . . $ grn_pat_prefix_search2(b85e96a3c830099c).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const void *key, uint32_tcxx . . $ uint32_t# key_size) |
| 1138 | { |
| 1139 | grn_hashcxx . . $ grn_hash# *h; |
| 1140 | if (!pat || !key) { return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; } |
| 1141 | if ((h = grn_hash_createcxx . . $ grn_hash_create(db1bba7e0d64660).(ctx, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, sizeof(grn_idcxx . . $ grn_id#), 0, 0))) { |
| 1142 | if (grn_pat_prefix_searchcxx . . $ grn_pat_prefix_search(b68d5b0fe0baf8db).(ctx, pat, key, key_size, h)) { |
| 1143 | grn_hash_closecxx . . $ grn_hash_close(c005d027d163fb0b).(ctx, h); |
| 1144 | h = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1145 | } |
| 1146 | } |
| 1147 | return h; |
| 1148 | } |
| 1149 | |
| 1150 | grn_rccxx . . $ grn_rc# |
| 1151 | grn_pat_suffix_searchcxx . . $ grn_pat_suffix_search(b68d5b0fe0baf8db).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, |
| 1152 | const void *key, uint32_tcxx . . $ uint32_t# key_size, grn_hashcxx . . $ grn_hash# *h) |
| 1153 | { |
| 1154 | grn_idcxx . . $ grn_id# r; |
| 1155 | if ((r = grn_pat_getcxx . . $ grn_pat_get(fa992a8ddbc8af6f).(ctx, pat, key, key_size, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!))) { |
| 1156 | uint32_tcxx . . $ uint32_t# *offset; |
| 1157 | if (grn_hash_addcxx . . $ grn_hash_add(251a256fc515235e).(ctx, h, &r, sizeof(grn_idcxx . . $ grn_id#), (void **) &offset, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) { |
| 1158 | *offset = 0; |
| 1159 | if (pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_KEY_WITH_SIScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:305:9`!) { sis_collectcxx . . $ sis_collect(ba654b20daabaf48).(ctx, pat, h, r, 1); } |
| 1160 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 1161 | } |
| 1162 | } |
| 1163 | return GRN_END_OF_DATAcxx . . $ GRN_END_OF_DATA.; |
| 1164 | } |
| 1165 | |
| 1166 | grn_hashcxx . . $ grn_hash# * |
| 1167 | grn_pat_suffix_search2cxx . . $ grn_pat_suffix_search2(b85e96a3c830099c).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const void *key, uint32_tcxx . . $ uint32_t# key_size) |
| 1168 | { |
| 1169 | grn_hashcxx . . $ grn_hash# *h; |
| 1170 | if (!pat || !key) { return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; } |
| 1171 | if ((h = grn_hash_createcxx . . $ grn_hash_create(db1bba7e0d64660).(ctx, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, sizeof(grn_idcxx . . $ grn_id#), sizeof(uint32_tcxx . . $ uint32_t#), 0))) { |
| 1172 | if (grn_pat_suffix_searchcxx . . $ grn_pat_suffix_search(b68d5b0fe0baf8db).(ctx, pat, key, key_size, h)) { |
| 1173 | grn_hash_closecxx . . $ grn_hash_close(c005d027d163fb0b).(ctx, h); |
| 1174 | h = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1175 | } |
| 1176 | } |
| 1177 | return h; |
| 1178 | } |
| 1179 | |
| 1180 | grn_idcxx . . $ grn_id# |
| 1181 | grn_pat_lcp_searchcxx . . $ grn_pat_lcp_search(16c60b50be975ec9).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const void *key, uint32_tcxx . . $ uint32_t# key_size) |
| 1182 | { |
| 1183 | pat_nodecxx . . $ pat_node# *rn; |
| 1184 | grn_idcxx . . $ grn_id# r, r2 = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 1185 | uint32_tcxx . . $ uint32_t# len = key_size * 16; |
| 1186 | int c0 = -1, c; |
| 1187 | if (!pat || !key) { |
| 1188 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 1189 | } |
| 1190 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1191 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 1192 | } |
| 1193 | if (!(pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_KEY_VAR_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:342:9`!)) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 1194 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, rn); |
| 1195 | for (r = rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; r;) { |
| 1196 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, r, rn); |
| 1197 | if (!rn) { break; /* corrupt? */ } |
| 1198 | c = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(rn); |
| 1199 | if (c <= c0) { |
| 1200 | if (PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(rn) <= key_size) { |
| 1201 | uint8_tcxx . . $ uint8_t# *p = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rn); |
| 1202 | if (!p) { break; } |
| 1203 | if (!memcmpcxx . . $ memcmp(36f949851efa3055).(p, key, PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(rn))) { return r; } |
| 1204 | } |
| 1205 | break; |
| 1206 | } |
| 1207 | if ((int) len <= c) { break; } |
| 1208 | if (c & 1) { |
| 1209 | uint8_tcxx . . $ uint8_t# *p; |
| 1210 | pat_nodecxx . . $ pat_node# *rn0; |
| 1211 | grn_idcxx . . $ grn_id# r0 = rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 1212 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, r0, rn0); |
| 1213 | if (!rn0) { break; /* corrupt? */ } |
| 1214 | p = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rn0); |
| 1215 | if (!p) { break; } |
| 1216 | if (PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(rn0) <= key_size && !memcmpcxx . . $ memcmp(36f949851efa3055).(p, key, PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(rn0))) { r2 = r0; } |
| 1217 | r = (c + 1 < (int) len) ? rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] : rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 1218 | } else { |
| 1219 | r = rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!((uint8_t *)key, c, len)]; |
| 1220 | } |
| 1221 | c0 = c; |
| 1222 | } |
| 1223 | return r2; |
| 1224 | } |
| 1225 | |
| 1226 | static grn_idcxx . . $ grn_id# |
| 1227 | common_prefix_pat_node_getcxx . . $ common_prefix_pat_node_get(16c60b50be975ec9).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const void *key, uint32_tcxx . . $ uint32_t# key_size) |
| 1228 | { |
| 1229 | int c0 = -1, c; |
| 1230 | const uint8_tcxx . . $ uint8_t# *k; |
| 1231 | uint32_tcxx . . $ uint32_t# len = key_size * 16; |
| 1232 | grn_idcxx . . $ grn_id# r; |
| 1233 | pat_nodecxx . . $ pat_node# *rn; |
| 1234 | uint8_tcxx . . $ uint8_t# keybuf[MAX_FIXED_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:879:9`!]; |
| 1235 | |
| 1236 | KEY_ENCODEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:933:9`!(pat, keybuf, key, key_size); |
| 1237 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, rn); |
| 1238 | r = rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 1239 | while (r) { |
| 1240 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, r, rn); |
| 1241 | if (!rn) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 1242 | c = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(rn); |
| 1243 | if (c0 < c && c < (int) len - 1) { |
| 1244 | if (c & 1) { |
| 1245 | r = (c + 1 < (int) len) ? rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] : rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 1246 | } else { |
| 1247 | r = rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!((uint8_t *)key, c, len)]; |
| 1248 | } |
| 1249 | c0 = c; |
| 1250 | continue; |
| 1251 | } |
| 1252 | if (!(k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rn))) { break; } |
| 1253 | if (PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(rn) < key_size) { break; } |
| 1254 | if (!memcmpcxx . . $ memcmp(36f949851efa3055).(k, key, key_size)) { |
| 1255 | return r; |
| 1256 | } |
| 1257 | break; |
| 1258 | } |
| 1259 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 1260 | } |
| 1261 | |
| 1262 | typedef structcxx . . $ $anonymous_type_40923699c27225f7_4# { |
| 1263 | grn_idcxx . . $ grn_id# idcxx . . $ $anonymous_type_40923699c27225f7_4#id.; |
| 1264 | uint16_tcxx . . $ uint16_t# distancecxx . . $ $anonymous_type_40923699c27225f7_4#distance.; |
| 1265 | } fuzzy_heap_nodecxx . . $ fuzzy_heap_node#; |
| 1266 | |
| 1267 | typedef structcxx . . $ $anonymous_type_40923699c27225f7_5# { |
| 1268 | int n_entriescxx . . $ $anonymous_type_40923699c27225f7_5#n_entries.; |
| 1269 | int limitcxx . . $ $anonymous_type_40923699c27225f7_5#limit.; |
| 1270 | fuzzy_heap_nodecxx . . $ fuzzy_heap_node# *nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes.; |
| 1271 | } fuzzy_heapcxx . . $ fuzzy_heap#; |
| 1272 | |
| 1273 | static inline fuzzy_heapcxx . . $ fuzzy_heap# * |
| 1274 | fuzzy_heap_opencxx . . $ fuzzy_heap_open(8af36f750e81340e).(grn_ctxcxx . . $ grn_ctx# *ctx, int max) |
| 1275 | { |
| 1276 | fuzzy_heapcxx . . $ fuzzy_heap# *h = GRN_MALLOCcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:38:9`!(sizeof(fuzzy_heap)); |
| 1277 | if (!h) { return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; } |
| 1278 | h->nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes. = GRN_MALLOCcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:38:9`!(sizeof(fuzzy_heap_node) * max); |
| 1279 | if (!h->nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes.) { |
| 1280 | GRN_FREEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:46:9`!(h); |
| 1281 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1282 | } |
| 1283 | h->n_entriescxx . . $ $anonymous_type_40923699c27225f7_5#n_entries. = 0; |
| 1284 | h->limitcxx . . $ $anonymous_type_40923699c27225f7_5#limit. = max; |
| 1285 | return h; |
| 1286 | } |
| 1287 | |
| 1288 | static inline grn_boolcxx . . $ grn_bool# |
| 1289 | fuzzy_heap_pushcxx . . $ fuzzy_heap_push(800a5d589a0b0c41).(grn_ctxcxx . . $ grn_ctx# *ctx, fuzzy_heapcxx . . $ fuzzy_heap# *h, grn_idcxx . . $ grn_id# id, uint16_tcxx . . $ uint16_t# distance) |
| 1290 | { |
| 1291 | int n, n2; |
| 1292 | fuzzy_heap_nodecxx . . $ fuzzy_heap_node# node = {id, distance}; |
| 1293 | fuzzy_heap_nodecxx . . $ fuzzy_heap_node# node2; |
| 1294 | if (h->n_entriescxx . . $ $anonymous_type_40923699c27225f7_5#n_entries. >= h->limitcxx . . $ $anonymous_type_40923699c27225f7_5#limit.) { |
| 1295 | int max = h->limitcxx . . $ $anonymous_type_40923699c27225f7_5#limit. * 2; |
| 1296 | fuzzy_heap_nodecxx . . $ fuzzy_heap_node# *nodes = GRN_REALLOCcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:40:9`!(h->nodes, sizeof(fuzzy_heap) * max); |
| 1297 | if (!h) { |
| 1298 | return GRN_FALSEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:45:9`!; |
| 1299 | } |
| 1300 | h->limitcxx . . $ $anonymous_type_40923699c27225f7_5#limit. = max; |
| 1301 | h->nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes. = nodes; |
| 1302 | } |
| 1303 | h->nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes.[h->n_entriescxx . . $ $anonymous_type_40923699c27225f7_5#n_entries.] = node; |
| 1304 | n = h->n_entriescxx . . $ $anonymous_type_40923699c27225f7_5#n_entries.++; |
| 1305 | while (n) { |
| 1306 | n2 = (n - 1) >> 1; |
| 1307 | if (h->nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes.[n2].distancecxx . . $ $anonymous_type_40923699c27225f7_4#distance. <= h->nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes.[n].distancecxx . . $ $anonymous_type_40923699c27225f7_4#distance.) { break; } |
| 1308 | node2 = h->nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes.[n]; |
| 1309 | h->nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes.[n] = h->nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes.[n2]; |
| 1310 | h->nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes.[n2] = node2; |
| 1311 | n = n2; |
| 1312 | } |
| 1313 | return GRN_TRUEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:44:9`!; |
| 1314 | } |
| 1315 | |
| 1316 | static inline void |
| 1317 | fuzzy_heap_closecxx . . $ fuzzy_heap_close(1e3d7b888de011ef).(grn_ctxcxx . . $ grn_ctx# *ctx, fuzzy_heapcxx . . $ fuzzy_heap# *h) |
| 1318 | { |
| 1319 | GRN_FREEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:46:9`!(h->nodes); |
| 1320 | GRN_FREEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:46:9`!(h); |
| 1321 | } |
| 1322 | |
| 1323 | #define DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(ox,oy) (dists[((lx + 1) * (oy)) + (ox)]) |
| 1324 | |
| 1325 | inline static uint16_tcxx . . $ uint16_t# |
| 1326 | calc_edit_distance_by_offsetcxx . . $ calc_edit_distance_by_offset(a7b0a7b3750b74c5).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 1327 | const char *sx, const char *ex, |
| 1328 | const char *sy, const char *ey, |
| 1329 | uint16_tcxx . . $ uint16_t# *dists, uint32_tcxx . . $ uint32_t# lx, |
| 1330 | uint32_tcxx . . $ uint32_t# offset, uint32_tcxx . . $ uint32_t# max_distance, |
| 1331 | grn_boolcxx . . $ grn_bool# *can_transition, int flags) |
| 1332 | { |
| 1333 | uint32_tcxx . . $ uint32_t# cx, cy, x, y; |
| 1334 | const char *px, *py; |
| 1335 | |
| 1336 | /* Skip already calculated rows */ |
| 1337 | for (py = sy, y = 1; py < ey && (cy = grn_charlencxx . . $ grn_charlen(d229e8bf7c87f0f0).(ctx, py, ey)); py += cy, y++) { |
| 1338 | if (py - sy >= offset) { |
| 1339 | break; |
| 1340 | } |
| 1341 | } |
| 1342 | for (; py < ey && (cy = grn_charlencxx . . $ grn_charlen(d229e8bf7c87f0f0).(ctx, py, ey)); py += cy, y++) { |
| 1343 | /* children nodes will be no longer smaller than max distance |
| 1344 | * with only insertion costs. |
| 1345 | * This is end of row on allocated memory. */ |
| 1346 | if (y > lx + max_distance) { |
| 1347 | *can_transition = GRN_FALSEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:45:9`!; |
| 1348 | return max_distance + 1; |
| 1349 | } |
| 1350 | |
| 1351 | for (px = sx, x = 1; px < ex && (cx = grn_charlencxx . . $ grn_charlen(d229e8bf7c87f0f0).(ctx, px, ex)); px += cx, x++) { |
| 1352 | if (cx == cy && !memcmpcxx . . $ memcmp(36f949851efa3055).(px, py, cx)) { |
| 1353 | DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(x, y) = DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(x - 1, y - 1); |
| 1354 | } else { |
| 1355 | uint32_tcxx . . $ uint32_t# a, b, c; |
| 1356 | a = DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(x - 1, y) + 1; |
| 1357 | b = DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(x, y - 1) + 1; |
| 1358 | c = DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(x - 1, y - 1) + 1; |
| 1359 | DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(x, y) = ((a < b) ? ((a < c) ? a : c) : ((b < c) ? b : c)); |
| 1360 | if (flags & GRN_TABLE_FUZZY_SEARCH_WITH_TRANSPOSITIONcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:777:9`! && |
| 1361 | x > 1 && y > 1 && |
| 1362 | cx == cy && |
| 1363 | memcmpcxx . . $ memcmp(36f949851efa3055).(px, py - cy, cx) == 0 && |
| 1364 | memcmpcxx . . $ memcmp(36f949851efa3055).(px - cx, py, cx) == 0) { |
| 1365 | uint32_tcxx . . $ uint32_t# t = DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(x - 2, y - 2) + 1; |
| 1366 | DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(x, y) = ((DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(x, y) < t) ? DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(x, y) : t); |
| 1367 | } |
| 1368 | } |
| 1369 | } |
| 1370 | } |
| 1371 | if (lx) { |
| 1372 | /* If there is no cell which is smaller than equal to max distance on end of row, |
| 1373 | * children nodes will be no longer smaller than max distance */ |
| 1374 | *can_transition = GRN_FALSEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:45:9`!; |
| 1375 | for (x = 1; x <= lx; x++) { |
| 1376 | if (DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(x, y - 1) <= max_distance) { |
| 1377 | *can_transition = GRN_TRUEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:44:9`!; |
| 1378 | break; |
| 1379 | } |
| 1380 | } |
| 1381 | } |
| 1382 | return DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(lx, y - 1); |
| 1383 | } |
| 1384 | |
| 1385 | typedef structcxx . . $ $anonymous_type_40923699c27225f7_6# { |
| 1386 | const char *keycxx . . $ $anonymous_type_40923699c27225f7_6#key.; |
| 1387 | int key_lengthcxx . . $ $anonymous_type_40923699c27225f7_6#key_length.; |
| 1388 | grn_boolcxx . . $ grn_bool# can_transitioncxx . . $ $anonymous_type_40923699c27225f7_6#can_transition.; |
| 1389 | } fuzzy_nodecxx . . $ fuzzy_node#; |
| 1390 | |
| 1391 | inline static void |
| 1392 | _grn_pat_fuzzy_searchcxx . . $ _grn_pat_fuzzy_search(5329f65bebc0539a).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id, |
| 1393 | const char *key, uint32_tcxx . . $ uint32_t# key_size, |
| 1394 | uint16_tcxx . . $ uint16_t# *dists, uint32_tcxx . . $ uint32_t# lx, |
| 1395 | int last_check, fuzzy_nodecxx . . $ fuzzy_node# *last_node, |
| 1396 | uint32_tcxx . . $ uint32_t# max_distance, int flags, fuzzy_heapcxx . . $ fuzzy_heap# *heap) |
| 1397 | { |
| 1398 | pat_nodecxx . . $ pat_node# *node = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1399 | int check, len; |
| 1400 | const char *k; |
| 1401 | uint32_tcxx . . $ uint32_t# offset = 0; |
| 1402 | |
| 1403 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 1404 | if (!node) { |
| 1405 | return; |
| 1406 | } |
| 1407 | check = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node); |
| 1408 | len = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(node); |
| 1409 | k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, node); |
| 1410 | |
| 1411 | if (check > last_check) { |
| 1412 | if (len >= last_node->key_lengthcxx . . $ $anonymous_type_40923699c27225f7_6#key_length. && |
| 1413 | !memcmpcxx . . $ memcmp(36f949851efa3055).(k, last_node->keycxx . . $ $anonymous_type_40923699c27225f7_6#key., last_node->key_lengthcxx . . $ $anonymous_type_40923699c27225f7_6#key_length.)) { |
| 1414 | if (last_node->can_transitioncxx . . $ $anonymous_type_40923699c27225f7_6#can_transition. == GRN_FALSEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:45:9`!) { |
| 1415 | return; |
| 1416 | } |
| 1417 | } |
| 1418 | _grn_pat_fuzzy_searchcxx . . $ _grn_pat_fuzzy_search(5329f65bebc0539a).(ctx, pat, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], |
| 1419 | key, key_size, dists, lx, |
| 1420 | check, last_node, |
| 1421 | max_distance, flags, heap); |
| 1422 | |
| 1423 | _grn_pat_fuzzy_searchcxx . . $ _grn_pat_fuzzy_search(5329f65bebc0539a).(ctx, pat, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], |
| 1424 | key, key_size, dists, lx, |
| 1425 | check, last_node, |
| 1426 | max_distance, flags, heap); |
| 1427 | } else { |
| 1428 | if (id) { |
| 1429 | /* Set already calculated common prefix length */ |
| 1430 | if (len >= last_node->key_lengthcxx . . $ $anonymous_type_40923699c27225f7_6#key_length. && |
| 1431 | !memcmpcxx . . $ memcmp(36f949851efa3055).(k, last_node->keycxx . . $ $anonymous_type_40923699c27225f7_6#key., last_node->key_lengthcxx . . $ $anonymous_type_40923699c27225f7_6#key_length.)) { |
| 1432 | if (last_node->can_transitioncxx . . $ $anonymous_type_40923699c27225f7_6#can_transition. == GRN_FALSEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:45:9`!) { |
| 1433 | return; |
| 1434 | } |
| 1435 | offset = last_node->key_lengthcxx . . $ $anonymous_type_40923699c27225f7_6#key_length.; |
| 1436 | } else { |
| 1437 | if (last_node->can_transitioncxx . . $ $anonymous_type_40923699c27225f7_6#can_transition. == GRN_FALSEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:45:9`!) { |
| 1438 | last_node->can_transitioncxx . . $ $anonymous_type_40923699c27225f7_6#can_transition. = GRN_TRUEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:44:9`!; |
| 1439 | } |
| 1440 | if (last_node->key_lengthcxx . . $ $anonymous_type_40923699c27225f7_6#key_length.) { |
| 1441 | const char *kp = k; |
| 1442 | const char *ke = k + len; |
| 1443 | const char *p = last_node->keycxx . . $ $anonymous_type_40923699c27225f7_6#key.; |
| 1444 | const char *e = last_node->keycxx . . $ $anonymous_type_40923699c27225f7_6#key. + last_node->key_lengthcxx . . $ $anonymous_type_40923699c27225f7_6#key_length.; |
| 1445 | int lp; |
| 1446 | for (;p < e && kp < ke && (lp = grn_charlencxx . . $ grn_charlen(d229e8bf7c87f0f0).(ctx, p, e)); |
| 1447 | p += lp, kp += lp) { |
| 1448 | if (p + lp <= e && kp + lp <= ke && memcmpcxx . . $ memcmp(36f949851efa3055).(p, kp, lp)) { |
| 1449 | break; |
| 1450 | } |
| 1451 | } |
| 1452 | offset = kp - k; |
| 1453 | } |
| 1454 | } |
| 1455 | if (len - offset) { |
| 1456 | uint16_tcxx . . $ uint16_t# distance; |
| 1457 | distance = |
| 1458 | calc_edit_distance_by_offsetcxx . . $ calc_edit_distance_by_offset(a7b0a7b3750b74c5).(ctx, |
| 1459 | key, key + key_size, |
| 1460 | k, k + len, |
| 1461 | dists, lx, |
| 1462 | offset, max_distance, |
| 1463 | &(last_node->can_transitioncxx . . $ $anonymous_type_40923699c27225f7_6#can_transition.), flags); |
| 1464 | if (distance <= max_distance) { |
| 1465 | fuzzy_heap_pushcxx . . $ fuzzy_heap_push(800a5d589a0b0c41).(ctx, heap, id, distance); |
| 1466 | } |
| 1467 | } |
| 1468 | last_node->keycxx . . $ $anonymous_type_40923699c27225f7_6#key. = k; |
| 1469 | last_node->key_lengthcxx . . $ $anonymous_type_40923699c27225f7_6#key_length. = len; |
| 1470 | } |
| 1471 | } |
| 1472 | return; |
| 1473 | } |
| 1474 | |
| 1475 | #define HEAP_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1475:9`! 256 |
| 1476 | |
| 1477 | grn_rccxx . . $ grn_rc# |
| 1478 | grn_pat_fuzzy_searchcxx . . $ grn_pat_fuzzy_search(75e4f8a949dfaa71).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, |
| 1479 | const void *key, uint32_tcxx . . $ uint32_t# key_size, |
| 1480 | grn_fuzzy_search_optargcxx . . $ grn_fuzzy_search_optarg# *args, grn_hashcxx . . $ grn_hash# *h) |
| 1481 | { |
| 1482 | pat_nodecxx . . $ pat_node# *node; |
| 1483 | grn_idcxx . . $ grn_id# id; |
| 1484 | uint16_tcxx . . $ uint16_t# *dists; |
| 1485 | uint32_tcxx . . $ uint32_t# lx, len, x, y, i; |
| 1486 | const char *s = key; |
| 1487 | const char *e = (const char *)key + key_size; |
| 1488 | fuzzy_nodecxx . . $ fuzzy_node# last_node; |
| 1489 | fuzzy_heapcxx . . $ fuzzy_heap# *heap; |
| 1490 | uint32_tcxx . . $ uint32_t# max_distance = 1; |
| 1491 | uint32_tcxx . . $ uint32_t# max_expansion = 0; |
| 1492 | uint32_tcxx . . $ uint32_t# prefix_match_size = 0; |
| 1493 | int flags = 0; |
| 1494 | grn_rccxx . . $ grn_rc# rc = grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat); |
| 1495 | if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1496 | return rc; |
| 1497 | } |
| 1498 | if (args) { |
| 1499 | max_distance = args->max_distancecxx . . $ _grn_fuzzy_search_optarg#max_distance.; |
| 1500 | max_expansion = args->max_expansioncxx . . $ _grn_fuzzy_search_optarg#max_expansion.; |
| 1501 | prefix_match_size = args->prefix_match_sizecxx . . $ _grn_fuzzy_search_optarg#prefix_match_size.; |
| 1502 | flags = args->flagscxx . . $ _grn_fuzzy_search_optarg#flags.; |
| 1503 | } |
| 1504 | if (key_size > GRN_TABLE_MAX_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:25:9`! || |
| 1505 | max_distance > GRN_TABLE_MAX_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:25:9`! || |
| 1506 | prefix_match_size > key_size) { |
| 1507 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 1508 | } |
| 1509 | |
| 1510 | heap = fuzzy_heap_opencxx . . $ fuzzy_heap_open(8af36f750e81340e).(ctx, HEAP_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1475:9`!); |
| 1511 | if (!heap) { |
| 1512 | return GRN_NO_MEMORY_AVAILABLEcxx . . $ GRN_NO_MEMORY_AVAILABLE.; |
| 1513 | } |
| 1514 | |
| 1515 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!, node); |
| 1516 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 1517 | |
| 1518 | if (prefix_match_size) { |
| 1519 | grn_idcxx . . $ grn_id# tid; |
| 1520 | tid = common_prefix_pat_node_getcxx . . $ common_prefix_pat_node_get(16c60b50be975ec9).(ctx, pat, key, prefix_match_size); |
| 1521 | if (tid != GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!) { |
| 1522 | id = tid; |
| 1523 | } else { |
| 1524 | return GRN_END_OF_DATAcxx . . $ GRN_END_OF_DATA.; |
| 1525 | } |
| 1526 | } |
| 1527 | for (lx = 0; s < e && (len = grn_charlencxx . . $ grn_charlen(d229e8bf7c87f0f0).(ctx, s, e)); s += len) { |
| 1528 | lx++; |
| 1529 | } |
| 1530 | dists = GRN_MALLOCcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:38:9`!((lx + 1) * (lx + max_distance + 1) * sizeof(uint16_t)); |
| 1531 | if (!dists) { |
| 1532 | return GRN_NO_MEMORY_AVAILABLEcxx . . $ GRN_NO_MEMORY_AVAILABLE.; |
| 1533 | } |
| 1534 | |
| 1535 | for (x = 0; x <= lx; x++) { DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(x, 0) = x; } |
| 1536 | for (y = 0; y <= lx + max_distance ; y++) { DISTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:1323:9`!(0, y) = y; } |
| 1537 | |
| 1538 | last_node.keycxx . . $ $anonymous_type_40923699c27225f7_6#key. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1539 | last_node.key_lengthcxx . . $ $anonymous_type_40923699c27225f7_6#key_length. = 0; |
| 1540 | last_node.can_transitioncxx . . $ $anonymous_type_40923699c27225f7_6#can_transition. = GRN_TRUEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:44:9`!; |
| 1541 | _grn_pat_fuzzy_searchcxx . . $ _grn_pat_fuzzy_search(5329f65bebc0539a).(ctx, pat, id, |
| 1542 | key, key_size, dists, lx, |
| 1543 | -1, &last_node, max_distance, flags, heap); |
| 1544 | GRN_FREEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:46:9`!(dists); |
| 1545 | for (i = 0; i < (uint32_tcxx . . $ uint32_t#) heap->n_entriescxx . . $ $anonymous_type_40923699c27225f7_5#n_entries.; i++) { |
| 1546 | if (max_expansion > 0 && i >= max_expansion) { |
| 1547 | break; |
| 1548 | } |
| 1549 | if (DB_OBJcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_db.h:325:9`!(h)->headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_WITH_SUBRECcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:340:9`!) { |
| 1550 | grn_rset_recinfocxx . . $ grn_rset_recinfo# *ri; |
| 1551 | if (grn_hash_addcxx . . $ grn_hash_add(251a256fc515235e).(ctx, h, &(heap->nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes.[i].idcxx . . $ $anonymous_type_40923699c27225f7_4#id.), sizeof(grn_idcxx . . $ grn_id#), (void **)&ri, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) { |
| 1552 | ri->scorecxx . . $ $anonymous_type_94b655bf2373c54a_0#score. = max_distance - heap->nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes.[i].distancecxx . . $ $anonymous_type_40923699c27225f7_4#distance. + 1; |
| 1553 | } |
| 1554 | } else { |
| 1555 | grn_hash_addcxx . . $ grn_hash_add(251a256fc515235e).(ctx, h, &(heap->nodescxx . . $ $anonymous_type_40923699c27225f7_5#nodes.[i].idcxx . . $ $anonymous_type_40923699c27225f7_4#id.), sizeof(grn_idcxx . . $ grn_id#), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1556 | } |
| 1557 | } |
| 1558 | fuzzy_heap_closecxx . . $ fuzzy_heap_close(1e3d7b888de011ef).(ctx, heap); |
| 1559 | if (grn_hash_sizecxx . . $ grn_hash_size(f05d4ba70b6338a4).(ctx, h)) { |
| 1560 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 1561 | } else { |
| 1562 | return GRN_END_OF_DATAcxx . . $ GRN_END_OF_DATA.; |
| 1563 | } |
| 1564 | } |
| 1565 | |
| 1566 | inline static grn_rccxx . . $ grn_rc# |
| 1567 | _grn_pat_delcxx . . $ _grn_pat_del(2b3e365daee07c76).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const char *key, uint32_tcxx . . $ uint32_t# key_size, int shared, |
| 1568 | grn_table_delete_optargcxx . . $ grn_table_delete_optarg# *optarg) |
| 1569 | { |
| 1570 | grn_pat_delinfocxx . . $ grn_pat_delinfo# *di; |
| 1571 | pat_nodecxx . . $ pat_node# *rn, *rn0 = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, *rno = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1572 | int c = -1, c0 = -1, ch; |
| 1573 | uint32_tcxx . . $ uint32_t# len = key_size * 16; |
| 1574 | grn_idcxx . . $ grn_id# r, otherside, *proot, *p, *p0 = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1575 | |
| 1576 | /* delinfo_new() must be called before searching for rn. */ |
| 1577 | di = delinfo_newcxx . . $ delinfo_new(9e6821552ee78604).(ctx, pat); |
| 1578 | di->sharedcxx . . $ $anonymous_type_9faf28e2b8411563_0#shared. = shared; |
| 1579 | |
| 1580 | /* |
| 1581 | * Search a patricia tree for a given key. |
| 1582 | * If the key exists, get its output node. |
| 1583 | * |
| 1584 | * rn, rn0: the output node and its previous node. |
| 1585 | * rno: the other side of rn (the other destination of rn0). |
| 1586 | * c, c0: checks of rn0 and its previous node. |
| 1587 | * p, p0: pointers to transitions (IDs) that refer to rn and rn0. |
| 1588 | */ |
| 1589 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, rn); |
| 1590 | proot = p = &rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 1591 | for (;;) { |
| 1592 | r = *p; |
| 1593 | if (!r) { |
| 1594 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 1595 | } |
| 1596 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, r, rn); |
| 1597 | if (!rn) { |
| 1598 | return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; |
| 1599 | } |
| 1600 | ch = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(rn); |
| 1601 | if ((int) len <= ch) { |
| 1602 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 1603 | } |
| 1604 | if (c >= ch) { |
| 1605 | /* Output node found. */ |
| 1606 | const uint8_tcxx . . $ uint8_t# *k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rn); |
| 1607 | if (!k) { |
| 1608 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 1609 | } |
| 1610 | if (key_size != PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(rn) || memcmpcxx . . $ memcmp(36f949851efa3055).(k, key, key_size)) { |
| 1611 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 1612 | } |
| 1613 | /* Given key found. */ |
| 1614 | break; |
| 1615 | } |
| 1616 | c0 = c; |
| 1617 | p0 = p; |
| 1618 | c = ch; |
| 1619 | if (c & 1) { |
| 1620 | p = (c + 1 < (int) len) ? &rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] : &rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 1621 | } else { |
| 1622 | p = &rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!((uint8_t *)key, c, len)]; |
| 1623 | } |
| 1624 | rn0 = rn; |
| 1625 | } |
| 1626 | if (optarg && optarg->funccxx . . $ _grn_table_delete_optarg#func. && |
| 1627 | !optarg->funccxx . . $ _grn_table_delete_optarg#func.(ctx, (grn_objcxx . . $ grn_obj# *)pat, r, optarg->func_argcxx . . $ _grn_table_delete_optarg#func_arg.)) { |
| 1628 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 1629 | } |
| 1630 | if (rn0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0] == rn0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]) { |
| 1631 | GRN_LOGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1112:9`!(ctx, GRN_LOG_DEBUG, "*p0 (%d), rn0->lr[0] == rn0->lr[1] (%d)", |
| 1632 | *p0, rn0->lr[0]); |
| 1633 | return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; |
| 1634 | } |
| 1635 | otherside = (rn0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] == r) ? rn0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0] : rn0->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 1636 | if (otherside) { |
| 1637 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, otherside, rno); |
| 1638 | if (!rno) { |
| 1639 | return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; |
| 1640 | } |
| 1641 | } |
| 1642 | |
| 1643 | if (rn == rn0) { |
| 1644 | /* The last transition (p) is a self-loop. */ |
| 1645 | di->statcxx . . $ $anonymous_type_9faf28e2b8411563_0#stat. = DL_PHASE2cxx . . $ DL_PHASE2.; |
| 1646 | di->dcxx . . $ $anonymous_type_9faf28e2b8411563_0#d. = r; |
| 1647 | if (otherside) { |
| 1648 | if (c0 < PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(rno) && PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(rno) <= c) { |
| 1649 | /* To keep rno as an output node, its check is set to zero. */ |
| 1650 | if (!delinfo_searchcxx . . $ delinfo_search(5b391e2b5c01ff85).(pat, otherside)) { |
| 1651 | GRN_LOGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1112:9`!(ctx, GRN_LOG_DEBUG, "no delinfo found %d", otherside); |
| 1652 | } |
| 1653 | PAT_CHK_SETcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:91:9`!(rno, 0); |
| 1654 | } |
| 1655 | if (proot == p0 && !rno->checkcxx . . $ $anonymous_type_40923699c27225f7_0#check.) { |
| 1656 | /* |
| 1657 | * Update rno->lr because the first node, rno becomes the new first |
| 1658 | * node, is not an output node even if its check is zero. |
| 1659 | */ |
| 1660 | const uint8_tcxx . . $ uint8_t# *k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rno); |
| 1661 | int direction = k ? (*k >> 7) : 1; |
| 1662 | rno->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[direction] = otherside; |
| 1663 | rno->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[!direction] = 0; |
| 1664 | } |
| 1665 | } |
| 1666 | *p0 = otherside; |
| 1667 | } else if ((!rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0] && rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] == r) || |
| 1668 | (!rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] && rn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0] == r)) { |
| 1669 | /* The output node has only a disabled self-loop. */ |
| 1670 | di->statcxx . . $ $anonymous_type_9faf28e2b8411563_0#stat. = DL_PHASE2cxx . . $ DL_PHASE2.; |
| 1671 | di->dcxx . . $ $anonymous_type_9faf28e2b8411563_0#d. = r; |
| 1672 | *p = 0; |
| 1673 | } else { |
| 1674 | /* The last transition (p) is not a self-loop. */ |
| 1675 | grn_pat_delinfocxx . . $ grn_pat_delinfo# *ldi = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, *ddi = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1676 | if (PAT_DELcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:82:9`!(rn)) { |
| 1677 | ldi = delinfo_searchcxx . . $ delinfo_search(5b391e2b5c01ff85).(pat, r); |
| 1678 | } |
| 1679 | if (PAT_DELcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:82:9`!(rn0)) { |
| 1680 | ddi = delinfo_searchcxx . . $ delinfo_search(5b391e2b5c01ff85).(pat, *p0); |
| 1681 | } |
| 1682 | if (ldi) { |
| 1683 | PAT_DEL_OFFcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:88:9`!(rn); |
| 1684 | di->statcxx . . $ $anonymous_type_9faf28e2b8411563_0#stat. = DL_PHASE2cxx . . $ DL_PHASE2.; |
| 1685 | if (ddi) { |
| 1686 | PAT_DEL_OFFcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:88:9`!(rn0); |
| 1687 | ddi->statcxx . . $ $anonymous_type_9faf28e2b8411563_0#stat. = DL_PHASE2cxx . . $ DL_PHASE2.; |
| 1688 | if (ddi == ldi) { |
| 1689 | if (r != ddi->ldcxx . . $ $anonymous_type_9faf28e2b8411563_0#ld.) { |
| 1690 | GRN_LOGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1112:9`!(ctx, GRN_LOG_ERROR, "r(%d) != ddi->ld(%d)", r, ddi->ld); |
| 1691 | } |
| 1692 | di->dcxx . . $ $anonymous_type_9faf28e2b8411563_0#d. = r; |
| 1693 | } else { |
| 1694 | ldi->ldcxx . . $ $anonymous_type_9faf28e2b8411563_0#ld. = ddi->ldcxx . . $ $anonymous_type_9faf28e2b8411563_0#ld.; |
| 1695 | di->dcxx . . $ $anonymous_type_9faf28e2b8411563_0#d. = r; |
| 1696 | } |
| 1697 | } else { |
| 1698 | PAT_DEL_ONcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:86:9`!(rn0); |
| 1699 | ldi->ldcxx . . $ $anonymous_type_9faf28e2b8411563_0#ld. = *p0; |
| 1700 | di->dcxx . . $ $anonymous_type_9faf28e2b8411563_0#d. = r; |
| 1701 | } |
| 1702 | } else { |
| 1703 | PAT_DEL_ONcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:86:9`!(rn); |
| 1704 | if (ddi) { |
| 1705 | if (ddi->dcxx . . $ $anonymous_type_9faf28e2b8411563_0#d. != *p0) { |
| 1706 | GRN_LOGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1112:9`!(ctx, GRN_LOG_ERROR, "ddi->d(%d) != *p0(%d)", ddi->d, *p0); |
| 1707 | } |
| 1708 | PAT_DEL_OFFcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:88:9`!(rn0); |
| 1709 | ddi->statcxx . . $ $anonymous_type_9faf28e2b8411563_0#stat. = DL_PHASE2cxx . . $ DL_PHASE2.; |
| 1710 | di->statcxx . . $ $anonymous_type_9faf28e2b8411563_0#stat. = DL_PHASE1cxx . . $ DL_PHASE1.; |
| 1711 | di->ldcxx . . $ $anonymous_type_9faf28e2b8411563_0#ld. = ddi->ldcxx . . $ $anonymous_type_9faf28e2b8411563_0#ld.; |
| 1712 | di->dcxx . . $ $anonymous_type_9faf28e2b8411563_0#d. = r; |
| 1713 | /* |
| 1714 | PAT_DEL_OFF(rn0); |
| 1715 | ddi->d = r; |
| 1716 | di->stat = DL_PHASE2; |
| 1717 | di->d = *p0; |
| 1718 | */ |
| 1719 | } else { |
| 1720 | PAT_DEL_ONcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:86:9`!(rn0); |
| 1721 | di->statcxx . . $ $anonymous_type_9faf28e2b8411563_0#stat. = DL_PHASE1cxx . . $ DL_PHASE1.; |
| 1722 | di->ldcxx . . $ $anonymous_type_9faf28e2b8411563_0#ld. = *p0; |
| 1723 | di->dcxx . . $ $anonymous_type_9faf28e2b8411563_0#d. = r; |
| 1724 | // grn_log("pat_del d=%d ld=%d stat=%d", r, *p0, DL_PHASE1); |
| 1725 | } |
| 1726 | } |
| 1727 | if (*p0 == otherside) { |
| 1728 | /* The previous node (*p0) has a self-loop (rn0 == rno). */ |
| 1729 | PAT_CHK_SETcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:91:9`!(rno, 0); |
| 1730 | if (proot == p0) { |
| 1731 | /* |
| 1732 | * Update rno->lr because the first node, rno becomes the new first |
| 1733 | * node, is not an output node even if its check is zero. |
| 1734 | */ |
| 1735 | const uint8_tcxx . . $ uint8_t# *k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rno); |
| 1736 | int direction = k ? (*k >> 7) : 1; |
| 1737 | rno->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[direction] = otherside; |
| 1738 | rno->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[!direction] = 0; |
| 1739 | } |
| 1740 | } else { |
| 1741 | if (otherside) { |
| 1742 | if (c0 < PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(rno) && PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(rno) <= c) { |
| 1743 | /* To keep rno as an output node, its check is set to zero. */ |
| 1744 | if (!delinfo_searchcxx . . $ delinfo_search(5b391e2b5c01ff85).(pat, otherside)) { |
| 1745 | GRN_LOGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1112:9`!(ctx, GRN_LOG_ERROR, "no delinfo found %d", otherside); |
| 1746 | } |
| 1747 | PAT_CHK_SETcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:91:9`!(rno, 0); |
| 1748 | } |
| 1749 | if (proot == p0 && !rno->checkcxx . . $ $anonymous_type_40923699c27225f7_0#check.) { |
| 1750 | /* |
| 1751 | * Update rno->lr because the first node, rno becomes the new first |
| 1752 | * node, is not an output node even if its check is zero. |
| 1753 | */ |
| 1754 | const uint8_tcxx . . $ uint8_t# *k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rno); |
| 1755 | int direction = k ? (*k >> 7) : 1; |
| 1756 | rno->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[direction] = otherside; |
| 1757 | rno->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[!direction] = 0; |
| 1758 | } |
| 1759 | } |
| 1760 | *p0 = otherside; |
| 1761 | } |
| 1762 | } |
| 1763 | pat->headercxx . . $ _grn_pat#header.->n_entriescxx . . $ grn_pat_header#n_entries.--; |
| 1764 | pat->headercxx . . $ _grn_pat#header.->n_garbagescxx . . $ grn_pat_header#n_garbages.++; |
| 1765 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 1766 | } |
| 1767 | |
| 1768 | static grn_rccxx . . $ grn_rc# |
| 1769 | _grn_pat_deletecxx . . $ _grn_pat_delete(192945363f173260).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const void *key, uint32_tcxx . . $ uint32_t# key_size, |
| 1770 | grn_table_delete_optargcxx . . $ grn_table_delete_optarg# *optarg) |
| 1771 | { |
| 1772 | if (pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_KEY_WITH_SIScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:305:9`!) { |
| 1773 | grn_idcxx . . $ grn_id# id = grn_pat_getcxx . . $ grn_pat_get(fa992a8ddbc8af6f).(ctx, pat, key, key_size, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1774 | if (id && grn_pat_delete_with_siscxx . . $ grn_pat_delete_with_sis(739b5184d11d4dfc).(ctx, pat, id, optarg)) { |
| 1775 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 1776 | } |
| 1777 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 1778 | } |
| 1779 | return _grn_pat_delcxx . . $ _grn_pat_del(2b3e365daee07c76).(ctx, pat, key, key_size, 0, optarg); |
| 1780 | } |
| 1781 | |
| 1782 | grn_rccxx . . $ grn_rc# |
| 1783 | grn_pat_deletecxx . . $ grn_pat_delete(192945363f173260).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const void *key, uint32_tcxx . . $ uint32_t# key_size, |
| 1784 | grn_table_delete_optargcxx . . $ grn_table_delete_optarg# *optarg) |
| 1785 | { |
| 1786 | grn_rccxx . . $ grn_rc# rc; |
| 1787 | uint8_tcxx . . $ uint8_t# keybuf[MAX_FIXED_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:879:9`!]; |
| 1788 | if (!pat || !key || !key_size) { return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; } |
| 1789 | rc = grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat); |
| 1790 | if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1791 | return rc; |
| 1792 | } |
| 1793 | KEY_ENCODEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:933:9`!(pat, keybuf, key, key_size); |
| 1794 | return _grn_pat_deletecxx . . $ _grn_pat_delete(192945363f173260).(ctx, pat, key, key_size, optarg); |
| 1795 | } |
| 1796 | |
| 1797 | uint32_tcxx . . $ uint32_t# |
| 1798 | grn_pat_sizecxx . . $ grn_pat_size(801003d623e3bbf5).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 1799 | { |
| 1800 | if (!pat) { return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; } |
| 1801 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1802 | return 0; |
| 1803 | } |
| 1804 | return pat->headercxx . . $ _grn_pat#header.->n_entriescxx . . $ grn_pat_header#n_entries.; |
| 1805 | } |
| 1806 | |
| 1807 | const char * |
| 1808 | _grn_pat_keycxx . . $ _grn_pat_key(5b74e3d4f3bf1aa4).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id, uint32_tcxx . . $ uint32_t# *key_size) |
| 1809 | { |
| 1810 | pat_nodecxx . . $ pat_node# *node; |
| 1811 | uint8_tcxx . . $ uint8_t# *key; |
| 1812 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1813 | *key_size = 0; |
| 1814 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1815 | } |
| 1816 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 1817 | if (!node) { |
| 1818 | *key_size = 0; |
| 1819 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1820 | } |
| 1821 | key = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, node); |
| 1822 | if (key) { |
| 1823 | *key_size = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(node); |
| 1824 | } else { |
| 1825 | *key_size = 0; |
| 1826 | } |
| 1827 | return (const char *)key; |
| 1828 | } |
| 1829 | |
| 1830 | grn_rccxx . . $ grn_rc# |
| 1831 | grn_pat_delete_by_idcxx . . $ grn_pat_delete_by_id(69fddfcd7b80a172).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id, |
| 1832 | grn_table_delete_optargcxx . . $ grn_table_delete_optarg# *optarg) |
| 1833 | { |
| 1834 | grn_rccxx . . $ grn_rc# rc; |
| 1835 | if (!pat || !id) { return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; } |
| 1836 | rc = grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat); |
| 1837 | if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1838 | return rc; |
| 1839 | } |
| 1840 | { |
| 1841 | uint32_tcxx . . $ uint32_t# key_size; |
| 1842 | const char *key = _grn_pat_keycxx . . $ _grn_pat_key(5b74e3d4f3bf1aa4).(ctx, pat, id, &key_size); |
| 1843 | return _grn_pat_deletecxx . . $ _grn_pat_delete(192945363f173260).(ctx, pat, key, key_size, optarg); |
| 1844 | } |
| 1845 | } |
| 1846 | |
| 1847 | int |
| 1848 | grn_pat_get_keycxx . . $ grn_pat_get_key(52cd598958564ca7).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id, void *keybuf, int bufsize) |
| 1849 | { |
| 1850 | int len; |
| 1851 | uint8_tcxx . . $ uint8_t# *key; |
| 1852 | pat_nodecxx . . $ pat_node# *node; |
| 1853 | if (!pat) { return 0; } |
| 1854 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1855 | return 0; |
| 1856 | } |
| 1857 | if (!id) { return 0; } |
| 1858 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 1859 | if (!node) { return 0; } |
| 1860 | if (!(key = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, node))) { return 0; } |
| 1861 | len = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(node); |
| 1862 | if (keybuf && bufsize >= len) { |
| 1863 | if (KEY_NEEDS_CONVERTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:881:9`!(pat, len)) { |
| 1864 | KEY_DECcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:909:9`!(pat, keybuf, key, len); |
| 1865 | } else { |
| 1866 | grn_memcpycxx . . $ `storage/mroonga/vendor/groonga/include/groonga/portability.h:31:11`!(keybuf, key, len); |
| 1867 | } |
| 1868 | } |
| 1869 | return len; |
| 1870 | } |
| 1871 | |
| 1872 | int |
| 1873 | grn_pat_get_key2cxx . . $ grn_pat_get_key2(e246f25eab482707).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id, grn_objcxx . . $ grn_obj# *bulk) |
| 1874 | { |
| 1875 | uint32_tcxx . . $ uint32_t# len; |
| 1876 | uint8_tcxx . . $ uint8_t# *key; |
| 1877 | pat_nodecxx . . $ pat_node# *node; |
| 1878 | if (!pat) { return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; } |
| 1879 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1880 | return 0; |
| 1881 | } |
| 1882 | if (!id) { return 0; } |
| 1883 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 1884 | if (!node) { return 0; } |
| 1885 | if (!(key = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, node))) { return 0; } |
| 1886 | len = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(node); |
| 1887 | if (KEY_NEEDS_CONVERTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:881:9`!(pat, len)) { |
| 1888 | if (bulk->headercxx . . $ _grn_obj#header..impl_flagscxx . . $ _grn_obj_header#impl_flags. & GRN_OBJ_REFERcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:422:9`!) { |
| 1889 | GRN_TEXT_INITcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1275:9`!(bulk, 0); |
| 1890 | } |
| 1891 | if (!grn_bulk_reservecxx . . $ grn_bulk_reserve(aedbc3eaefbe393f).(ctx, bulk, len)) { |
| 1892 | char *curr = GRN_BULK_CURRcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1213:9`!(bulk); |
| 1893 | KEY_DECcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:909:9`!(pat, curr, key, len); |
| 1894 | grn_bulk_truncatecxx . . $ grn_bulk_truncate(aedbc3eaefbe393f).(ctx, bulk, GRN_BULK_VSIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1201:9`!(bulk) + len); |
| 1895 | } |
| 1896 | } else { |
| 1897 | if (bulk->headercxx . . $ _grn_obj#header..impl_flagscxx . . $ _grn_obj_header#impl_flags. & GRN_OBJ_REFERcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:422:9`!) { |
| 1898 | bulk->ucxx . . $ _grn_obj#u..bcxx . . $ _grn_obj#$anonymous_type_6#b..headcxx . . $ _grn_obj#$anonymous_type_6#$anonymous_type_7#head. = (char *)key; |
| 1899 | bulk->ucxx . . $ _grn_obj#u..bcxx . . $ _grn_obj#$anonymous_type_6#b..currcxx . . $ _grn_obj#$anonymous_type_6#$anonymous_type_7#curr. = (char *)key + len; |
| 1900 | } else { |
| 1901 | grn_bulk_writecxx . . $ grn_bulk_write(6df5a48525cbe78d).(ctx, bulk, (char *)key, len); |
| 1902 | } |
| 1903 | } |
| 1904 | return len; |
| 1905 | } |
| 1906 | |
| 1907 | int |
| 1908 | grn_pat_get_valuecxx . . $ grn_pat_get_value(27ffe75e7a870817).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id, void *valuebuf) |
| 1909 | { |
| 1910 | int value_size; |
| 1911 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1912 | return 0; |
| 1913 | } |
| 1914 | value_size = (int)pat->value_sizecxx . . $ _grn_pat#value_size.; |
| 1915 | if (value_size) { |
| 1916 | bytecxx . . $ byte# *v = (bytecxx . . $ byte# *)sis_atcxx . . $ sis_at(59e5564d0351a00f).(ctx, pat, id); |
| 1917 | if (v) { |
| 1918 | if (valuebuf) { |
| 1919 | if (pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_KEY_WITH_SIScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:305:9`!) { |
| 1920 | grn_memcpycxx . . $ `storage/mroonga/vendor/groonga/include/groonga/portability.h:31:11`!(valuebuf, v + sizeof(sis_node), value_size); |
| 1921 | } else { |
| 1922 | grn_memcpycxx . . $ `storage/mroonga/vendor/groonga/include/groonga/portability.h:31:11`!(valuebuf, v, value_size); |
| 1923 | } |
| 1924 | } |
| 1925 | return value_size; |
| 1926 | } |
| 1927 | } |
| 1928 | return 0; |
| 1929 | } |
| 1930 | |
| 1931 | const char * |
| 1932 | grn_pat_get_value_cxx . . $ grn_pat_get_value_(5b74e3d4f3bf1aa4).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id, uint32_tcxx . . $ uint32_t# *size) |
| 1933 | { |
| 1934 | const char *value = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1935 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1936 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1937 | } |
| 1938 | if ((*size = pat->value_sizecxx . . $ _grn_pat#value_size.)) { |
| 1939 | if ((value = (const char *)sis_atcxx . . $ sis_at(59e5564d0351a00f).(ctx, pat, id)) |
| 1940 | && (pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_KEY_WITH_SIScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:305:9`!)) { |
| 1941 | value += sizeof(sis_nodecxx . . $ sis_node#); |
| 1942 | } |
| 1943 | } |
| 1944 | return value; |
| 1945 | } |
| 1946 | |
| 1947 | grn_rccxx . . $ grn_rc# |
| 1948 | grn_pat_set_valuecxx . . $ grn_pat_set_value(d5f8c516acb30a1b).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id, |
| 1949 | const void *value, int flags) |
| 1950 | { |
| 1951 | grn_rccxx . . $ grn_rc# rc = grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat); |
| 1952 | if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 1953 | return rc; |
| 1954 | } |
| 1955 | if (value) { |
| 1956 | uint32_tcxx . . $ uint32_t# value_size = pat->value_sizecxx . . $ _grn_pat#value_size.; |
| 1957 | if (value_size) { |
| 1958 | bytecxx . . $ byte# *v = (bytecxx . . $ byte# *)sis_getcxx . . $ sis_get(59e5564d0351a00f).(ctx, pat, id); |
| 1959 | if (v) { |
| 1960 | if (pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_KEY_WITH_SIScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:305:9`!) { v += sizeof(sis_nodecxx . . $ sis_node#); } |
| 1961 | switch ((flags & GRN_OBJ_SET_MASKcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:719:9`!)) { |
| 1962 | case GRN_OBJ_SETcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:720:9`! : |
| 1963 | grn_memcpycxx . . $ `storage/mroonga/vendor/groonga/include/groonga/portability.h:31:11`!(v, value, value_size); |
| 1964 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 1965 | case GRN_OBJ_INCRcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:721:9`! : |
| 1966 | switch (value_size) { |
| 1967 | case sizeof(int32_tcxx . . $ int32_t#) : |
| 1968 | *((int32_tcxx . . $ int32_t# *)v) += *((int32_tcxx . . $ int32_t# *)value); |
| 1969 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 1970 | case sizeof(int64_tcxx . . $ int64_t#) : |
| 1971 | *((int64_tcxx . . $ int64_t# *)v) += *((int64_tcxx . . $ int64_t# *)value); |
| 1972 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 1973 | default : |
| 1974 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 1975 | } |
| 1976 | break; |
| 1977 | case GRN_OBJ_DECRcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:722:9`! : |
| 1978 | switch (value_size) { |
| 1979 | case sizeof(int32_tcxx . . $ int32_t#) : |
| 1980 | *((int32_tcxx . . $ int32_t# *)v) -= *((int32_tcxx . . $ int32_t# *)value); |
| 1981 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 1982 | case sizeof(int64_tcxx . . $ int64_t#) : |
| 1983 | *((int64_tcxx . . $ int64_t# *)v) -= *((int64_tcxx . . $ int64_t# *)value); |
| 1984 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 1985 | default : |
| 1986 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 1987 | } |
| 1988 | break; |
| 1989 | default : |
| 1990 | // todo : support other types. |
| 1991 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 1992 | } |
| 1993 | } else { |
| 1994 | return GRN_NO_MEMORY_AVAILABLEcxx . . $ GRN_NO_MEMORY_AVAILABLE.; |
| 1995 | } |
| 1996 | } |
| 1997 | } |
| 1998 | return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; |
| 1999 | } |
| 2000 | |
| 2001 | grn_rccxx . . $ grn_rc# |
| 2002 | grn_pat_infocxx . . $ grn_pat_info(d16cbc54fb4f6bf7).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, int *key_size, unsigned int *flags, |
| 2003 | grn_encodingcxx . . $ grn_encoding# *encoding, unsigned int *n_entries, unsigned int *file_size) |
| 2004 | { |
| 2005 | grn_rccxx . . $ grn_rc# rc; |
| 2006 | ERRCLRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:78:9`!(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2007 | if (!pat) { return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.; } |
| 2008 | rc = grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat); |
| 2009 | if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 2010 | return rc; |
| 2011 | } |
| 2012 | if (key_size) { *key_size = pat->key_sizecxx . . $ _grn_pat#key_size.; } |
| 2013 | if (flags) { *flags = pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags.; } |
| 2014 | if (encoding) { *encoding = pat->encodingcxx . . $ _grn_pat#encoding.; } |
| 2015 | if (n_entries) { *n_entries = pat->headercxx . . $ _grn_pat#header.->n_entriescxx . . $ grn_pat_header#n_entries.; } |
| 2016 | if (file_size) { |
| 2017 | uint64_tcxx . . $ uint64_t# tmp = 0; |
| 2018 | if ((rc = grn_io_sizecxx . . $ grn_io_size(cad0b01aa2d38ece).(ctx, pat->iocxx . . $ _grn_pat#io., &tmp))) { |
| 2019 | return rc; |
| 2020 | } |
| 2021 | *file_size = (unsigned int) tmp; /* FIXME: inappropriate cast */ |
| 2022 | } |
| 2023 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 2024 | } |
| 2025 | |
| 2026 | int |
| 2027 | grn_pat_delete_with_siscxx . . $ grn_pat_delete_with_sis(739b5184d11d4dfc).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id, |
| 2028 | grn_table_delete_optargcxx . . $ grn_table_delete_optarg# *optarg) |
| 2029 | { |
| 2030 | int level = 0, shared; |
| 2031 | const char *key = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, *_key; |
| 2032 | sis_nodecxx . . $ sis_node# *sp, *ss = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, *si; |
| 2033 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 2034 | return 0; |
| 2035 | } |
| 2036 | si = sis_atcxx . . $ sis_at(59e5564d0351a00f).(ctx, pat, id); |
| 2037 | while (id) { |
| 2038 | pat_nodecxx . . $ pat_node# *rn; |
| 2039 | uint32_tcxx . . $ uint32_t# key_size; |
| 2040 | if ((si && si->childrencxx . . $ $anonymous_type_40923699c27225f7_1#children. && si->childrencxx . . $ $anonymous_type_40923699c27225f7_1#children. != id) || |
| 2041 | (optarg && optarg->funccxx . . $ _grn_table_delete_optarg#func. && |
| 2042 | !optarg->funccxx . . $ _grn_table_delete_optarg#func.(ctx, (grn_objcxx . . $ grn_obj# *)pat, id, optarg->func_argcxx . . $ _grn_table_delete_optarg#func_arg.))) { |
| 2043 | break; |
| 2044 | } |
| 2045 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, rn); |
| 2046 | if (!(_key = (char *)pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, rn))) { return 0; } |
| 2047 | if (_key == key) { |
| 2048 | shared = 1; |
| 2049 | } else { |
| 2050 | key = _key; |
| 2051 | shared = 0; |
| 2052 | } |
| 2053 | key_size = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(rn); |
| 2054 | if (key && key_size) { _grn_pat_delcxx . . $ _grn_pat_del(2b3e365daee07c76).(ctx, pat, key, key_size, shared, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); } |
| 2055 | if (si) { |
| 2056 | grn_idcxx . . $ grn_id# *p, sid; |
| 2057 | uint32_tcxx . . $ uint32_t# lkey = 0; |
| 2058 | if ((*key & 0x80) && chopcxx . . $ chop(aabb55c024fea822).(ctx, pat, &key, key + key_size, &lkey)) { |
| 2059 | if ((sid = grn_pat_getcxx . . $ grn_pat_get(fa992a8ddbc8af6f).(ctx, pat, key, key_size - lkey, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) && |
| 2060 | (ss = sis_atcxx . . $ sis_at(59e5564d0351a00f).(ctx, pat, sid))) { |
| 2061 | for (p = &ss->childrencxx . . $ $anonymous_type_40923699c27225f7_1#children.; *p && *p != sid; p = &sp->siblingcxx . . $ $anonymous_type_40923699c27225f7_1#sibling.) { |
| 2062 | if (*p == id) { |
| 2063 | *p = si->siblingcxx . . $ $anonymous_type_40923699c27225f7_1#sibling.; |
| 2064 | break; |
| 2065 | } |
| 2066 | if (!(sp = sis_atcxx . . $ sis_at(59e5564d0351a00f).(ctx, pat, *p))) { break; } |
| 2067 | } |
| 2068 | } |
| 2069 | } else { |
| 2070 | sid = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2071 | } |
| 2072 | si->siblingcxx . . $ $anonymous_type_40923699c27225f7_1#sibling. = 0; |
| 2073 | si->childrencxx . . $ $anonymous_type_40923699c27225f7_1#children. = 0; |
| 2074 | id = sid; |
| 2075 | si = ss; |
| 2076 | } else { |
| 2077 | id = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2078 | } |
| 2079 | level++; |
| 2080 | } |
| 2081 | if (level) { |
| 2082 | uint32_tcxx . . $ uint32_t# lkey = 0; |
| 2083 | while (id && key) { |
| 2084 | uint32_tcxx . . $ uint32_t# key_size; |
| 2085 | if (_grn_pat_keycxx . . $ _grn_pat_key(5b74e3d4f3bf1aa4).(ctx, pat, id, &key_size) != key) { break; } |
| 2086 | { |
| 2087 | pat_nodecxx . . $ pat_node# *rn; |
| 2088 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, rn); |
| 2089 | if (!rn) { break; } |
| 2090 | if (lkey) { |
| 2091 | rn->keycxx . . $ $anonymous_type_40923699c27225f7_0#key. = lkey; |
| 2092 | } else { |
| 2093 | pat_node_set_keycxx . . $ pat_node_set_key(2952bcdd2cf1a35d).(ctx, pat, rn, (uint8_tcxx . . $ uint8_t# *)key, key_size); |
| 2094 | lkey = rn->keycxx . . $ $anonymous_type_40923699c27225f7_0#key.; |
| 2095 | } |
| 2096 | } |
| 2097 | { |
| 2098 | const char *end = key + key_size; |
| 2099 | if (!((*key & 0x80) && chopcxx . . $ chop(aabb55c024fea822).(ctx, pat, &key, end, &lkey))) { break; } |
| 2100 | id = grn_pat_getcxx . . $ grn_pat_get(fa992a8ddbc8af6f).(ctx, pat, key, end - key, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2101 | } |
| 2102 | } |
| 2103 | } |
| 2104 | return level; |
| 2105 | } |
| 2106 | |
| 2107 | grn_idcxx . . $ grn_id# |
| 2108 | grn_pat_nextcxx . . $ grn_pat_next(c27224444ab48125).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id) |
| 2109 | { |
| 2110 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 2111 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2112 | } |
| 2113 | while (++id <= pat->headercxx . . $ _grn_pat#header.->curr_reccxx . . $ grn_pat_header#curr_rec.) { |
| 2114 | uint32_tcxx . . $ uint32_t# key_size; |
| 2115 | const char *key = _grn_pat_keycxx . . $ _grn_pat_key(5b74e3d4f3bf1aa4).(ctx, pat, id, &key_size); |
| 2116 | if (id == grn_pat_getcxx . . $ grn_pat_get(fa992a8ddbc8af6f).(ctx, pat, key, key_size, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) { |
| 2117 | return id; |
| 2118 | } |
| 2119 | } |
| 2120 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2121 | } |
| 2122 | |
| 2123 | grn_idcxx . . $ grn_id# |
| 2124 | grn_pat_atcxx . . $ grn_pat_at(c27224444ab48125).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id) |
| 2125 | { |
| 2126 | uint32_tcxx . . $ uint32_t# key_size; |
| 2127 | const char *key = _grn_pat_keycxx . . $ _grn_pat_key(5b74e3d4f3bf1aa4).(ctx, pat, id, &key_size); |
| 2128 | if (key && (id == _grn_pat_getcxx . . $ _grn_pat_get(fa992a8ddbc8af6f).(ctx, pat, key, key_size, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!))) { return id; } |
| 2129 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2130 | } |
| 2131 | |
| 2132 | grn_idcxx . . $ grn_id# |
| 2133 | grn_pat_curr_idcxx . . $ grn_pat_curr_id(801003d623e3bbf5).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 2134 | { |
| 2135 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 2136 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2137 | } |
| 2138 | return pat->headercxx . . $ _grn_pat#header.->curr_reccxx . . $ grn_pat_header#curr_rec.; |
| 2139 | } |
| 2140 | |
| 2141 | int |
| 2142 | grn_pat_scancxx . . $ grn_pat_scan(656402c9c3a16ac).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, const char *str, unsigned int str_len, |
| 2143 | grn_pat_scan_hitcxx . . $ grn_pat_scan_hit# *sh, unsigned int sh_size, const char **rest) |
| 2144 | { |
| 2145 | int n = 0; |
| 2146 | grn_idcxx . . $ grn_id# tid; |
| 2147 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 2148 | return 0; |
| 2149 | } |
| 2150 | if (pat->normalizercxx . . $ _grn_pat#normalizer.) { |
| 2151 | int flags = |
| 2152 | GRN_STRING_REMOVE_BLANKcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1589:9`! | |
| 2153 | GRN_STRING_WITH_TYPEScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1590:9`! | |
| 2154 | GRN_STRING_WITH_CHECKScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1591:9`!; |
| 2155 | grn_objcxx . . $ grn_obj# *nstr = grn_string_opencxx . . $ grn_string_open(e91f62a415156742).(ctx, str, str_len, |
| 2156 | pat->normalizercxx . . $ _grn_pat#normalizer., flags); |
| 2157 | if (nstr) { |
| 2158 | const short *cp = grn_string_get_checkscxx . . $ grn_string_get_checks(392ec27081c21988).(ctx, nstr); |
| 2159 | const unsigned char *tp = grn_string_get_typescxx . . $ grn_string_get_types(e641985a04b6a30).(ctx, nstr); |
| 2160 | unsigned int offset = 0, offset0 = 0; |
| 2161 | unsigned int normalized_length_in_bytes; |
| 2162 | const char *sp, *se; |
| 2163 | grn_string_get_normalizedcxx . . $ grn_string_get_normalized(fcb0da4d05783f05).(ctx, nstr, &sp, &normalized_length_in_bytes, |
| 2164 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2165 | se = sp + normalized_length_in_bytes; |
| 2166 | while (n < (int) sh_size) { |
| 2167 | if ((tid = grn_pat_lcp_searchcxx . . $ grn_pat_lcp_search(16c60b50be975ec9).(ctx, pat, sp, se - sp))) { |
| 2168 | const char *key; |
| 2169 | uint32_tcxx . . $ uint32_t# len; |
| 2170 | int first_key_char_len; |
| 2171 | key = _grn_pat_keycxx . . $ _grn_pat_key(5b74e3d4f3bf1aa4).(ctx, pat, tid, &len); |
| 2172 | sh[n].idcxx . . $ _grn_table_scan_hit#id. = tid; |
| 2173 | sh[n].offsetcxx . . $ _grn_table_scan_hit#offset. = (*cp > 0) ? offset : offset0; |
| 2174 | first_key_char_len = grn_charlencxx . . $ grn_charlen(d229e8bf7c87f0f0).(ctx, key, key + len); |
| 2175 | if (sh[n].offsetcxx . . $ _grn_table_scan_hit#offset. > 0 && |
| 2176 | GRN_CHAR_IS_BLANKcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1597:9`!(tp[-1]) && |
| 2177 | ((first_key_char_len == 1 && key[0] != ' ') || |
| 2178 | first_key_char_len > 1)){ |
| 2179 | /* Remove leading spaces. */ |
| 2180 | const char *original_str = str + sh[n].offsetcxx . . $ _grn_table_scan_hit#offset.; |
| 2181 | while (grn_charlencxx . . $ grn_charlen(d229e8bf7c87f0f0).(ctx, original_str, str + str_len) == 1 && |
| 2182 | original_str[0] == ' ') { |
| 2183 | original_str++; |
| 2184 | sh[n].offsetcxx . . $ _grn_table_scan_hit#offset.++; |
| 2185 | } |
| 2186 | } |
| 2187 | { |
| 2188 | grn_boolcxx . . $ grn_bool# blank_in_alnum = GRN_FALSEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:45:9`!; |
| 2189 | const unsigned char *start_tp = tp; |
| 2190 | const unsigned char *blank_in_alnum_check_tp; |
| 2191 | while (len--) { |
| 2192 | if (*cp > 0) { offset0 = offset; offset += *cp; tp++; } |
| 2193 | sp++; cp++; |
| 2194 | } |
| 2195 | sh[n].lengthcxx . . $ _grn_table_scan_hit#length. = offset - sh[n].offsetcxx . . $ _grn_table_scan_hit#offset.; |
| 2196 | for (blank_in_alnum_check_tp = start_tp + 1; |
| 2197 | blank_in_alnum_check_tp < tp; |
| 2198 | blank_in_alnum_check_tp++) { |
| 2199 | #define GRN_CHAR_IS_ALNUMcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:2199:9`!(char_type) \ |
| 2200 | (GRN_CHAR_TYPEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1598:9`!(char_type) == GRN_CHAR_ALPHA || \ |
| 2201 | GRN_CHAR_TYPEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1598:9`!(char_type) == GRN_CHAR_DIGIT) |
| 2202 | if (GRN_CHAR_IS_BLANKcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1597:9`!(blank_in_alnum_check_tp[0]) && |
| 2203 | GRN_CHAR_IS_ALNUMcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:2199:9`!(blank_in_alnum_check_tp[-1]) && |
| 2204 | (blank_in_alnum_check_tp + 1) < tp && |
| 2205 | GRN_CHAR_IS_ALNUMcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:2199:9`!(blank_in_alnum_check_tp[1])) { |
| 2206 | blank_in_alnum = GRN_TRUEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:44:9`!; |
| 2207 | } |
| 2208 | #undef GRN_CHAR_IS_ALNUMcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:2199:9`! |
| 2209 | } |
| 2210 | if (!blank_in_alnum) { |
| 2211 | n++; |
| 2212 | } |
| 2213 | } |
| 2214 | } else { |
| 2215 | if (*cp > 0) { offset0 = offset; offset += *cp; tp++; } |
| 2216 | do { |
| 2217 | sp++; cp++; |
| 2218 | } while (sp < se && !*cp); |
| 2219 | } |
| 2220 | if (se <= sp) { offset = str_len; break; } |
| 2221 | } |
| 2222 | if (rest) { |
| 2223 | grn_string_get_originalcxx . . $ grn_string_get_original(87996916c40b1978).(ctx, nstr, rest, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2224 | *rest += offset; |
| 2225 | } |
| 2226 | grn_obj_closecxx . . $ grn_obj_close(4865d068a46d0f83).(ctx, nstr); |
| 2227 | } else { |
| 2228 | n = -1; |
| 2229 | if (rest) { *rest = str; } |
| 2230 | } |
| 2231 | } else { |
| 2232 | uint32_tcxx . . $ uint32_t# len; |
| 2233 | const char *sp, *se = str + str_len; |
| 2234 | for (sp = str; sp < se && n < (int) sh_size; sp += len) { |
| 2235 | if ((tid = grn_pat_lcp_searchcxx . . $ grn_pat_lcp_search(16c60b50be975ec9).(ctx, pat, sp, se - sp))) { |
| 2236 | _grn_pat_keycxx . . $ _grn_pat_key(5b74e3d4f3bf1aa4).(ctx, pat, tid, &len); |
| 2237 | sh[n].idcxx . . $ _grn_table_scan_hit#id. = tid; |
| 2238 | sh[n].offsetcxx . . $ _grn_table_scan_hit#offset. = sp - str; |
| 2239 | sh[n].lengthcxx . . $ _grn_table_scan_hit#length. = len; |
| 2240 | n++; |
| 2241 | } else { |
| 2242 | len = grn_charlencxx . . $ grn_charlen(d229e8bf7c87f0f0).(ctx, sp, se); |
| 2243 | } |
| 2244 | if (!len) { break; } |
| 2245 | } |
| 2246 | if (rest) { *rest = sp; } |
| 2247 | } |
| 2248 | return n; |
| 2249 | } |
| 2250 | |
| 2251 | #define INITIAL_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:2251:9`! 512 |
| 2252 | |
| 2253 | inline static void |
| 2254 | pushcxx . . $ push(82233c8eae791b0f).(grn_pat_cursorcxx . . $ grn_pat_cursor# *c, grn_idcxx . . $ grn_id# id, uint16_tcxx . . $ uint16_t# check) |
| 2255 | { |
| 2256 | grn_ctxcxx . . $ grn_ctx# *ctx = c->ctxcxx . . $ _grn_pat_cursor#ctx.; |
| 2257 | grn_pat_cursor_entrycxx . . $ grn_pat_cursor_entry# *se; |
| 2258 | if (c->sizecxx . . $ _grn_pat_cursor#size. <= c->spcxx . . $ _grn_pat_cursor#sp.) { |
| 2259 | if (c->sscxx . . $ _grn_pat_cursor#ss.) { |
| 2260 | uint32_tcxx . . $ uint32_t# size = c->sizecxx . . $ _grn_pat_cursor#size. * 4; |
| 2261 | grn_pat_cursor_entrycxx . . $ grn_pat_cursor_entry# *ss = GRN_REALLOCcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:40:9`!(c->ss, size); |
| 2262 | if (!ss) { return; /* give up */ } |
| 2263 | c->sscxx . . $ _grn_pat_cursor#ss. = ss; |
| 2264 | c->sizecxx . . $ _grn_pat_cursor#size. = size; |
| 2265 | } else { |
| 2266 | if (!(c->sscxx . . $ _grn_pat_cursor#ss. = GRN_MALLOCcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:38:9`!(sizeof(grn_pat_cursor_entry) * INITIAL_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:2251:9`!))) { |
| 2267 | return; /* give up */ |
| 2268 | } |
| 2269 | c->sizecxx . . $ _grn_pat_cursor#size. = INITIAL_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:2251:9`!; |
| 2270 | } |
| 2271 | } |
| 2272 | se = &c->sscxx . . $ _grn_pat_cursor#ss.[c->spcxx . . $ _grn_pat_cursor#sp.++]; |
| 2273 | se->idcxx . . $ _grn_pat_cursor_entry#id. = id; |
| 2274 | se->checkcxx . . $ _grn_pat_cursor_entry#check. = check; |
| 2275 | } |
| 2276 | |
| 2277 | inline static grn_pat_cursor_entrycxx . . $ grn_pat_cursor_entry# * |
| 2278 | popcxx . . $ pop(c8fc8ff475d3482a).(grn_pat_cursorcxx . . $ grn_pat_cursor# *c) |
| 2279 | { |
| 2280 | return c->spcxx . . $ _grn_pat_cursor#sp. ? &c->sscxx . . $ _grn_pat_cursor#ss.[--c->spcxx . . $ _grn_pat_cursor#sp.] : NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2281 | } |
| 2282 | |
| 2283 | static grn_idcxx . . $ grn_id# |
| 2284 | grn_pat_cursor_next_by_idcxx . . $ grn_pat_cursor_next_by_id(5452c9aa69698298).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_pat_cursorcxx . . $ grn_pat_cursor# *c) |
| 2285 | { |
| 2286 | grn_patcxx . . $ grn_pat# *pat = c->patcxx . . $ _grn_pat_cursor#pat.; |
| 2287 | int dir = (c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_CURSOR_DESCENDINGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:57:9`!) ? -1 : 1; |
| 2288 | while (c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. != c->tailcxx . . $ _grn_pat_cursor#tail.) { |
| 2289 | c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. += dir; |
| 2290 | if (pat->headercxx . . $ _grn_pat#header.->n_garbagescxx . . $ grn_pat_header#n_garbages.) { |
| 2291 | uint32_tcxx . . $ uint32_t# key_size; |
| 2292 | const void *key = _grn_pat_keycxx . . $ _grn_pat_key(5b74e3d4f3bf1aa4).(ctx, pat, c->curr_reccxx . . $ _grn_pat_cursor#curr_rec., &key_size); |
| 2293 | if (_grn_pat_getcxx . . $ _grn_pat_get(fa992a8ddbc8af6f).(ctx, pat, key, key_size, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) != c->curr_reccxx . . $ _grn_pat_cursor#curr_rec.) { |
| 2294 | continue; |
| 2295 | } |
| 2296 | } |
| 2297 | c->restcxx . . $ _grn_pat_cursor#rest.--; |
| 2298 | return c->curr_reccxx . . $ _grn_pat_cursor#curr_rec.; |
| 2299 | } |
| 2300 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2301 | } |
| 2302 | |
| 2303 | grn_idcxx . . $ grn_id# |
| 2304 | grn_pat_cursor_nextcxx . . $ grn_pat_cursor_next(5452c9aa69698298).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_pat_cursorcxx . . $ grn_pat_cursor# *c) |
| 2305 | { |
| 2306 | pat_nodecxx . . $ pat_node# *node; |
| 2307 | grn_pat_cursor_entrycxx . . $ grn_pat_cursor_entry# *se; |
| 2308 | if (!c->restcxx . . $ _grn_pat_cursor#rest.) { return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; } |
| 2309 | if ((c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_CURSOR_BY_IDcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:63:9`!)) { |
| 2310 | return grn_pat_cursor_next_by_idcxx . . $ grn_pat_cursor_next_by_id(5452c9aa69698298).(ctx, c); |
| 2311 | } |
| 2312 | while ((se = popcxx . . $ pop(c8fc8ff475d3482a).(c))) { |
| 2313 | grn_idcxx . . $ grn_id# id = se->idcxx . . $ _grn_pat_cursor_entry#id.; |
| 2314 | int check = se->checkcxx . . $ _grn_pat_cursor_entry#check., ch; |
| 2315 | while (id) { |
| 2316 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(c->pat, id, node); |
| 2317 | if (!node) { |
| 2318 | break; |
| 2319 | } |
| 2320 | ch = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node); |
| 2321 | if (ch > check) { |
| 2322 | if (c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_CURSOR_DESCENDINGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:57:9`!) { |
| 2323 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], ch); |
| 2324 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 2325 | } else { |
| 2326 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], ch); |
| 2327 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 2328 | } |
| 2329 | check = ch; |
| 2330 | continue; |
| 2331 | } else { |
| 2332 | if (id == c->tailcxx . . $ _grn_pat_cursor#tail.) { |
| 2333 | c->spcxx . . $ _grn_pat_cursor#sp. = 0; |
| 2334 | } else { |
| 2335 | if (!c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. && c->tailcxx . . $ _grn_pat_cursor#tail.) { |
| 2336 | uint32_tcxx . . $ uint32_t# lmin, lmax; |
| 2337 | pat_nodecxx . . $ pat_node# *nmin, *nmax; |
| 2338 | const uint8_tcxx . . $ uint8_t# *kmin, *kmax; |
| 2339 | if (c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_CURSOR_DESCENDINGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:57:9`!) { |
| 2340 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(c->pat, c->tail, nmin); |
| 2341 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(c->pat, id, nmax); |
| 2342 | } else { |
| 2343 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(c->pat, id, nmin); |
| 2344 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(c->pat, c->tail, nmax); |
| 2345 | } |
| 2346 | lmin = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(nmin); |
| 2347 | lmax = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(nmax); |
| 2348 | kmin = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, c->patcxx . . $ _grn_pat_cursor#pat., nmin); |
| 2349 | kmax = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, c->patcxx . . $ _grn_pat_cursor#pat., nmax); |
| 2350 | if ((lmin < lmax) ? |
| 2351 | (memcmpcxx . . $ memcmp(36f949851efa3055).(kmin, kmax, lmin) > 0) : |
| 2352 | (memcmpcxx . . $ memcmp(36f949851efa3055).(kmin, kmax, lmax) >= 0)) { |
| 2353 | c->spcxx . . $ _grn_pat_cursor#sp. = 0; |
| 2354 | break; |
| 2355 | } |
| 2356 | } |
| 2357 | } |
| 2358 | c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. = id; |
| 2359 | c->restcxx . . $ _grn_pat_cursor#rest.--; |
| 2360 | return id; |
| 2361 | } |
| 2362 | } |
| 2363 | } |
| 2364 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2365 | } |
| 2366 | |
| 2367 | void |
| 2368 | grn_pat_cursor_closecxx . . $ grn_pat_cursor_close(e6719157d7b0b236).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_pat_cursorcxx . . $ grn_pat_cursor# *c) |
| 2369 | { |
| 2370 | GRN_ASSERTcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:413:9`!(c->ctx == ctx); |
| 2371 | if (c->sscxx . . $ _grn_pat_cursor#ss.) { GRN_FREEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:46:9`!(c->ss); } |
| 2372 | GRN_FREEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:46:9`!(c); |
| 2373 | } |
| 2374 | |
| 2375 | inline static int |
| 2376 | bitcmpcxx . . $ bitcmp(b507788d7c814a65).(const void *s1, const void *s2, int offset, int length) |
| 2377 | { |
| 2378 | int r, rest = length + (offset & 7) - 8, bl = offset >> 3, mask = 0xff >> (offset & 7); |
| 2379 | unsigned char *a = (unsigned char *)s1 + bl, *b = (unsigned char *)s2 + bl; |
| 2380 | if (rest <= 0) { |
| 2381 | mask &= 0xff << -rest; |
| 2382 | return (*a & mask) - (*b & mask); |
| 2383 | } |
| 2384 | if ((r = (*a & mask) - (*b & mask))) { return r; } |
| 2385 | a++; b++; |
| 2386 | if ((bl = rest >> 3)) { |
| 2387 | if ((r = memcmpcxx . . $ memcmp(36f949851efa3055).(a, b, bl))) { return r; } |
| 2388 | a += bl; b += bl; |
| 2389 | } |
| 2390 | mask = 0xff << (8 - (rest & 7)); |
| 2391 | return (*a & mask) - (*b & mask); |
| 2392 | } |
| 2393 | |
| 2394 | inline static grn_rccxx . . $ grn_rc# |
| 2395 | set_cursor_prefixcxx . . $ set_cursor_prefix(90a2438889753746).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, |
| 2396 | const void *key, uint32_tcxx . . $ uint32_t# key_size, int flags) |
| 2397 | { |
| 2398 | int c0 = -1, ch; |
| 2399 | const uint8_tcxx . . $ uint8_t# *k; |
| 2400 | uint32_tcxx . . $ uint32_t# len, byte_len; |
| 2401 | grn_idcxx . . $ grn_id# id; |
| 2402 | pat_nodecxx . . $ pat_node# *node; |
| 2403 | uint8_tcxx . . $ uint8_t# keybuf[MAX_FIXED_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:879:9`!]; |
| 2404 | if (flags & GRN_CURSOR_SIZE_BY_BITcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:65:9`!) { |
| 2405 | len = key_size * 2; |
| 2406 | byte_len = key_size >> 3; |
| 2407 | } else { |
| 2408 | len = key_size * 16; |
| 2409 | byte_len = key_size; |
| 2410 | } |
| 2411 | KEY_ENCODEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:933:9`!(pat, keybuf, key, byte_len); |
| 2412 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, node); |
| 2413 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 2414 | while (id) { |
| 2415 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 2416 | if (!node) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 2417 | ch = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node); |
| 2418 | if (c0 < ch && ch < (int) len - 1) { |
| 2419 | if (ch & 1) { |
| 2420 | id = (ch + 1 < (int) len) ? node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] : node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 2421 | } else { |
| 2422 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!((uint8_t *)key, ch, len)]; |
| 2423 | } |
| 2424 | c0 = ch; |
| 2425 | continue; |
| 2426 | } |
| 2427 | if (!(k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, node))) { break; } |
| 2428 | if (PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(node) < byte_len) { break; } |
| 2429 | if ((flags & GRN_CURSOR_SIZE_BY_BITcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:65:9`!) |
| 2430 | ? !bitcmpcxx . . $ bitcmp(b507788d7c814a65).(k, key, 0, key_size) |
| 2431 | : !memcmpcxx . . $ memcmp(36f949851efa3055).(k, key, key_size)) { |
| 2432 | if (c0 < ch) { |
| 2433 | if (flags & GRN_CURSOR_DESCENDINGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:57:9`!) { |
| 2434 | if ((ch > (int) len - 1) || !(flags & GRN_CURSOR_GTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:59:9`!)) { |
| 2435 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], ch); |
| 2436 | } |
| 2437 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], ch); |
| 2438 | } else { |
| 2439 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], ch); |
| 2440 | if ((ch > (int) len - 1) || !(flags & GRN_CURSOR_GTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:59:9`!)) { |
| 2441 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], ch); |
| 2442 | } |
| 2443 | } |
| 2444 | } else { |
| 2445 | if (PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(node) * 16 > len || !(flags & GRN_CURSOR_GTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:59:9`!)) { |
| 2446 | pushcxx . . $ push(82233c8eae791b0f).(c, id, ch); |
| 2447 | } |
| 2448 | } |
| 2449 | } |
| 2450 | break; |
| 2451 | } |
| 2452 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 2453 | } |
| 2454 | |
| 2455 | inline static grn_rccxx . . $ grn_rc# |
| 2456 | set_cursor_nearcxx . . $ set_cursor_near(5f7b65b68792d090).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, |
| 2457 | uint32_tcxx . . $ uint32_t# min_size, const void *key, int flags) |
| 2458 | { |
| 2459 | grn_idcxx . . $ grn_id# id; |
| 2460 | pat_nodecxx . . $ pat_node# *node; |
| 2461 | const uint8_tcxx . . $ uint8_t# *k; |
| 2462 | int r, check = -1, ch; |
| 2463 | uint32_tcxx . . $ uint32_t# min = min_size * 16; |
| 2464 | uint8_tcxx . . $ uint8_t# keybuf[MAX_FIXED_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:879:9`!]; |
| 2465 | KEY_ENCODEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:933:9`!(pat, keybuf, key, pat->key_size); |
| 2466 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, node); |
| 2467 | for (id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; id;) { |
| 2468 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 2469 | if (!node) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 2470 | ch = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node); |
| 2471 | if (ch <= check) { |
| 2472 | if (check >= (int) min) { pushcxx . . $ push(82233c8eae791b0f).(c, id, check); } |
| 2473 | break; |
| 2474 | } |
| 2475 | if ((check += 2) < ch) { |
| 2476 | if (!(k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, node))) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 2477 | if ((r = bitcmpcxx . . $ bitcmp(b507788d7c814a65).(key, k, check >> 1, (ch - check) >> 1))) { |
| 2478 | if (ch >= (int) min) { |
| 2479 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], ch); |
| 2480 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], ch); |
| 2481 | } |
| 2482 | break; |
| 2483 | } |
| 2484 | } |
| 2485 | check = ch; |
| 2486 | if (nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!((uint8_t *)key, check, pat->key_size)) { |
| 2487 | if (check >= (int) min) { pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], check); } |
| 2488 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 2489 | } else { |
| 2490 | if (check >= (int) min) { pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], check); } |
| 2491 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 2492 | } |
| 2493 | } |
| 2494 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 2495 | } |
| 2496 | |
| 2497 | inline static grn_rccxx . . $ grn_rc# |
| 2498 | set_cursor_common_prefixcxx . . $ set_cursor_common_prefix(5c9d444d27147bbe).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, |
| 2499 | uint32_tcxx . . $ uint32_t# min_size, const void *key, uint32_tcxx . . $ uint32_t# key_size, int flags) |
| 2500 | { |
| 2501 | grn_idcxx . . $ grn_id# id; |
| 2502 | pat_nodecxx . . $ pat_node# *node; |
| 2503 | const uint8_tcxx . . $ uint8_t# *k; |
| 2504 | int check = -1, ch; |
| 2505 | uint32_tcxx . . $ uint32_t# len = key_size * 16; |
| 2506 | uint8_tcxx . . $ uint8_t# keybuf[MAX_FIXED_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:879:9`!]; |
| 2507 | KEY_ENCODEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:933:9`!(pat, keybuf, key, key_size); |
| 2508 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, node); |
| 2509 | for (id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; id;) { |
| 2510 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 2511 | if (!node) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 2512 | ch = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node); |
| 2513 | if (ch <= check) { |
| 2514 | if (!(k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, node))) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 2515 | { |
| 2516 | uint32_tcxx . . $ uint32_t# l = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(node); |
| 2517 | if (min_size <= l && l <= key_size) { |
| 2518 | if (!memcmpcxx . . $ memcmp(36f949851efa3055).(key, k, l)) { pushcxx . . $ push(82233c8eae791b0f).(c, id, check); } |
| 2519 | } |
| 2520 | } |
| 2521 | break; |
| 2522 | } |
| 2523 | check = ch; |
| 2524 | if ((int) len <= check) { break; } |
| 2525 | if (check & 1) { |
| 2526 | grn_idcxx . . $ grn_id# id0 = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 2527 | pat_nodecxx . . $ pat_node# *node0; |
| 2528 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id0, node0); |
| 2529 | if (!node0) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 2530 | if (!(k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, node0))) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 2531 | { |
| 2532 | uint32_tcxx . . $ uint32_t# l = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(node0); |
| 2533 | if (memcmpcxx . . $ memcmp(36f949851efa3055).(key, k, l)) { break; } |
| 2534 | if (min_size <= l) { |
| 2535 | pushcxx . . $ push(82233c8eae791b0f).(c, id0, check); |
| 2536 | } |
| 2537 | } |
| 2538 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 2539 | } else { |
| 2540 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!((uint8_t *)key, check, len)]; |
| 2541 | } |
| 2542 | } |
| 2543 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 2544 | } |
| 2545 | |
| 2546 | inline static grn_rccxx . . $ grn_rc# |
| 2547 | set_cursor_ascendcxx . . $ set_cursor_ascend(90a2438889753746).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, |
| 2548 | const void *key, uint32_tcxx . . $ uint32_t# key_size, int flags) |
| 2549 | { |
| 2550 | grn_idcxx . . $ grn_id# id; |
| 2551 | pat_nodecxx . . $ pat_node# *node; |
| 2552 | const uint8_tcxx . . $ uint8_t# *k; |
| 2553 | int r, check = -1, ch, c2; |
| 2554 | uint32_tcxx . . $ uint32_t# len = key_size * 16; |
| 2555 | uint8_tcxx . . $ uint8_t# keybuf[MAX_FIXED_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:879:9`!]; |
| 2556 | KEY_ENCODEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:933:9`!(pat, keybuf, key, key_size); |
| 2557 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, node); |
| 2558 | for (id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; id;) { |
| 2559 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 2560 | if (!node) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 2561 | ch = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node); |
| 2562 | if (ch <= check) { |
| 2563 | if (!(k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, node))) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 2564 | { |
| 2565 | uint32_tcxx . . $ uint32_t# l = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(node); |
| 2566 | if (l == key_size) { |
| 2567 | if (flags & GRN_CURSOR_GTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:59:9`!) { |
| 2568 | if (memcmpcxx . . $ memcmp(36f949851efa3055).(key, k, l) < 0) { pushcxx . . $ push(82233c8eae791b0f).(c, id, check); } |
| 2569 | } else { |
| 2570 | if (memcmpcxx . . $ memcmp(36f949851efa3055).(key, k, l) <= 0) { pushcxx . . $ push(82233c8eae791b0f).(c, id, check); } |
| 2571 | } |
| 2572 | } else if (l < key_size) { |
| 2573 | if (memcmpcxx . . $ memcmp(36f949851efa3055).(key, k, l) < 0) { pushcxx . . $ push(82233c8eae791b0f).(c, id, check); } |
| 2574 | } else { |
| 2575 | if (memcmpcxx . . $ memcmp(36f949851efa3055).(key, k, key_size) <= 0) { pushcxx . . $ push(82233c8eae791b0f).(c, id, check); } |
| 2576 | } |
| 2577 | } |
| 2578 | break; |
| 2579 | } |
| 2580 | c2 = (int) len < ch ? (int) len : ch; |
| 2581 | if ((check += 2) < c2) { |
| 2582 | if (!(k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, node))) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 2583 | if ((r = bitcmpcxx . . $ bitcmp(b507788d7c814a65).(key, k, check >> 1, ((c2 + 1) >> 1) - (check >> 1)))) { |
| 2584 | if (r < 0) { |
| 2585 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], ch); |
| 2586 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], ch); |
| 2587 | } |
| 2588 | break; |
| 2589 | } |
| 2590 | } |
| 2591 | check = ch; |
| 2592 | if ((int) len <= check) { |
| 2593 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], ch); |
| 2594 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], ch); |
| 2595 | break; |
| 2596 | } |
| 2597 | if (check & 1) { |
| 2598 | if (check + 1 < (int) len) { |
| 2599 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 2600 | } else { |
| 2601 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], check); |
| 2602 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 2603 | } |
| 2604 | } else { |
| 2605 | if (nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!((uint8_t *)key, check, len)) { |
| 2606 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 2607 | } else { |
| 2608 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], check); |
| 2609 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 2610 | } |
| 2611 | } |
| 2612 | } |
| 2613 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 2614 | } |
| 2615 | |
| 2616 | inline static grn_rccxx . . $ grn_rc# |
| 2617 | set_cursor_descendcxx . . $ set_cursor_descend(90a2438889753746).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, |
| 2618 | const void *key, uint32_tcxx . . $ uint32_t# key_size, int flags) |
| 2619 | { |
| 2620 | grn_idcxx . . $ grn_id# id; |
| 2621 | pat_nodecxx . . $ pat_node# *node; |
| 2622 | const uint8_tcxx . . $ uint8_t# *k; |
| 2623 | int r, check = -1, ch, c2; |
| 2624 | uint32_tcxx . . $ uint32_t# len = key_size * 16; |
| 2625 | uint8_tcxx . . $ uint8_t# keybuf[MAX_FIXED_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:879:9`!]; |
| 2626 | KEY_ENCODEcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:933:9`!(pat, keybuf, key, key_size); |
| 2627 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, node); |
| 2628 | for (id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; id;) { |
| 2629 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 2630 | if (!node) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 2631 | ch = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node); |
| 2632 | if (ch <= check) { |
| 2633 | if (!(k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, node))) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 2634 | { |
| 2635 | uint32_tcxx . . $ uint32_t# l = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(node); |
| 2636 | if (l <= key_size) { |
| 2637 | if ((flags & GRN_CURSOR_LTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:61:9`!) && l == key_size) { |
| 2638 | if (memcmpcxx . . $ memcmp(36f949851efa3055).(key, k, l) > 0) { pushcxx . . $ push(82233c8eae791b0f).(c, id, check); } |
| 2639 | } else { |
| 2640 | if (memcmpcxx . . $ memcmp(36f949851efa3055).(key, k, l) >= 0) { pushcxx . . $ push(82233c8eae791b0f).(c, id, check); } |
| 2641 | } |
| 2642 | } else { |
| 2643 | if (memcmpcxx . . $ memcmp(36f949851efa3055).(key, k, key_size) > 0) { pushcxx . . $ push(82233c8eae791b0f).(c, id, check); } |
| 2644 | } |
| 2645 | } |
| 2646 | break; |
| 2647 | } |
| 2648 | c2 = (int) len < ch ? (int) len : ch; |
| 2649 | if ((check += 2) < c2) { |
| 2650 | if (!(k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, node))) { return GRN_FILE_CORRUPTcxx . . $ GRN_FILE_CORRUPT.; } |
| 2651 | if ((r = bitcmpcxx . . $ bitcmp(b507788d7c814a65).(key, k, check >> 1, ((c2 + 1) >> 1) - (check >> 1)))) { |
| 2652 | if (r >= 0) { |
| 2653 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], ch); |
| 2654 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], ch); |
| 2655 | } |
| 2656 | break; |
| 2657 | } |
| 2658 | } |
| 2659 | check = ch; |
| 2660 | if ((int) len <= check) { break; } |
| 2661 | if (check & 1) { |
| 2662 | if (check + 1 < (int) len) { |
| 2663 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], check); |
| 2664 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 2665 | } else { |
| 2666 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 2667 | } |
| 2668 | } else { |
| 2669 | if (nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!((uint8_t *)key, check, len)) { |
| 2670 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], check); |
| 2671 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 2672 | } else { |
| 2673 | id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 2674 | } |
| 2675 | } |
| 2676 | } |
| 2677 | return GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 2678 | } |
| 2679 | |
| 2680 | static grn_pat_cursorcxx . . $ grn_pat_cursor# * |
| 2681 | grn_pat_cursor_open_by_idcxx . . $ grn_pat_cursor_open_by_id(b2668de89fd2b39a).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, |
| 2682 | const void *min, uint32_tcxx . . $ uint32_t# min_size, |
| 2683 | const void *max, uint32_tcxx . . $ uint32_t# max_size, |
| 2684 | int offset, int limit, int flags) |
| 2685 | { |
| 2686 | int dir; |
| 2687 | grn_pat_cursorcxx . . $ grn_pat_cursor# *c; |
| 2688 | if (!pat || !ctx) { return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; } |
| 2689 | if (!(c = GRN_MALLOCNcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:47:9`!(grn_pat_cursor, 1))) { return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; } |
| 2690 | GRN_DB_OBJ_SET_TYPEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:476:9`!(c, GRN_CURSOR_TABLE_PAT_KEYcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:371:9`!); |
| 2691 | c->patcxx . . $ _grn_pat_cursor#pat. = pat; |
| 2692 | c->ctxcxx . . $ _grn_pat_cursor#ctx. = ctx; |
| 2693 | c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. = flags; |
| 2694 | c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..domaincxx . . $ _grn_obj_header#domain. = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2695 | c->sizecxx . . $ _grn_pat_cursor#size. = 0; |
| 2696 | c->spcxx . . $ _grn_pat_cursor#sp. = 0; |
| 2697 | c->sscxx . . $ _grn_pat_cursor#ss. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2698 | c->tailcxx . . $ _grn_pat_cursor#tail. = 0; |
| 2699 | if (flags & GRN_CURSOR_DESCENDINGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:57:9`!) { |
| 2700 | dir = -1; |
| 2701 | if (max) { |
| 2702 | if (!(c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. = grn_pat_getcxx . . $ grn_pat_get(fa992a8ddbc8af6f).(ctx, pat, max, max_size, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!))) { |
| 2703 | c->tailcxx . . $ _grn_pat_cursor#tail. = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2704 | goto exit; |
| 2705 | } |
| 2706 | if (!(flags & GRN_CURSOR_LTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:61:9`!)) { c->curr_reccxx . . $ _grn_pat_cursor#curr_rec.++; } |
| 2707 | } else { |
| 2708 | c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. = pat->headercxx . . $ _grn_pat#header.->curr_reccxx . . $ grn_pat_header#curr_rec. + 1; |
| 2709 | } |
| 2710 | if (min) { |
| 2711 | if (!(c->tailcxx . . $ _grn_pat_cursor#tail. = grn_pat_getcxx . . $ grn_pat_get(fa992a8ddbc8af6f).(ctx, pat, min, min_size, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!))) { |
| 2712 | c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2713 | goto exit; |
| 2714 | } |
| 2715 | if ((flags & GRN_CURSOR_GTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:59:9`!)) { c->tailcxx . . $ _grn_pat_cursor#tail.++; } |
| 2716 | } else { |
| 2717 | c->tailcxx . . $ _grn_pat_cursor#tail. = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`! + 1; |
| 2718 | } |
| 2719 | if (c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. < c->tailcxx . . $ _grn_pat_cursor#tail.) { c->tailcxx . . $ _grn_pat_cursor#tail. = c->curr_reccxx . . $ _grn_pat_cursor#curr_rec.; } |
| 2720 | } else { |
| 2721 | dir = 1; |
| 2722 | if (min) { |
| 2723 | if (!(c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. = grn_pat_getcxx . . $ grn_pat_get(fa992a8ddbc8af6f).(ctx, pat, min, min_size, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!))) { |
| 2724 | c->tailcxx . . $ _grn_pat_cursor#tail. = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2725 | goto exit; |
| 2726 | } |
| 2727 | if (!(flags & GRN_CURSOR_GTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:59:9`!)) { c->curr_reccxx . . $ _grn_pat_cursor#curr_rec.--; } |
| 2728 | } else { |
| 2729 | c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2730 | } |
| 2731 | if (max) { |
| 2732 | if (!(c->tailcxx . . $ _grn_pat_cursor#tail. = grn_pat_getcxx . . $ grn_pat_get(fa992a8ddbc8af6f).(ctx, pat, max, max_size, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!))) { |
| 2733 | c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2734 | goto exit; |
| 2735 | } |
| 2736 | if ((flags & GRN_CURSOR_LTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:61:9`!)) { c->tailcxx . . $ _grn_pat_cursor#tail.--; } |
| 2737 | } else { |
| 2738 | c->tailcxx . . $ _grn_pat_cursor#tail. = pat->headercxx . . $ _grn_pat#header.->curr_reccxx . . $ grn_pat_header#curr_rec.; |
| 2739 | } |
| 2740 | if (c->tailcxx . . $ _grn_pat_cursor#tail. < c->curr_reccxx . . $ _grn_pat_cursor#curr_rec.) { c->tailcxx . . $ _grn_pat_cursor#tail. = c->curr_reccxx . . $ _grn_pat_cursor#curr_rec.; } |
| 2741 | } |
| 2742 | if (pat->headercxx . . $ _grn_pat#header.->n_garbagescxx . . $ grn_pat_header#n_garbages.) { |
| 2743 | while (offset && c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. != c->tailcxx . . $ _grn_pat_cursor#tail.) { |
| 2744 | uint32_tcxx . . $ uint32_t# key_size; |
| 2745 | const void *key; |
| 2746 | c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. += dir; |
| 2747 | key = _grn_pat_keycxx . . $ _grn_pat_key(5b74e3d4f3bf1aa4).(ctx, pat, c->curr_reccxx . . $ _grn_pat_cursor#curr_rec., &key_size); |
| 2748 | if (_grn_pat_getcxx . . $ _grn_pat_get(fa992a8ddbc8af6f).(ctx, pat, key, key_size, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) == c->curr_reccxx . . $ _grn_pat_cursor#curr_rec.) { |
| 2749 | offset--; |
| 2750 | } |
| 2751 | } |
| 2752 | } else { |
| 2753 | if ((int) (dir * (c->tailcxx . . $ _grn_pat_cursor#tail. - c->curr_reccxx . . $ _grn_pat_cursor#curr_rec.)) < offset) { |
| 2754 | c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. = c->tailcxx . . $ _grn_pat_cursor#tail.; |
| 2755 | } else { |
| 2756 | c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. += dir * offset; |
| 2757 | } |
| 2758 | } |
| 2759 | c->restcxx . . $ _grn_pat_cursor#rest. = (limit < 0) ? GRN_ID_MAXcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:42:9`! : limit; |
| 2760 | exit : |
| 2761 | return c; |
| 2762 | } |
| 2763 | |
| 2764 | static grn_rccxx . . $ grn_rc# set_cursor_rkcxx . . $ set_cursor_rk(90a2438889753746).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, |
| 2765 | const void *key, uint32_tcxx . . $ uint32_t# key_size, int flags); |
| 2766 | |
| 2767 | grn_pat_cursorcxx . . $ grn_pat_cursor# * |
| 2768 | grn_pat_cursor_opencxx . . $ grn_pat_cursor_open(b2668de89fd2b39a).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, |
| 2769 | const void *min, uint32_tcxx . . $ uint32_t# min_size, |
| 2770 | const void *max, uint32_tcxx . . $ uint32_t# max_size, |
| 2771 | int offset, int limit, int flags) |
| 2772 | { |
| 2773 | grn_idcxx . . $ grn_id# id; |
| 2774 | pat_nodecxx . . $ pat_node# *node; |
| 2775 | grn_pat_cursorcxx . . $ grn_pat_cursor# *c; |
| 2776 | if (!pat || !ctx) { return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; } |
| 2777 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 2778 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2779 | } |
| 2780 | if ((flags & GRN_CURSOR_BY_IDcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:63:9`!)) { |
| 2781 | return grn_pat_cursor_open_by_idcxx . . $ grn_pat_cursor_open_by_id(b2668de89fd2b39a).(ctx, pat, min, min_size, max, max_size, |
| 2782 | offset, limit, flags); |
| 2783 | } |
| 2784 | if (!(c = GRN_MALLOCNcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_alloc.h:47:9`!(grn_pat_cursor, 1))) { return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; } |
| 2785 | GRN_DB_OBJ_SET_TYPEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx.h:476:9`!(c, GRN_CURSOR_TABLE_PAT_KEYcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:371:9`!); |
| 2786 | c->patcxx . . $ _grn_pat_cursor#pat. = pat; |
| 2787 | c->ctxcxx . . $ _grn_pat_cursor#ctx. = ctx; |
| 2788 | c->sizecxx . . $ _grn_pat_cursor#size. = 0; |
| 2789 | c->spcxx . . $ _grn_pat_cursor#sp. = 0; |
| 2790 | c->sscxx . . $ _grn_pat_cursor#ss. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2791 | c->tailcxx . . $ _grn_pat_cursor#tail. = 0; |
| 2792 | c->restcxx . . $ _grn_pat_cursor#rest. = GRN_ID_MAXcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:42:9`!; |
| 2793 | c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2794 | c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..domaincxx . . $ _grn_obj_header#domain. = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2795 | if (flags & GRN_CURSOR_PREFIXcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:64:9`!) { |
| 2796 | if (max && max_size) { |
| 2797 | if ((pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_KEY_VAR_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:342:9`!)) { |
| 2798 | set_cursor_common_prefixcxx . . $ set_cursor_common_prefix(5c9d444d27147bbe).(ctx, pat, c, min_size, max, max_size, flags); |
| 2799 | } else { |
| 2800 | set_cursor_nearcxx . . $ set_cursor_near(5f7b65b68792d090).(ctx, pat, c, min_size, max, flags); |
| 2801 | } |
| 2802 | goto exit; |
| 2803 | } else { |
| 2804 | if (min && min_size) { |
| 2805 | if (flags & GRN_CURSOR_RKcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:66:9`!) { |
| 2806 | set_cursor_rkcxx . . $ set_cursor_rk(90a2438889753746).(ctx, pat, c, min, min_size, flags); |
| 2807 | } else { |
| 2808 | set_cursor_prefixcxx . . $ set_cursor_prefix(90a2438889753746).(ctx, pat, c, min, min_size, flags); |
| 2809 | } |
| 2810 | goto exit; |
| 2811 | } |
| 2812 | } |
| 2813 | } |
| 2814 | if (flags & GRN_CURSOR_DESCENDINGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:57:9`!) { |
| 2815 | if (min && min_size) { |
| 2816 | set_cursor_ascendcxx . . $ set_cursor_ascend(90a2438889753746).(ctx, pat, c, min, min_size, flags); |
| 2817 | c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. = GRN_CURSOR_ASCENDINGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:56:9`!; |
| 2818 | c->tailcxx . . $ _grn_pat_cursor#tail. = grn_pat_cursor_nextcxx . . $ grn_pat_cursor_next(5452c9aa69698298).(ctx, c); |
| 2819 | c->spcxx . . $ _grn_pat_cursor#sp. = 0; |
| 2820 | if (!c->tailcxx . . $ _grn_pat_cursor#tail.) { goto exit; } |
| 2821 | } |
| 2822 | if (max && max_size) { |
| 2823 | set_cursor_descendcxx . . $ set_cursor_descend(90a2438889753746).(ctx, pat, c, max, max_size, flags); |
| 2824 | } else { |
| 2825 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, node); |
| 2826 | if (!node) { |
| 2827 | grn_pat_cursor_closecxx . . $ grn_pat_cursor_close(e6719157d7b0b236).(ctx, c); |
| 2828 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2829 | } |
| 2830 | if ((id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1])) { |
| 2831 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 2832 | if (node) { |
| 2833 | int ch = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node); |
| 2834 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], ch); |
| 2835 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], ch); |
| 2836 | } |
| 2837 | } |
| 2838 | } |
| 2839 | } else { |
| 2840 | if (max && max_size) { |
| 2841 | set_cursor_descendcxx . . $ set_cursor_descend(90a2438889753746).(ctx, pat, c, max, max_size, flags); |
| 2842 | c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. = GRN_CURSOR_DESCENDINGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:57:9`!; |
| 2843 | c->tailcxx . . $ _grn_pat_cursor#tail. = grn_pat_cursor_nextcxx . . $ grn_pat_cursor_next(5452c9aa69698298).(ctx, c); |
| 2844 | c->spcxx . . $ _grn_pat_cursor#sp. = 0; |
| 2845 | if (!c->tailcxx . . $ _grn_pat_cursor#tail.) { goto exit; } |
| 2846 | } |
| 2847 | if (min && min_size) { |
| 2848 | set_cursor_ascendcxx . . $ set_cursor_ascend(90a2438889753746).(ctx, pat, c, min, min_size, flags); |
| 2849 | } else { |
| 2850 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, node); |
| 2851 | if (!node) { |
| 2852 | grn_pat_cursor_closecxx . . $ grn_pat_cursor_close(e6719157d7b0b236).(ctx, c); |
| 2853 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2854 | } |
| 2855 | if ((id = node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1])) { |
| 2856 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 2857 | if (node) { |
| 2858 | int ch = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node); |
| 2859 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], ch); |
| 2860 | pushcxx . . $ push(82233c8eae791b0f).(c, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], ch); |
| 2861 | } |
| 2862 | } |
| 2863 | } |
| 2864 | } |
| 2865 | exit : |
| 2866 | c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. = flags; |
| 2867 | c->curr_reccxx . . $ _grn_pat_cursor#curr_rec. = GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 2868 | while (offset--) { grn_pat_cursor_nextcxx . . $ grn_pat_cursor_next(5452c9aa69698298).(ctx, c); } |
| 2869 | c->restcxx . . $ _grn_pat_cursor#rest. = (limit < 0) ? GRN_ID_MAXcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:42:9`! : limit; |
| 2870 | return c; |
| 2871 | } |
| 2872 | |
| 2873 | int |
| 2874 | grn_pat_cursor_get_keycxx . . $ grn_pat_cursor_get_key(3a79fc7dedfdc985).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, void **key) |
| 2875 | { |
| 2876 | *key = c->curr_keycxx . . $ _grn_pat_cursor#curr_key.; |
| 2877 | return grn_pat_get_keycxx . . $ grn_pat_get_key(52cd598958564ca7).(ctx, c->patcxx . . $ _grn_pat_cursor#pat., c->curr_reccxx . . $ _grn_pat_cursor#curr_rec., *key, GRN_TABLE_MAX_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:25:9`!); |
| 2878 | } |
| 2879 | |
| 2880 | int |
| 2881 | grn_pat_cursor_get_valuecxx . . $ grn_pat_cursor_get_value(3a79fc7dedfdc985).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, void **value) |
| 2882 | { |
| 2883 | int value_size = (int)c->patcxx . . $ _grn_pat_cursor#pat.->value_sizecxx . . $ _grn_pat#value_size.; |
| 2884 | if (value_size) { |
| 2885 | bytecxx . . $ byte# *v = (bytecxx . . $ byte# *)sis_atcxx . . $ sis_at(59e5564d0351a00f).(ctx, c->patcxx . . $ _grn_pat_cursor#pat., c->curr_reccxx . . $ _grn_pat_cursor#curr_rec.); |
| 2886 | if (v) { |
| 2887 | if (c->patcxx . . $ _grn_pat_cursor#pat.->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_KEY_WITH_SIScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:305:9`!) { |
| 2888 | *value = v + sizeof(sis_nodecxx . . $ sis_node#); |
| 2889 | } else { |
| 2890 | *value = v; |
| 2891 | } |
| 2892 | } else { |
| 2893 | *value = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2894 | } |
| 2895 | } |
| 2896 | return value_size; |
| 2897 | } |
| 2898 | |
| 2899 | int |
| 2900 | grn_pat_cursor_get_key_valuecxx . . $ grn_pat_cursor_get_key_value(f0ba2e396541b89a).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, |
| 2901 | void **key, uint32_tcxx . . $ uint32_t# *key_size, void **value) |
| 2902 | { |
| 2903 | int value_size = (int)c->patcxx . . $ _grn_pat_cursor#pat.->value_sizecxx . . $ _grn_pat#value_size.; |
| 2904 | if (key_size) { |
| 2905 | *key_size = (uint32_tcxx . . $ uint32_t#) grn_pat_get_keycxx . . $ grn_pat_get_key(52cd598958564ca7).(ctx, c->patcxx . . $ _grn_pat_cursor#pat., c->curr_reccxx . . $ _grn_pat_cursor#curr_rec., c->curr_keycxx . . $ _grn_pat_cursor#curr_key., |
| 2906 | GRN_TABLE_MAX_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:25:9`!); |
| 2907 | if (key) { *key = c->curr_keycxx . . $ _grn_pat_cursor#curr_key.; } |
| 2908 | } |
| 2909 | if (value && value_size) { |
| 2910 | bytecxx . . $ byte# *v = (bytecxx . . $ byte# *)sis_atcxx . . $ sis_at(59e5564d0351a00f).(ctx, c->patcxx . . $ _grn_pat_cursor#pat., c->curr_reccxx . . $ _grn_pat_cursor#curr_rec.); |
| 2911 | if (v) { |
| 2912 | if (c->patcxx . . $ _grn_pat_cursor#pat.->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_KEY_WITH_SIScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:305:9`!) { |
| 2913 | *value = v + sizeof(sis_nodecxx . . $ sis_node#); |
| 2914 | } else { |
| 2915 | *value = v; |
| 2916 | } |
| 2917 | } else { |
| 2918 | *value = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2919 | } |
| 2920 | } |
| 2921 | return value_size; |
| 2922 | } |
| 2923 | |
| 2924 | grn_rccxx . . $ grn_rc# |
| 2925 | grn_pat_cursor_set_valuecxx . . $ grn_pat_cursor_set_value(62840828431e96f6).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, |
| 2926 | const void *value, int flags) |
| 2927 | { |
| 2928 | return grn_pat_set_valuecxx . . $ grn_pat_set_value(d5f8c516acb30a1b).(ctx, c->patcxx . . $ _grn_pat_cursor#pat., c->curr_reccxx . . $ _grn_pat_cursor#curr_rec., value, flags); |
| 2929 | } |
| 2930 | |
| 2931 | grn_rccxx . . $ grn_rc# |
| 2932 | grn_pat_cursor_deletecxx . . $ grn_pat_cursor_delete(b2e686c9cbb8494e).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, |
| 2933 | grn_table_delete_optargcxx . . $ grn_table_delete_optarg# *optarg) |
| 2934 | { |
| 2935 | return grn_pat_delete_by_idcxx . . $ grn_pat_delete_by_id(69fddfcd7b80a172).(ctx, c->patcxx . . $ _grn_pat_cursor#pat., c->curr_reccxx . . $ _grn_pat_cursor#curr_rec., optarg); |
| 2936 | } |
| 2937 | |
| 2938 | void |
| 2939 | grn_pat_checkcxx . . $ grn_pat_check(ff189d7ae511a139).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 2940 | { |
| 2941 | char buf[8]; |
| 2942 | struct grn_pat_headercxx . . $ grn_pat_header# *h = pat->headercxx . . $ _grn_pat#header.; |
| 2943 | if (grn_pat_error_if_truncatedcxx . . $ grn_pat_error_if_truncated(6044f5e1d38adedf).(ctx, pat) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 2944 | return; |
| 2945 | } |
| 2946 | GRN_OUTPUT_ARRAY_OPENcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:88:9`!("RESULT", 1); |
| 2947 | GRN_OUTPUT_MAP_OPENcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:92:9`!("SUMMARY", 23); |
| 2948 | GRN_OUTPUT_CSTRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:106:9`!("flags"); |
| 2949 | grn_itohcxx . . $ grn_itoh(8d45ad636653b6f2).(h->flagscxx . . $ grn_pat_header#flags., buf, 8); |
| 2950 | GRN_OUTPUT_STRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:108:9`!(buf, 8); |
| 2951 | GRN_OUTPUT_CSTRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:106:9`!("key size"); |
| 2952 | GRN_OUTPUT_INT64cxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:100:9`!(h->key_size); |
| 2953 | GRN_OUTPUT_CSTRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:106:9`!("value_size"); |
| 2954 | GRN_OUTPUT_INT64cxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:100:9`!(h->value_size); |
| 2955 | GRN_OUTPUT_CSTRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:106:9`!("tokenizer"); |
| 2956 | GRN_OUTPUT_INT64cxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:100:9`!(h->tokenizer); |
| 2957 | GRN_OUTPUT_CSTRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:106:9`!("normalizer"); |
| 2958 | GRN_OUTPUT_INT64cxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:100:9`!(h->normalizer); |
| 2959 | GRN_OUTPUT_CSTRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:106:9`!("n_entries"); |
| 2960 | GRN_OUTPUT_INT64cxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:100:9`!(h->n_entries); |
| 2961 | GRN_OUTPUT_CSTRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:106:9`!("curr_rec"); |
| 2962 | GRN_OUTPUT_INT64cxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:100:9`!(h->curr_rec); |
| 2963 | GRN_OUTPUT_CSTRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:106:9`!("curr_key"); |
| 2964 | GRN_OUTPUT_INT64cxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:100:9`!(h->curr_key); |
| 2965 | GRN_OUTPUT_CSTRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:106:9`!("curr_del"); |
| 2966 | GRN_OUTPUT_INT64cxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:100:9`!(h->curr_del); |
| 2967 | GRN_OUTPUT_CSTRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:106:9`!("curr_del2"); |
| 2968 | GRN_OUTPUT_INT64cxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:100:9`!(h->curr_del2); |
| 2969 | GRN_OUTPUT_CSTRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:106:9`!("curr_del3"); |
| 2970 | GRN_OUTPUT_INT64cxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:100:9`!(h->curr_del3); |
| 2971 | GRN_OUTPUT_CSTRcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:106:9`!("n_garbages"); |
| 2972 | GRN_OUTPUT_INT64cxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:100:9`!(h->n_garbages); |
| 2973 | GRN_OUTPUT_MAP_CLOSEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:94:9`!(); |
| 2974 | GRN_OUTPUT_ARRAY_CLOSEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_output.h:90:9`!(); |
| 2975 | } |
| 2976 | |
| 2977 | /* utilities */ |
| 2978 | void |
| 2979 | grn_p_pat_nodecxx . . $ grn_p_pat_node(2ab1d2ced3fc8d67).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, pat_nodecxx . . $ pat_node# *node) |
| 2980 | { |
| 2981 | uint8_tcxx . . $ uint8_t# *key = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2982 | |
| 2983 | if (!node) { |
| 2984 | printfcxx . . $ printf(581fddd72a8db8fc).("#<pat_node:(null)>\n"); |
| 2985 | return; |
| 2986 | } |
| 2987 | |
| 2988 | if (PAT_IMDcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:83:9`!(node)) { |
| 2989 | key = (uint8_tcxx . . $ uint8_t# *)&(node->keycxx . . $ $anonymous_type_40923699c27225f7_0#key.); |
| 2990 | } else { |
| 2991 | KEY_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:191:9`!(pat, node->key, key, 0); |
| 2992 | } |
| 2993 | |
| 2994 | printfcxx . . $ printf(581fddd72a8db8fc).("#<pat_node:%p " |
| 2995 | "left:%u " |
| 2996 | "right:%u " |
| 2997 | "deleting:%s " |
| 2998 | "immediate:%s " |
| 2999 | "length:%u " |
| 3000 | "nth-byte:%u " |
| 3001 | "nth-bit:%u " |
| 3002 | "terminated:%s " |
| 3003 | "key:<%.*s>" |
| 3004 | ">\n", |
| 3005 | node, |
| 3006 | node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], |
| 3007 | node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], |
| 3008 | PAT_DELcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:82:9`!(node) ? "true" : "false", |
| 3009 | PAT_IMDcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:83:9`!(node) ? "true" : "false", |
| 3010 | PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(node), |
| 3011 | PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node) >> 4, |
| 3012 | (PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node) >> 1) & 0x7, |
| 3013 | (PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node) & 0x1) ? "true" : "false", |
| 3014 | PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(node), |
| 3015 | (char *)key); |
| 3016 | } |
| 3017 | |
| 3018 | static void |
| 3019 | grn_pat_inspect_checkcxx . . $ grn_pat_inspect_check(abd6289432040828).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *buf, int check) |
| 3020 | { |
| 3021 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "{"); |
| 3022 | grn_text_lltoacxx . . $ grn_text_lltoa(1b142823d3915b88).(ctx, buf, check >> 4); |
| 3023 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, ","); |
| 3024 | grn_text_lltoacxx . . $ grn_text_lltoa(1b142823d3915b88).(ctx, buf, (check >> 1) & 7); |
| 3025 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, ","); |
| 3026 | grn_text_lltoacxx . . $ grn_text_lltoa(1b142823d3915b88).(ctx, buf, check & 1); |
| 3027 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "}"); |
| 3028 | } |
| 3029 | |
| 3030 | static void |
| 3031 | grn_pat_inspect_nodecxx . . $ grn_pat_inspect_node(d1df0b3e37d77f0b).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id, int check, |
| 3032 | grn_objcxx . . $ grn_obj# *key_buf, int indent, const char *prefix, |
| 3033 | grn_objcxx . . $ grn_obj# *buf) |
| 3034 | { |
| 3035 | pat_nodecxx . . $ pat_node# *node = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3036 | int i, c; |
| 3037 | |
| 3038 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, node); |
| 3039 | c = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(node); |
| 3040 | |
| 3041 | for (i = 0; i < indent; i++) { |
| 3042 | GRN_TEXT_PUTCcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1294:9`!(ctx, buf, ' '); |
| 3043 | } |
| 3044 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, prefix); |
| 3045 | grn_text_lltoacxx . . $ grn_text_lltoa(1b142823d3915b88).(ctx, buf, id); |
| 3046 | grn_pat_inspect_checkcxx . . $ grn_pat_inspect_check(abd6289432040828).(ctx, buf, c); |
| 3047 | |
| 3048 | if (c > check) { |
| 3049 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "\n"); |
| 3050 | grn_pat_inspect_nodecxx . . $ grn_pat_inspect_node(d1df0b3e37d77f0b).(ctx, pat, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], c, key_buf, |
| 3051 | indent + 2, "L:", buf); |
| 3052 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "\n"); |
| 3053 | grn_pat_inspect_nodecxx . . $ grn_pat_inspect_node(d1df0b3e37d77f0b).(ctx, pat, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], c, key_buf, |
| 3054 | indent + 2, "R:", buf); |
| 3055 | } else if (id) { |
| 3056 | int key_size; |
| 3057 | uint8_tcxx . . $ uint8_t# *key; |
| 3058 | |
| 3059 | key_size = PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(node); |
| 3060 | GRN_BULK_REWINDcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1167:9`!(key_buf); |
| 3061 | grn_bulk_spacecxx . . $ grn_bulk_space(aedbc3eaefbe393f).(ctx, key_buf, key_size); |
| 3062 | grn_pat_get_keycxx . . $ grn_pat_get_key(52cd598958564ca7).(ctx, pat, id, GRN_BULK_HEADcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1209:9`!(key_buf), key_size); |
| 3063 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "("); |
| 3064 | grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, buf, key_buf); |
| 3065 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, ")"); |
| 3066 | |
| 3067 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "["); |
| 3068 | key = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, node); |
| 3069 | for (i = 0; i < key_size; i++) { |
| 3070 | int j; |
| 3071 | uint8_tcxx . . $ uint8_t# byte = key[i]; |
| 3072 | if (i != 0) { |
| 3073 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, " "); |
| 3074 | } |
| 3075 | for (j = 0; j < 8; j++) { |
| 3076 | grn_text_lltoacxx . . $ grn_text_lltoa(1b142823d3915b88).(ctx, buf, (byte >> (7 - j)) & 1); |
| 3077 | } |
| 3078 | } |
| 3079 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "]"); |
| 3080 | } |
| 3081 | } |
| 3082 | |
| 3083 | void |
| 3084 | grn_pat_inspect_nodescxx . . $ grn_pat_inspect_nodes(542fb80be6c64613).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_objcxx . . $ grn_obj# *buf) |
| 3085 | { |
| 3086 | pat_nodecxx . . $ pat_node# *node; |
| 3087 | grn_objcxx . . $ grn_obj# key_buf; |
| 3088 | |
| 3089 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "{"); |
| 3090 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!, node); |
| 3091 | if (node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]) { |
| 3092 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "\n"); |
| 3093 | GRN_OBJ_INITcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:426:9`!(&key_buf, GRN_BULKcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:359:9`!, 0, pat->obj.header.domain); |
| 3094 | grn_pat_inspect_nodecxx . . $ grn_pat_inspect_node(d1df0b3e37d77f0b).(ctx, pat, node->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], -1, &key_buf, 0, "", buf); |
| 3095 | GRN_OBJ_FINcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:436:9`!(ctx, &key_buf); |
| 3096 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "\n"); |
| 3097 | } |
| 3098 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "}"); |
| 3099 | } |
| 3100 | |
| 3101 | static void |
| 3102 | grn_pat_cursor_inspect_entriescxx . . $ grn_pat_cursor_inspect_entries(b7bb675372818c70).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, grn_objcxx . . $ grn_obj# *buf) |
| 3103 | { |
| 3104 | uintcxx . . $ uint# i; |
| 3105 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "["); |
| 3106 | for (i = 0; i < c->spcxx . . $ _grn_pat_cursor#sp.; i++) { |
| 3107 | grn_pat_cursor_entrycxx . . $ grn_pat_cursor_entry# *e = c->sscxx . . $ _grn_pat_cursor#ss. + i; |
| 3108 | if (i != 0) { |
| 3109 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, ", "); |
| 3110 | } |
| 3111 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "["); |
| 3112 | grn_text_lltoacxx . . $ grn_text_lltoa(1b142823d3915b88).(ctx, buf, e->idcxx . . $ _grn_pat_cursor_entry#id.); |
| 3113 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, ","); |
| 3114 | grn_pat_inspect_checkcxx . . $ grn_pat_inspect_check(abd6289432040828).(ctx, buf, e->checkcxx . . $ _grn_pat_cursor_entry#check.); |
| 3115 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "]"); |
| 3116 | } |
| 3117 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "]"); |
| 3118 | } |
| 3119 | |
| 3120 | void |
| 3121 | grn_pat_cursor_inspectcxx . . $ grn_pat_cursor_inspect(b7bb675372818c70).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, grn_objcxx . . $ grn_obj# *buf) |
| 3122 | { |
| 3123 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "#<cursor:pat:"); |
| 3124 | grn_inspect_namecxx . . $ grn_inspect_name(88456f97fe0d41a).(ctx, buf, (grn_objcxx . . $ grn_obj# *)(c->patcxx . . $ _grn_pat_cursor#pat.)); |
| 3125 | |
| 3126 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, " "); |
| 3127 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "current:"); |
| 3128 | grn_text_lltoacxx . . $ grn_text_lltoa(1b142823d3915b88).(ctx, buf, c->curr_reccxx . . $ _grn_pat_cursor#curr_rec.); |
| 3129 | |
| 3130 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, " "); |
| 3131 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "tail:"); |
| 3132 | grn_text_lltoacxx . . $ grn_text_lltoa(1b142823d3915b88).(ctx, buf, c->tailcxx . . $ _grn_pat_cursor#tail.); |
| 3133 | |
| 3134 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, " "); |
| 3135 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "flags:"); |
| 3136 | if (c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_CURSOR_PREFIXcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:64:9`!) { |
| 3137 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "prefix"); |
| 3138 | } else { |
| 3139 | if (c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_CURSOR_DESCENDINGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:57:9`!) { |
| 3140 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "descending"); |
| 3141 | } else { |
| 3142 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "ascending"); |
| 3143 | } |
| 3144 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "|"); |
| 3145 | if (c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_CURSOR_GTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:59:9`!) { |
| 3146 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "greater-than"); |
| 3147 | } else { |
| 3148 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "greater"); |
| 3149 | } |
| 3150 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "|"); |
| 3151 | if (c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_CURSOR_LTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:61:9`!) { |
| 3152 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "less-than"); |
| 3153 | } else { |
| 3154 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "less"); |
| 3155 | } |
| 3156 | if (c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_CURSOR_BY_IDcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:63:9`!) { |
| 3157 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "|by-id"); |
| 3158 | } |
| 3159 | if (c->objcxx . . $ _grn_pat_cursor#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..flagscxx . . $ _grn_obj_header#flags. & GRN_CURSOR_BY_KEYcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:62:9`!) { |
| 3160 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "|by-key"); |
| 3161 | } |
| 3162 | } |
| 3163 | |
| 3164 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, " "); |
| 3165 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "rest:"); |
| 3166 | grn_text_lltoacxx . . $ grn_text_lltoa(1b142823d3915b88).(ctx, buf, c->restcxx . . $ _grn_pat_cursor#rest.); |
| 3167 | |
| 3168 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, " "); |
| 3169 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, "entries:"); |
| 3170 | grn_pat_cursor_inspect_entriescxx . . $ grn_pat_cursor_inspect_entries(b7bb675372818c70).(ctx, c, buf); |
| 3171 | |
| 3172 | GRN_TEXT_PUTScxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:1298:9`!(ctx, buf, ">"); |
| 3173 | } |
| 3174 | |
| 3175 | typedef structcxx . . $ $anonymous_type_40923699c27225f7_7# { |
| 3176 | uint8_tcxx . . $ uint8_t# codecxx . . $ $anonymous_type_40923699c27225f7_7#code.; |
| 3177 | uint8_tcxx . . $ uint8_t# nextcxx . . $ $anonymous_type_40923699c27225f7_7#next.; |
| 3178 | uint8_tcxx . . $ uint8_t# emitcxx . . $ $anonymous_type_40923699c27225f7_7#emit.; |
| 3179 | uint8_tcxx . . $ uint8_t# attrcxx . . $ $anonymous_type_40923699c27225f7_7#attr.; |
| 3180 | } rk_tree_nodecxx . . $ rk_tree_node#; |
| 3181 | |
| 3182 | static uint16_tcxx . . $ uint16_t# rk_str_idxcxx . . $ rk_str_idx.[] = { |
| 3183 | 0x0003, 0x0006, 0x0009, 0x000c, 0x0012, 0x0015, 0x0018, 0x001e, 0x0024, 0x002a, |
| 3184 | 0x0030, 0x0036, 0x003c, 0x0042, 0x0048, 0x004e, 0x0054, 0x005a, 0x0060, 0x0066, |
| 3185 | 0x006c, 0x0072, 0x0078, 0x007e, 0x0084, 0x008a, 0x0090, 0x0096, 0x009c, 0x00a2, |
| 3186 | 0x00a8, 0x00ae, 0x00b4, 0x00ba, 0x00c0, 0x00c3, 0x00c6, 0x00c9, 0x00cc, 0x00cf, |
| 3187 | 0x00d2, 0x00d5, 0x00db, 0x00e1, 0x00e7, 0x00ea, 0x00f0, 0x00f6, 0x00fc, 0x00ff, |
| 3188 | 0x0105, 0x0108, 0x010e, 0x0111, 0x0114, 0x0117, 0x011a, 0x011d, 0x0120, 0x0123, |
| 3189 | 0x0129, 0x012f, 0x0135, 0x013b, 0x013e, 0x0144, 0x014a, 0x0150, 0x0156, 0x0159, |
| 3190 | 0x015c, 0x015f, 0x0162, 0x0165, 0x0168, 0x016b, 0x016e, 0x0171, 0x0177, 0x017d, |
| 3191 | 0x0183, 0x0189, 0x018c, 0x0192, 0x0198, 0x019e, 0x01a1, 0x01a4, 0x01aa, 0x01b0, |
| 3192 | 0x01b6, 0x01bc, 0x01bf, 0x01c2, 0x01c8, 0x01ce, 0x01d1, 0x01d7, 0x01dd, 0x01e0, |
| 3193 | 0x01e6, 0x01e9, 0x01ef, 0x01f2, 0x01f5, 0x01fb, 0x0201, 0x0207, 0x020d, 0x0213, |
| 3194 | 0x0216, 0x0219, 0x021c, 0x021f, 0x0222, 0x0225, 0x0228, 0x022e, 0x0234, 0x023a, |
| 3195 | 0x023d, 0x0243, 0x0249, 0x024f, 0x0252, 0x0258, 0x025e, 0x0264, 0x0267, 0x026d, |
| 3196 | 0x0273, 0x0279, 0x027f, 0x0285, 0x0288, 0x028b, 0x028e, 0x0291, 0x0294, 0x0297, |
| 3197 | 0x029a, 0x029d, 0x02a0, 0x02a3, 0x02a9, 0x02af, 0x02b5, 0x02b8, 0x02bb, 0x02be, |
| 3198 | 0x02c1, 0x02c4, 0x02c7, 0x02ca, 0x02cd, 0x02d0, 0x02d3, 0x02d6, 0x02dc, 0x02e2, |
| 3199 | 0x02e8, 0x02eb, 0x02ee, 0x02f1, 0x02f4, 0x02f7, 0x02fa, 0x02fd, 0x0300, 0x0303, |
| 3200 | 0x0309, 0x030c, 0x0312, 0x0318, 0x031e, 0x0324, 0x0327, 0x032a, 0x032d |
| 3201 | }; |
| 3202 | static char rk_strcxx . . $ rk_str.[] = { |
| 3203 | 0xe3, 0x82, 0xa1, 0xe3, 0x82, 0xa2, 0xe3, 0x82, 0xa3, 0xe3, 0x82, 0xa4, 0xe3, |
| 3204 | 0x82, 0xa4, 0xe3, 0x82, 0xa7, 0xe3, 0x82, 0xa5, 0xe3, 0x82, 0xa6, 0xe3, 0x82, |
| 3205 | 0xa6, 0xe3, 0x82, 0xa2, 0xe3, 0x82, 0xa6, 0xe3, 0x82, 0xa3, 0xe3, 0x82, 0xa6, |
| 3206 | 0xe3, 0x82, 0xa4, 0xe3, 0x82, 0xa6, 0xe3, 0x82, 0xa6, 0xe3, 0x82, 0xa6, 0xe3, |
| 3207 | 0x82, 0xa7, 0xe3, 0x82, 0xa6, 0xe3, 0x82, 0xa8, 0xe3, 0x82, 0xa6, 0xe3, 0x82, |
| 3208 | 0xaa, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xa0, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xa1, |
| 3209 | 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xa2, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xa3, 0xe3, |
| 3210 | 0x82, 0xa6, 0xe3, 0x83, 0xa4, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xa5, 0xe3, 0x82, |
| 3211 | 0xa6, 0xe3, 0x83, 0xa6, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xa7, 0xe3, 0x82, 0xa6, |
| 3212 | 0xe3, 0x83, 0xa8, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xa9, 0xe3, 0x82, 0xa6, 0xe3, |
| 3213 | 0x83, 0xaa, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xab, 0xe3, 0x82, 0xa6, 0xe3, 0x83, |
| 3214 | 0xac, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xad, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xae, |
| 3215 | 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xaf, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xb0, 0xe3, |
| 3216 | 0x82, 0xa6, 0xe3, 0x83, 0xb1, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xb2, 0xe3, 0x82, |
| 3217 | 0xa6, 0xe3, 0x83, 0xb3, 0xe3, 0x82, 0xa6, 0xe3, 0x83, 0xbc, 0xe3, 0x82, 0xa7, |
| 3218 | 0xe3, 0x82, 0xa8, 0xe3, 0x82, 0xa9, 0xe3, 0x82, 0xaa, 0xe3, 0x82, 0xab, 0xe3, |
| 3219 | 0x82, 0xac, 0xe3, 0x82, 0xad, 0xe3, 0x82, 0xad, 0xe3, 0x83, 0xa3, 0xe3, 0x82, |
| 3220 | 0xad, 0xe3, 0x83, 0xa5, 0xe3, 0x82, 0xad, 0xe3, 0x83, 0xa7, 0xe3, 0x82, 0xae, |
| 3221 | 0xe3, 0x82, 0xae, 0xe3, 0x83, 0xa3, 0xe3, 0x82, 0xae, 0xe3, 0x83, 0xa5, 0xe3, |
| 3222 | 0x82, 0xae, 0xe3, 0x83, 0xa7, 0xe3, 0x82, 0xaf, 0xe3, 0x82, 0xaf, 0xe3, 0x82, |
| 3223 | 0xa1, 0xe3, 0x82, 0xb0, 0xe3, 0x82, 0xb0, 0xe3, 0x82, 0xa1, 0xe3, 0x82, 0xb1, |
| 3224 | 0xe3, 0x82, 0xb2, 0xe3, 0x82, 0xb3, 0xe3, 0x82, 0xb4, 0xe3, 0x82, 0xb5, 0xe3, |
| 3225 | 0x82, 0xb6, 0xe3, 0x82, 0xb7, 0xe3, 0x82, 0xb7, 0xe3, 0x82, 0xa7, 0xe3, 0x82, |
| 3226 | 0xb7, 0xe3, 0x83, 0xa3, 0xe3, 0x82, 0xb7, 0xe3, 0x83, 0xa5, 0xe3, 0x82, 0xb7, |
| 3227 | 0xe3, 0x83, 0xa7, 0xe3, 0x82, 0xb8, 0xe3, 0x82, 0xb8, 0xe3, 0x82, 0xa7, 0xe3, |
| 3228 | 0x82, 0xb8, 0xe3, 0x83, 0xa3, 0xe3, 0x82, 0xb8, 0xe3, 0x83, 0xa5, 0xe3, 0x82, |
| 3229 | 0xb8, 0xe3, 0x83, 0xa7, 0xe3, 0x82, 0xb9, 0xe3, 0x82, 0xba, 0xe3, 0x82, 0xbb, |
| 3230 | 0xe3, 0x82, 0xbc, 0xe3, 0x82, 0xbd, 0xe3, 0x82, 0xbe, 0xe3, 0x82, 0xbf, 0xe3, |
| 3231 | 0x83, 0x80, 0xe3, 0x83, 0x81, 0xe3, 0x83, 0x81, 0xe3, 0x82, 0xa7, 0xe3, 0x83, |
| 3232 | 0x81, 0xe3, 0x83, 0xa3, 0xe3, 0x83, 0x81, 0xe3, 0x83, 0xa5, 0xe3, 0x83, 0x81, |
| 3233 | 0xe3, 0x83, 0xa7, 0xe3, 0x83, 0x82, 0xe3, 0x83, 0x82, 0xe3, 0x83, 0xa3, 0xe3, |
| 3234 | 0x83, 0x82, 0xe3, 0x83, 0xa5, 0xe3, 0x83, 0x82, 0xe3, 0x83, 0xa7, 0xe3, 0x83, |
| 3235 | 0x83, 0xe3, 0x83, 0x84, 0xe3, 0x83, 0x84, 0xe3, 0x82, 0xa1, 0xe3, 0x83, 0x84, |
| 3236 | 0xe3, 0x82, 0xa3, 0xe3, 0x83, 0x84, 0xe3, 0x82, 0xa7, 0xe3, 0x83, 0x84, 0xe3, |
| 3237 | 0x82, 0xa9, 0xe3, 0x83, 0x85, 0xe3, 0x83, 0x86, 0xe3, 0x83, 0x86, 0xe3, 0x82, |
| 3238 | 0xa3, 0xe3, 0x83, 0x86, 0xe3, 0x83, 0xa5, 0xe3, 0x83, 0x87, 0xe3, 0x83, 0x87, |
| 3239 | 0xe3, 0x82, 0xa3, 0xe3, 0x83, 0x87, 0xe3, 0x83, 0xa5, 0xe3, 0x83, 0x88, 0xe3, |
| 3240 | 0x83, 0x88, 0xe3, 0x82, 0xa5, 0xe3, 0x83, 0x89, 0xe3, 0x83, 0x89, 0xe3, 0x82, |
| 3241 | 0xa5, 0xe3, 0x83, 0x8a, 0xe3, 0x83, 0x8b, 0xe3, 0x83, 0x8b, 0xe3, 0x82, 0xa3, |
| 3242 | 0xe3, 0x83, 0x8b, 0xe3, 0x82, 0xa7, 0xe3, 0x83, 0x8b, 0xe3, 0x83, 0xa3, 0xe3, |
| 3243 | 0x83, 0x8b, 0xe3, 0x83, 0xa5, 0xe3, 0x83, 0x8b, 0xe3, 0x83, 0xa7, 0xe3, 0x83, |
| 3244 | 0x8c, 0xe3, 0x83, 0x8d, 0xe3, 0x83, 0x8e, 0xe3, 0x83, 0x8f, 0xe3, 0x83, 0x90, |
| 3245 | 0xe3, 0x83, 0x91, 0xe3, 0x83, 0x92, 0xe3, 0x83, 0x92, 0xe3, 0x83, 0xa3, 0xe3, |
| 3246 | 0x83, 0x92, 0xe3, 0x83, 0xa5, 0xe3, 0x83, 0x92, 0xe3, 0x83, 0xa7, 0xe3, 0x83, |
| 3247 | 0x93, 0xe3, 0x83, 0x93, 0xe3, 0x83, 0xa3, 0xe3, 0x83, 0x93, 0xe3, 0x83, 0xa5, |
| 3248 | 0xe3, 0x83, 0x93, 0xe3, 0x83, 0xa7, 0xe3, 0x83, 0x94, 0xe3, 0x83, 0x94, 0xe3, |
| 3249 | 0x83, 0xa3, 0xe3, 0x83, 0x94, 0xe3, 0x83, 0xa5, 0xe3, 0x83, 0x94, 0xe3, 0x83, |
| 3250 | 0xa7, 0xe3, 0x83, 0x95, 0xe3, 0x83, 0x95, 0xe3, 0x82, 0xa1, 0xe3, 0x83, 0x95, |
| 3251 | 0xe3, 0x82, 0xa3, 0xe3, 0x83, 0x95, 0xe3, 0x82, 0xa7, 0xe3, 0x83, 0x95, 0xe3, |
| 3252 | 0x82, 0xa9, 0xe3, 0x83, 0x95, 0xe3, 0x83, 0xa5, 0xe3, 0x83, 0x96, 0xe3, 0x83, |
| 3253 | 0x97, 0xe3, 0x83, 0x98, 0xe3, 0x83, 0x99, 0xe3, 0x83, 0x9a, 0xe3, 0x83, 0x9b, |
| 3254 | 0xe3, 0x83, 0x9c, 0xe3, 0x83, 0x9d, 0xe3, 0x83, 0x9e, 0xe3, 0x83, 0x9f, 0xe3, |
| 3255 | 0x83, 0x9f, 0xe3, 0x83, 0xa3, 0xe3, 0x83, 0x9f, 0xe3, 0x83, 0xa5, 0xe3, 0x83, |
| 3256 | 0x9f, 0xe3, 0x83, 0xa7, 0xe3, 0x83, 0xa0, 0xe3, 0x83, 0xa1, 0xe3, 0x83, 0xa2, |
| 3257 | 0xe3, 0x83, 0xa3, 0xe3, 0x83, 0xa4, 0xe3, 0x83, 0xa5, 0xe3, 0x83, 0xa6, 0xe3, |
| 3258 | 0x83, 0xa7, 0xe3, 0x83, 0xa8, 0xe3, 0x83, 0xa9, 0xe3, 0x83, 0xaa, 0xe3, 0x83, |
| 3259 | 0xaa, 0xe3, 0x83, 0xa3, 0xe3, 0x83, 0xaa, 0xe3, 0x83, 0xa5, 0xe3, 0x83, 0xaa, |
| 3260 | 0xe3, 0x83, 0xa7, 0xe3, 0x83, 0xab, 0xe3, 0x83, 0xac, 0xe3, 0x83, 0xad, 0xe3, |
| 3261 | 0x83, 0xae, 0xe3, 0x83, 0xaf, 0xe3, 0x83, 0xb0, 0xe3, 0x83, 0xb1, 0xe3, 0x83, |
| 3262 | 0xb2, 0xe3, 0x83, 0xb3, 0xe3, 0x83, 0xb3, 0xe3, 0x83, 0xbc, 0xe3, 0x83, 0xb4, |
| 3263 | 0xe3, 0x83, 0xb4, 0xe3, 0x82, 0xa1, 0xe3, 0x83, 0xb4, 0xe3, 0x82, 0xa3, 0xe3, |
| 3264 | 0x83, 0xb4, 0xe3, 0x82, 0xa7, 0xe3, 0x83, 0xb4, 0xe3, 0x82, 0xa9, 0xe3, 0x83, |
| 3265 | 0xb5, 0xe3, 0x83, 0xb6, 0xe3, 0x83, 0xbc |
| 3266 | }; |
| 3267 | static uint16_tcxx . . $ uint16_t# rk_tree_idxcxx . . $ rk_tree_idx.[] = { |
| 3268 | 0x001b, 0x0022, 0x0025, 0x0028, 0x002d, 0x0030, 0x0039, 0x003b, 0x003c, 0x003f, |
| 3269 | 0x0046, 0x0047, 0x004f, 0x0050, 0x0053, 0x005a, 0x005d, 0x0064, 0x0067, 0x006f, |
| 3270 | 0x0070, 0x0073, 0x007d, 0x007f, 0x0081, 0x0082, 0x0083, 0x0088, 0x008f, 0x0092, |
| 3271 | 0x00af, 0x00b5, 0x00bc, 0x00bf, 0x00c6, 0x00c9, 0x00d1, 0x00d6, 0x00da, 0x00e4, |
| 3272 | 0x00e6, 0x00eb, 0x00ec, 0x00f0, 0x00f6, 0x00fc, 0x00fe, 0x0108, 0x010a, 0x010c, |
| 3273 | 0x010d, 0x010e, 0x0113, 0x0118, 0x011f, 0x0123, 0x0125, 0x0164, 0x0180, 0x0183, |
| 3274 | 0x0199, 0x01ad |
| 3275 | }; |
| 3276 | static rk_tree_nodecxx . . $ rk_tree_node# rk_treecxx . . $ rk_tree.[] = { |
| 3277 | {0x2d, 0x00, 0xb2, 0x01}, {0x61, 0x00, 0x01, 0x01}, {0x62, 0x01, 0xff, 0x01}, |
| 3278 | {0x63, 0x03, 0xff, 0x01}, {0x64, 0x06, 0xff, 0x01}, {0x65, 0x00, 0x24, 0x01}, |
| 3279 | {0x66, 0x0a, 0xff, 0x01}, {0x67, 0x0c, 0xff, 0x01}, {0x68, 0x0f, 0xff, 0x01}, |
| 3280 | {0x69, 0x00, 0x03, 0x01}, {0x6a, 0x11, 0xff, 0x01}, {0x6b, 0x13, 0xff, 0x01}, |
| 3281 | {0x6c, 0x16, 0xff, 0x01}, {0x6d, 0x1c, 0xff, 0x01}, {0x6e, 0x1e, 0xff, 0x01}, |
| 3282 | {0x6f, 0x00, 0x26, 0x01}, {0x70, 0x20, 0xff, 0x01}, {0x72, 0x22, 0xff, 0x01}, |
| 3283 | {0x73, 0x24, 0xff, 0x01}, {0x74, 0x27, 0xff, 0x01}, {0x75, 0x00, 0x06, 0x01}, |
| 3284 | {0x76, 0x2c, 0xff, 0x01}, {0x77, 0x2d, 0xff, 0x01}, {0x78, 0x2f, 0xff, 0x01}, |
| 3285 | {0x79, 0x35, 0xff, 0x01}, {0x7a, 0x36, 0xff, 0x01}, {0xe3, 0x38, 0xff, 0x01}, |
| 3286 | {0x61, 0x00, 0x72, 0x01}, {0x62, 0x01, 0x56, 0x01}, {0x65, 0x00, 0x89, 0x01}, |
| 3287 | {0x69, 0x00, 0x78, 0x01}, {0x6f, 0x00, 0x8c, 0x01}, {0x75, 0x00, 0x86, 0x01}, |
| 3288 | {0x79, 0x02, 0xff, 0x00}, {0x61, 0x00, 0x79, 0x01}, {0x6f, 0x00, 0x7b, 0x01}, |
| 3289 | {0x75, 0x00, 0x7a, 0x01}, {0x63, 0x03, 0x56, 0x01}, {0x68, 0x04, 0xff, 0x01}, |
| 3290 | {0x79, 0x05, 0xff, 0x01}, {0x61, 0x00, 0x4f, 0x00}, {0x65, 0x00, 0x4e, 0x00}, |
| 3291 | {0x69, 0x00, 0x4d, 0x01}, {0x6f, 0x00, 0x51, 0x00}, {0x75, 0x00, 0x50, 0x00}, |
| 3292 | {0x61, 0x00, 0x4f, 0x01}, {0x6f, 0x00, 0x51, 0x01}, {0x75, 0x00, 0x50, 0x01}, |
| 3293 | {0x61, 0x00, 0x4c, 0x01}, {0x64, 0x06, 0x56, 0x01}, {0x65, 0x00, 0x60, 0x01}, |
| 3294 | {0x68, 0x07, 0xff, 0x00}, {0x69, 0x00, 0x61, 0x00}, {0x6f, 0x00, 0x65, 0x01}, |
| 3295 | {0x75, 0x00, 0x5c, 0x01}, {0x77, 0x08, 0xff, 0x00}, {0x79, 0x09, 0xff, 0x01}, |
| 3296 | {0x69, 0x00, 0x61, 0x01}, {0x75, 0x00, 0x62, 0x01}, {0x75, 0x00, 0x66, 0x01}, |
| 3297 | {0x61, 0x00, 0x53, 0x01}, {0x6f, 0x00, 0x55, 0x01}, {0x75, 0x00, 0x54, 0x01}, |
| 3298 | {0x61, 0x00, 0x81, 0x00}, {0x65, 0x00, 0x83, 0x00}, {0x66, 0x0a, 0x56, 0x01}, |
| 3299 | {0x69, 0x00, 0x82, 0x00}, {0x6f, 0x00, 0x84, 0x00}, {0x75, 0x00, 0x80, 0x01}, |
| 3300 | {0x79, 0x0b, 0xff, 0x00}, {0x75, 0x00, 0x85, 0x01}, {0x61, 0x00, 0x28, 0x01}, |
| 3301 | {0x65, 0x00, 0x36, 0x01}, {0x67, 0x0c, 0x56, 0x01}, {0x69, 0x00, 0x2d, 0x01}, |
| 3302 | {0x6f, 0x00, 0x38, 0x01}, {0x75, 0x00, 0x33, 0x01}, {0x77, 0x0d, 0xff, 0x00}, |
| 3303 | {0x79, 0x0e, 0xff, 0x00}, {0x61, 0x00, 0x34, 0x01}, {0x61, 0x00, 0x2e, 0x01}, |
| 3304 | {0x6f, 0x00, 0x30, 0x01}, {0x75, 0x00, 0x2f, 0x01}, {0x61, 0x00, 0x71, 0x01}, |
| 3305 | {0x65, 0x00, 0x88, 0x01}, {0x68, 0x0f, 0x56, 0x01}, {0x69, 0x00, 0x74, 0x01}, |
| 3306 | {0x6f, 0x00, 0x8b, 0x01}, {0x75, 0x00, 0x80, 0x01}, {0x79, 0x10, 0xff, 0x00}, |
| 3307 | {0x61, 0x00, 0x75, 0x01}, {0x6f, 0x00, 0x77, 0x01}, {0x75, 0x00, 0x76, 0x01}, |
| 3308 | {0x61, 0x00, 0x42, 0x00}, {0x65, 0x00, 0x41, 0x00}, {0x69, 0x00, 0x40, 0x01}, |
| 3309 | {0x6a, 0x11, 0x56, 0x01}, {0x6f, 0x00, 0x44, 0x00}, {0x75, 0x00, 0x43, 0x00}, |
| 3310 | {0x79, 0x12, 0xff, 0x00}, {0x61, 0x00, 0x42, 0x01}, {0x6f, 0x00, 0x44, 0x01}, |
| 3311 | {0x75, 0x00, 0x43, 0x01}, {0x61, 0x00, 0x27, 0x01}, {0x65, 0x00, 0x35, 0x01}, |
| 3312 | {0x69, 0x00, 0x29, 0x01}, {0x6b, 0x13, 0x56, 0x01}, {0x6f, 0x00, 0x37, 0x01}, |
| 3313 | {0x75, 0x00, 0x31, 0x01}, {0x77, 0x14, 0xff, 0x00}, {0x79, 0x15, 0xff, 0x00}, |
| 3314 | {0x61, 0x00, 0x32, 0x01}, {0x61, 0x00, 0x2a, 0x01}, {0x6f, 0x00, 0x2c, 0x01}, |
| 3315 | {0x75, 0x00, 0x2b, 0x01}, {0x61, 0x00, 0x00, 0x01}, {0x65, 0x00, 0x23, 0x01}, |
| 3316 | {0x69, 0x00, 0x02, 0x01}, {0x6b, 0x17, 0xff, 0x01}, {0x6c, 0x16, 0x56, 0x01}, |
| 3317 | {0x6f, 0x00, 0x25, 0x01}, {0x74, 0x18, 0xff, 0x01}, {0x75, 0x00, 0x05, 0x01}, |
| 3318 | {0x77, 0x1a, 0xff, 0x01}, {0x79, 0x1b, 0xff, 0x01}, {0x61, 0x00, 0xb0, 0x01}, |
| 3319 | {0x65, 0x00, 0xb1, 0x01}, {0x73, 0x19, 0xff, 0x00}, {0x75, 0x00, 0x56, 0x01}, |
| 3320 | {0x75, 0x00, 0x56, 0x01}, {0x61, 0x00, 0xa4, 0x01}, {0x61, 0x00, 0x96, 0x01}, |
| 3321 | {0x65, 0x00, 0x23, 0x01}, {0x69, 0x00, 0x02, 0x01}, {0x6f, 0x00, 0x9a, 0x01}, |
| 3322 | {0x75, 0x00, 0x98, 0x01}, {0x61, 0x00, 0x8e, 0x01}, {0x65, 0x00, 0x94, 0x01}, |
| 3323 | {0x69, 0x00, 0x8f, 0x01}, {0x6d, 0x1c, 0x56, 0x01}, {0x6f, 0x00, 0x95, 0x01}, |
| 3324 | {0x75, 0x00, 0x93, 0x01}, {0x79, 0x1d, 0xff, 0x00}, {0x61, 0x00, 0x90, 0x01}, |
| 3325 | {0x6f, 0x00, 0x92, 0x01}, {0x75, 0x00, 0x91, 0x01}, {0x00, 0x00, 0xa9, 0x01}, |
| 3326 | {0x27, 0x00, 0xa9, 0x00}, {0x2d, 0x00, 0xaa, 0x00}, {0x61, 0x00, 0x67, 0x01}, |
| 3327 | {0x62, 0x01, 0xa9, 0x00}, {0x63, 0x03, 0xa9, 0x00}, {0x64, 0x06, 0xa9, 0x00}, |
| 3328 | {0x65, 0x00, 0x6f, 0x01}, {0x66, 0x0a, 0xa9, 0x00}, {0x67, 0x0c, 0xa9, 0x00}, |
| 3329 | {0x68, 0x0f, 0xa9, 0x00}, {0x69, 0x00, 0x68, 0x01}, {0x6a, 0x11, 0xa9, 0x00}, |
| 3330 | {0x6b, 0x13, 0xa9, 0x00}, {0x6c, 0x16, 0xa9, 0x00}, {0x6d, 0x1c, 0xa9, 0x00}, |
| 3331 | {0x6e, 0x00, 0xa9, 0x00}, {0x6f, 0x00, 0x70, 0x01}, {0x70, 0x20, 0xa9, 0x00}, |
| 3332 | {0x72, 0x22, 0xa9, 0x00}, {0x73, 0x24, 0xa9, 0x00}, {0x74, 0x27, 0xa9, 0x00}, |
| 3333 | {0x75, 0x00, 0x6e, 0x01}, {0x76, 0x2c, 0xa9, 0x00}, {0x77, 0x2d, 0xa9, 0x00}, |
| 3334 | {0x78, 0x2f, 0xa9, 0x00}, {0x79, 0x1f, 0xff, 0x00}, {0x7a, 0x36, 0xa9, 0x00}, |
| 3335 | {0xe3, 0x38, 0xa9, 0x00}, {0x00, 0x00, 0xa9, 0x01}, {0x61, 0x00, 0x6b, 0x01}, |
| 3336 | {0x65, 0x00, 0x6a, 0x01}, {0x69, 0x00, 0x69, 0x01}, {0x6f, 0x00, 0x6d, 0x01}, |
| 3337 | {0x75, 0x00, 0x6c, 0x01}, {0x61, 0x00, 0x73, 0x01}, {0x65, 0x00, 0x8a, 0x01}, |
| 3338 | {0x69, 0x00, 0x7c, 0x01}, {0x6f, 0x00, 0x8d, 0x01}, {0x70, 0x20, 0x56, 0x01}, |
| 3339 | {0x75, 0x00, 0x87, 0x01}, {0x79, 0x21, 0xff, 0x00}, {0x61, 0x00, 0x7d, 0x01}, |
| 3340 | {0x6f, 0x00, 0x7f, 0x01}, {0x75, 0x00, 0x7e, 0x01}, {0x61, 0x00, 0x9c, 0x01}, |
| 3341 | {0x65, 0x00, 0xa2, 0x01}, {0x69, 0x00, 0x9d, 0x01}, {0x6f, 0x00, 0xa3, 0x01}, |
| 3342 | {0x72, 0x22, 0x56, 0x01}, {0x75, 0x00, 0xa1, 0x01}, {0x79, 0x23, 0xff, 0x00}, |
| 3343 | {0x61, 0x00, 0x9e, 0x01}, {0x6f, 0x00, 0xa0, 0x01}, {0x75, 0x00, 0x9f, 0x01}, |
| 3344 | {0x61, 0x00, 0x39, 0x01}, {0x65, 0x00, 0x47, 0x01}, {0x68, 0x25, 0xff, 0x00}, |
| 3345 | {0x69, 0x00, 0x3b, 0x01}, {0x6f, 0x00, 0x49, 0x01}, {0x73, 0x24, 0x56, 0x01}, |
| 3346 | {0x75, 0x00, 0x45, 0x01}, {0x79, 0x26, 0xff, 0x00}, {0x61, 0x00, 0x3d, 0x00}, |
| 3347 | {0x65, 0x00, 0x3c, 0x00}, {0x69, 0x00, 0x3b, 0x01}, {0x6f, 0x00, 0x3f, 0x00}, |
| 3348 | {0x75, 0x00, 0x3e, 0x00}, {0x61, 0x00, 0x3d, 0x01}, {0x65, 0x00, 0x3c, 0x01}, |
| 3349 | {0x6f, 0x00, 0x3f, 0x01}, {0x75, 0x00, 0x3e, 0x01}, {0x61, 0x00, 0x4b, 0x01}, |
| 3350 | {0x65, 0x00, 0x5d, 0x01}, {0x68, 0x28, 0xff, 0x00}, {0x69, 0x00, 0x4d, 0x01}, |
| 3351 | {0x6f, 0x00, 0x63, 0x01}, {0x73, 0x29, 0xff, 0x00}, {0x74, 0x27, 0x56, 0x01}, |
| 3352 | {0x75, 0x00, 0x57, 0x01}, {0x77, 0x2a, 0xff, 0x00}, {0x79, 0x2b, 0xff, 0x00}, |
| 3353 | {0x69, 0x00, 0x5e, 0x01}, {0x75, 0x00, 0x5f, 0x01}, {0x61, 0x00, 0x58, 0x00}, |
| 3354 | {0x65, 0x00, 0x5a, 0x00}, {0x69, 0x00, 0x59, 0x00}, {0x6f, 0x00, 0x5b, 0x00}, |
| 3355 | {0x75, 0x00, 0x57, 0x01}, {0x75, 0x00, 0x64, 0x01}, {0x61, 0x00, 0x4f, 0x01}, |
| 3356 | {0x65, 0x00, 0x4e, 0x01}, {0x6f, 0x00, 0x51, 0x01}, {0x75, 0x00, 0x50, 0x01}, |
| 3357 | {0x61, 0x00, 0xac, 0x00}, {0x65, 0x00, 0xae, 0x00}, {0x69, 0x00, 0xad, 0x00}, |
| 3358 | {0x6f, 0x00, 0xaf, 0x00}, {0x75, 0x00, 0xab, 0x01}, {0x76, 0x2c, 0x56, 0x01}, |
| 3359 | {0x61, 0x00, 0xa5, 0x01}, {0x65, 0x00, 0x0b, 0x01}, {0x69, 0x00, 0x08, 0x01}, |
| 3360 | {0x6f, 0x00, 0xa8, 0x01}, {0x77, 0x2d, 0x56, 0x01}, {0x79, 0x2e, 0xff, 0x01}, |
| 3361 | {0x65, 0x00, 0xa7, 0x01}, {0x69, 0x00, 0xa6, 0x01}, {0x61, 0x00, 0x00, 0x01}, |
| 3362 | {0x65, 0x00, 0x23, 0x01}, {0x69, 0x00, 0x02, 0x01}, {0x6b, 0x30, 0xff, 0x01}, |
| 3363 | {0x6f, 0x00, 0x25, 0x01}, {0x74, 0x31, 0xff, 0x01}, {0x75, 0x00, 0x05, 0x01}, |
| 3364 | {0x77, 0x33, 0xff, 0x01}, {0x78, 0x2f, 0x56, 0x01}, {0x79, 0x34, 0xff, 0x01}, |
| 3365 | {0x61, 0x00, 0xb0, 0x01}, {0x65, 0x00, 0xb1, 0x01}, {0x73, 0x32, 0xff, 0x00}, |
| 3366 | {0x75, 0x00, 0x56, 0x01}, {0x75, 0x00, 0x56, 0x01}, {0x61, 0x00, 0xa4, 0x01}, |
| 3367 | {0x61, 0x00, 0x96, 0x01}, {0x65, 0x00, 0x23, 0x01}, {0x69, 0x00, 0x02, 0x01}, |
| 3368 | {0x6f, 0x00, 0x9a, 0x01}, {0x75, 0x00, 0x98, 0x01}, {0x61, 0x00, 0x97, 0x01}, |
| 3369 | {0x65, 0x00, 0x04, 0x01}, {0x6f, 0x00, 0x9b, 0x01}, {0x75, 0x00, 0x99, 0x01}, |
| 3370 | {0x79, 0x35, 0x56, 0x01}, {0x61, 0x00, 0x3a, 0x01}, {0x65, 0x00, 0x48, 0x01}, |
| 3371 | {0x69, 0x00, 0x40, 0x01}, {0x6f, 0x00, 0x4a, 0x01}, {0x75, 0x00, 0x46, 0x01}, |
| 3372 | {0x79, 0x37, 0xff, 0x00}, {0x7a, 0x36, 0x56, 0x01}, {0x61, 0x00, 0x42, 0x01}, |
| 3373 | {0x65, 0x00, 0x41, 0x01}, {0x6f, 0x00, 0x44, 0x01}, {0x75, 0x00, 0x43, 0x01}, |
| 3374 | {0x81, 0x39, 0xff, 0x01}, {0x82, 0x3d, 0xff, 0x01}, {0x81, 0x00, 0x00, 0x01}, |
| 3375 | {0x82, 0x00, 0x01, 0x01}, {0x83, 0x00, 0x02, 0x01}, {0x84, 0x00, 0x03, 0x01}, |
| 3376 | {0x85, 0x00, 0x05, 0x01}, {0x86, 0x3a, 0xff, 0x01}, {0x87, 0x00, 0x23, 0x01}, |
| 3377 | {0x88, 0x00, 0x24, 0x01}, {0x89, 0x00, 0x25, 0x01}, {0x8a, 0x00, 0x26, 0x01}, |
| 3378 | {0x8b, 0x00, 0x27, 0x01}, {0x8c, 0x00, 0x28, 0x01}, {0x8d, 0x00, 0x29, 0x01}, |
| 3379 | {0x8e, 0x00, 0x2d, 0x01}, {0x8f, 0x00, 0x31, 0x01}, {0x90, 0x00, 0x33, 0x01}, |
| 3380 | {0x91, 0x00, 0x35, 0x01}, {0x92, 0x00, 0x36, 0x01}, {0x93, 0x00, 0x37, 0x01}, |
| 3381 | {0x94, 0x00, 0x38, 0x01}, {0x95, 0x00, 0x39, 0x01}, {0x96, 0x00, 0x3a, 0x01}, |
| 3382 | {0x97, 0x00, 0x3b, 0x01}, {0x98, 0x00, 0x40, 0x01}, {0x99, 0x00, 0x45, 0x01}, |
| 3383 | {0x9a, 0x00, 0x46, 0x01}, {0x9b, 0x00, 0x47, 0x01}, {0x9c, 0x00, 0x48, 0x01}, |
| 3384 | {0x9d, 0x00, 0x49, 0x01}, {0x9e, 0x00, 0x4a, 0x01}, {0x9f, 0x00, 0x4b, 0x01}, |
| 3385 | {0xa0, 0x00, 0x4c, 0x01}, {0xa1, 0x00, 0x4d, 0x01}, {0xa2, 0x00, 0x52, 0x01}, |
| 3386 | {0xa3, 0x00, 0x56, 0x01}, {0xa4, 0x00, 0x57, 0x01}, {0xa5, 0x00, 0x5c, 0x01}, |
| 3387 | {0xa6, 0x00, 0x5d, 0x01}, {0xa7, 0x00, 0x60, 0x01}, {0xa8, 0x00, 0x63, 0x01}, |
| 3388 | {0xa9, 0x00, 0x65, 0x01}, {0xaa, 0x00, 0x67, 0x01}, {0xab, 0x00, 0x68, 0x01}, |
| 3389 | {0xac, 0x00, 0x6e, 0x01}, {0xad, 0x00, 0x6f, 0x01}, {0xae, 0x00, 0x70, 0x01}, |
| 3390 | {0xaf, 0x00, 0x71, 0x01}, {0xb0, 0x00, 0x72, 0x01}, {0xb1, 0x00, 0x73, 0x01}, |
| 3391 | {0xb2, 0x00, 0x74, 0x01}, {0xb3, 0x00, 0x78, 0x01}, {0xb4, 0x00, 0x7c, 0x01}, |
| 3392 | {0xb5, 0x00, 0x80, 0x01}, {0xb6, 0x00, 0x86, 0x01}, {0xb7, 0x00, 0x87, 0x01}, |
| 3393 | {0xb8, 0x00, 0x88, 0x01}, {0xb9, 0x00, 0x89, 0x01}, {0xba, 0x00, 0x8a, 0x01}, |
| 3394 | {0xbb, 0x00, 0x8b, 0x01}, {0xbc, 0x00, 0x8c, 0x01}, {0xbd, 0x00, 0x8d, 0x01}, |
| 3395 | {0xbe, 0x00, 0x8e, 0x01}, {0xbf, 0x00, 0x8f, 0x01}, {0x00, 0x00, 0x06, 0x00}, |
| 3396 | {0x2d, 0x00, 0x22, 0x00}, {0x61, 0x00, 0x07, 0x00}, {0x62, 0x01, 0x06, 0x00}, |
| 3397 | {0x63, 0x03, 0x06, 0x00}, {0x64, 0x06, 0x06, 0x00}, {0x65, 0x00, 0x0c, 0x00}, |
| 3398 | {0x66, 0x0a, 0x06, 0x00}, {0x67, 0x0c, 0x06, 0x00}, {0x68, 0x0f, 0x06, 0x00}, |
| 3399 | {0x69, 0x00, 0x09, 0x00}, {0x6a, 0x11, 0x06, 0x00}, {0x6b, 0x13, 0x06, 0x00}, |
| 3400 | {0x6c, 0x16, 0x06, 0x00}, {0x6d, 0x1c, 0x06, 0x00}, {0x6e, 0x1e, 0x06, 0x00}, |
| 3401 | {0x6f, 0x00, 0x0d, 0x00}, {0x70, 0x20, 0x06, 0x00}, {0x72, 0x22, 0x06, 0x00}, |
| 3402 | {0x73, 0x24, 0x06, 0x00}, {0x74, 0x27, 0x06, 0x00}, {0x75, 0x00, 0x0a, 0x00}, |
| 3403 | {0x76, 0x2c, 0x06, 0x00}, {0x77, 0x2d, 0x06, 0x00}, {0x78, 0x2f, 0x06, 0x00}, |
| 3404 | {0x79, 0x35, 0x06, 0x00}, {0x7a, 0x36, 0x06, 0x00}, {0xe3, 0x3b, 0xff, 0x01}, |
| 3405 | {0x00, 0x00, 0x06, 0x00}, {0x81, 0x39, 0x06, 0x00}, {0x82, 0x3c, 0xff, 0x01}, |
| 3406 | {0x00, 0x00, 0x06, 0x01}, {0x80, 0x00, 0x0e, 0x00}, {0x81, 0x00, 0x0f, 0x00}, |
| 3407 | {0x82, 0x00, 0x10, 0x00}, {0x83, 0x00, 0x11, 0x00}, {0x84, 0x00, 0x12, 0x00}, |
| 3408 | {0x85, 0x00, 0x13, 0x00}, {0x86, 0x00, 0x14, 0x00}, {0x87, 0x00, 0x15, 0x00}, |
| 3409 | {0x88, 0x00, 0x16, 0x00}, {0x89, 0x00, 0x17, 0x00}, {0x8a, 0x00, 0x18, 0x00}, |
| 3410 | {0x8b, 0x00, 0x19, 0x00}, {0x8c, 0x00, 0x1a, 0x00}, {0x8d, 0x00, 0x1b, 0x00}, |
| 3411 | {0x8e, 0x00, 0x1c, 0x00}, {0x8f, 0x00, 0x1d, 0x00}, {0x90, 0x00, 0x1e, 0x00}, |
| 3412 | {0x91, 0x00, 0x1f, 0x00}, {0x92, 0x00, 0x20, 0x00}, {0x93, 0x00, 0x21, 0x00}, |
| 3413 | {0x9b, 0x00, 0xab, 0x01}, {0x80, 0x00, 0x93, 0x01}, {0x81, 0x00, 0x94, 0x01}, |
| 3414 | {0x82, 0x00, 0x95, 0x01}, {0x83, 0x00, 0x96, 0x01}, {0x84, 0x00, 0x97, 0x01}, |
| 3415 | {0x85, 0x00, 0x98, 0x01}, {0x86, 0x00, 0x99, 0x01}, {0x87, 0x00, 0x9a, 0x01}, |
| 3416 | {0x88, 0x00, 0x9b, 0x01}, {0x89, 0x00, 0x9c, 0x01}, {0x8a, 0x00, 0x9d, 0x01}, |
| 3417 | {0x8b, 0x00, 0xa1, 0x01}, {0x8c, 0x00, 0xa2, 0x01}, {0x8d, 0x00, 0xa3, 0x01}, |
| 3418 | {0x8e, 0x00, 0xa4, 0x01}, {0x8f, 0x00, 0xa5, 0x01}, {0x90, 0x00, 0xa6, 0x01}, |
| 3419 | {0x91, 0x00, 0xa7, 0x01}, {0x92, 0x00, 0xa8, 0x01}, {0x93, 0x00, 0xa9, 0x01} |
| 3420 | }; |
| 3421 | |
| 3422 | static rk_tree_nodecxx . . $ rk_tree_node# * |
| 3423 | rk_lookupcxx . . $ rk_lookup(559aa8913833076c).(uint8_tcxx . . $ uint8_t# state, uint8_tcxx . . $ uint8_t# code) |
| 3424 | { |
| 3425 | if (state < sizeof(rk_tree_idxcxx . . $ rk_tree_idx.)/sizeof(uint16_tcxx . . $ uint16_t#)) { |
| 3426 | uint16_tcxx . . $ uint16_t# ns = state ? rk_tree_idxcxx . . $ rk_tree_idx.[state - 1] : 0; |
| 3427 | uint16_tcxx . . $ uint16_t# ne = rk_tree_idxcxx . . $ rk_tree_idx.[state]; |
| 3428 | while (ns < ne) { |
| 3429 | uint16_tcxx . . $ uint16_t# m = (ns + ne)>>1; |
| 3430 | rk_tree_nodecxx . . $ rk_tree_node# *rn = &rk_treecxx . . $ rk_tree.[m]; |
| 3431 | if (rn->codecxx . . $ $anonymous_type_40923699c27225f7_7#code. == code) { return rn; } |
| 3432 | if (rn->codecxx . . $ $anonymous_type_40923699c27225f7_7#code. < code) { |
| 3433 | ns = m + 1; |
| 3434 | } else { |
| 3435 | ne = m; |
| 3436 | } |
| 3437 | } |
| 3438 | } |
| 3439 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3440 | } |
| 3441 | |
| 3442 | static uint32_tcxx . . $ uint32_t# |
| 3443 | rk_emitcxx . . $ rk_emit(a14ec721f81af7ed).(rk_tree_nodecxx . . $ rk_tree_node# *rn, char **str) |
| 3444 | { |
| 3445 | if (rn && rn->emitcxx . . $ $anonymous_type_40923699c27225f7_7#emit. != 0xff) { |
| 3446 | uint16_tcxx . . $ uint16_t# pos = rn->emitcxx . . $ $anonymous_type_40923699c27225f7_7#emit. ? rk_str_idxcxx . . $ rk_str_idx.[rn->emitcxx . . $ $anonymous_type_40923699c27225f7_7#emit. - 1] : 0; |
| 3447 | *str = &rk_strcxx . . $ rk_str.[pos]; |
| 3448 | return (uint32_tcxx . . $ uint32_t#)(rk_str_idxcxx . . $ rk_str_idx.[rn->emitcxx . . $ $anonymous_type_40923699c27225f7_7#emit.] - pos); |
| 3449 | } else { |
| 3450 | *str = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3451 | return 0; |
| 3452 | } |
| 3453 | } |
| 3454 | |
| 3455 | #define RK_OUTPUTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:3455:9`!(e,l) do {\ |
| 3456 | if (oc < oe) {\ |
| 3457 | uint32_t l_ = (oc + (l) < oe) ? (l) : (oe - oc);\ |
| 3458 | grn_memcpycxx . . $ `storage/mroonga/vendor/groonga/include/groonga/portability.h:31:11`!(oc, (e), l_);\ |
| 3459 | oc += l_;\ |
| 3460 | ic_ = ic;\ |
| 3461 | }\ |
| 3462 | } while (0) |
| 3463 | |
| 3464 | static uint32_tcxx . . $ uint32_t# |
| 3465 | rk_convcxx . . $ rk_conv(f330d261486335dc).(const char *str, uint32_tcxx . . $ uint32_t# str_len, uint8_tcxx . . $ uint8_t# *buf, uint32_tcxx . . $ uint32_t# buf_size, uint8_tcxx . . $ uint8_t# *statep) |
| 3466 | { |
| 3467 | uint32_tcxx . . $ uint32_t# l; |
| 3468 | uint8_tcxx . . $ uint8_t# state = 0; |
| 3469 | rk_tree_nodecxx . . $ rk_tree_node# *rn; |
| 3470 | char *e; |
| 3471 | uint8_tcxx . . $ uint8_t# *oc = buf, *oe = oc + buf_size; |
| 3472 | const uint8_tcxx . . $ uint8_t# *ic = (uint8_tcxx . . $ uint8_t# *)str, *ic_ = ic, *ie = ic + str_len; |
| 3473 | while (ic < ie) { |
| 3474 | if ((rn = rk_lookupcxx . . $ rk_lookup(559aa8913833076c).(state, *ic))) { |
| 3475 | ic++; |
| 3476 | if ((l = rk_emitcxx . . $ rk_emit(a14ec721f81af7ed).(rn, &e))) { RK_OUTPUTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:3455:9`!(e, l); } |
| 3477 | state = rn->nextcxx . . $ $anonymous_type_40923699c27225f7_7#next.; |
| 3478 | } else { |
| 3479 | if (!state) { ic++; } |
| 3480 | if (ic_ < ic) { RK_OUTPUTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:3455:9`!(ic_, ic - ic_); } |
| 3481 | state = 0; |
| 3482 | } |
| 3483 | } |
| 3484 | #ifdef FLUSH_UNRESOLVED_INPUT |
| 3485 | if ((rn = rk_lookup(state, 0))) { |
| 3486 | if ((l = rk_emit(rn, &e))) { RK_OUTPUT(e, l); } |
| 3487 | state = rn->next; |
| 3488 | } else { |
| 3489 | if (ic_ < ic) { RK_OUTPUT(ic_, ic - ic_); } |
| 3490 | } |
| 3491 | #endif /* FLUSH_UNRESOLVED_INPUT */ |
| 3492 | *statep = state; |
| 3493 | return oc - buf; |
| 3494 | } |
| 3495 | |
| 3496 | static grn_idcxx . . $ grn_id# |
| 3497 | sub_searchcxx . . $ sub_search(15c78d3d90ac36a1).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id, |
| 3498 | int *c0, uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# key_len) |
| 3499 | { |
| 3500 | pat_nodecxx . . $ pat_node# *pn; |
| 3501 | uint32_tcxx . . $ uint32_t# len = key_len * 16; |
| 3502 | if (!key_len) { return id; } |
| 3503 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, pn); |
| 3504 | while (pn) { |
| 3505 | int ch; |
| 3506 | ch = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(pn); |
| 3507 | if (*c0 < ch && ch < (int) len - 1) { |
| 3508 | if (ch & 1) { |
| 3509 | id = (ch + 1 < (int) len) ? pn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1] : pn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0]; |
| 3510 | } else { |
| 3511 | id = pn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[nth_bitcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:124:9`!(key, ch, len)]; |
| 3512 | } |
| 3513 | *c0 = ch; |
| 3514 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, pn); |
| 3515 | } else { |
| 3516 | const uint8_tcxx . . $ uint8_t# *k = pat_node_get_keycxx . . $ pat_node_get_key(c70535654acef20f).(ctx, pat, pn); |
| 3517 | return (k && key_len <= PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(pn) && !memcmpcxx . . $ memcmp(36f949851efa3055).(k, key, key_len)) ? id : GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 3518 | } |
| 3519 | } |
| 3520 | return GRN_ID_NILcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:41:9`!; |
| 3521 | } |
| 3522 | |
| 3523 | static void |
| 3524 | search_pushcxx . . $ search_push(e8e3aca2d1d826b2).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, |
| 3525 | uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# key_len, uint8_tcxx . . $ uint8_t# state, grn_idcxx . . $ grn_id# id, int c0, int flags) |
| 3526 | { |
| 3527 | if (state) { |
| 3528 | int step; |
| 3529 | uint16_tcxx . . $ uint16_t# ns, ne; |
| 3530 | if (flags & GRN_CURSOR_DESCENDINGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:57:9`!) { |
| 3531 | ns = rk_tree_idxcxx . . $ rk_tree_idx.[state - 1]; |
| 3532 | ne = rk_tree_idxcxx . . $ rk_tree_idx.[state]; |
| 3533 | step = 1; |
| 3534 | } else { |
| 3535 | ns = rk_tree_idxcxx . . $ rk_tree_idx.[state] - 1; |
| 3536 | ne = rk_tree_idxcxx . . $ rk_tree_idx.[state - 1] - 1; |
| 3537 | step = -1; |
| 3538 | } |
| 3539 | for (; ns != ne; ns += step) { |
| 3540 | rk_tree_nodecxx . . $ rk_tree_node# *rn = &rk_treecxx . . $ rk_tree.[ns]; |
| 3541 | if (rn->attrcxx . . $ $anonymous_type_40923699c27225f7_7#attr.) { |
| 3542 | char *e; |
| 3543 | uint32_tcxx . . $ uint32_t# l = rk_emitcxx . . $ rk_emit(a14ec721f81af7ed).(rn, &e); |
| 3544 | if (l) { |
| 3545 | if (l + key_len <= GRN_TABLE_MAX_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:25:9`!) { |
| 3546 | int ch = c0; |
| 3547 | grn_idcxx . . $ grn_id# i; |
| 3548 | grn_memcpycxx . . $ `storage/mroonga/vendor/groonga/include/groonga/portability.h:31:11`!(key + key_len, e, l); |
| 3549 | if ((i = sub_searchcxx . . $ sub_search(15c78d3d90ac36a1).(ctx, pat, id, &ch, key, key_len + l))) { |
| 3550 | search_pushcxx . . $ search_push(e8e3aca2d1d826b2).(ctx, pat, c, key, key_len + l, rn->nextcxx . . $ $anonymous_type_40923699c27225f7_7#next., i, ch, flags); |
| 3551 | } |
| 3552 | } |
| 3553 | } else { |
| 3554 | search_pushcxx . . $ search_push(e8e3aca2d1d826b2).(ctx, pat, c, key, key_len, rn->nextcxx . . $ $anonymous_type_40923699c27225f7_7#next., id, c0, flags); |
| 3555 | } |
| 3556 | } |
| 3557 | } |
| 3558 | } else { |
| 3559 | pat_nodecxx . . $ pat_node# *pn; |
| 3560 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, id, pn); |
| 3561 | if (pn) { |
| 3562 | int ch = PAT_CHKcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:85:9`!(pn); |
| 3563 | uint32_tcxx . . $ uint32_t# len = key_len * 16; |
| 3564 | if (c0 < ch) { |
| 3565 | if (flags & GRN_CURSOR_DESCENDINGcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:57:9`!) { |
| 3566 | if ((ch > (int) len - 1) || !(flags & GRN_CURSOR_GTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:59:9`!)) { pushcxx . . $ push(82233c8eae791b0f).(c, pn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], ch); } |
| 3567 | pushcxx . . $ push(82233c8eae791b0f).(c, pn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], ch); |
| 3568 | } else { |
| 3569 | pushcxx . . $ push(82233c8eae791b0f).(c, pn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1], ch); |
| 3570 | if ((ch > (int) len - 1) || !(flags & GRN_CURSOR_GTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:59:9`!)) { pushcxx . . $ push(82233c8eae791b0f).(c, pn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[0], ch); } |
| 3571 | } |
| 3572 | } else { |
| 3573 | if (PAT_LENcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:84:9`!(pn) * 16 > len || !(flags & GRN_CURSOR_GTcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:59:9`!)) { pushcxx . . $ push(82233c8eae791b0f).(c, id, ch); } |
| 3574 | } |
| 3575 | } |
| 3576 | } |
| 3577 | } |
| 3578 | |
| 3579 | static grn_rccxx . . $ grn_rc# |
| 3580 | set_cursor_rkcxx . . $ set_cursor_rk(90a2438889753746).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, |
| 3581 | const void *key, uint32_tcxx . . $ uint32_t# key_len, int flags) |
| 3582 | { |
| 3583 | grn_idcxx . . $ grn_id# id; |
| 3584 | uint8_tcxx . . $ uint8_t# state; |
| 3585 | pat_nodecxx . . $ pat_node# *pn; |
| 3586 | int c0 = -1; |
| 3587 | uint32_tcxx . . $ uint32_t# len, byte_len; |
| 3588 | uint8_tcxx . . $ uint8_t# keybuf[GRN_TABLE_MAX_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:25:9`!]; |
| 3589 | if (flags & GRN_CURSOR_SIZE_BY_BITcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:65:9`!) { return GRN_OPERATION_NOT_SUPPORTEDcxx . . $ GRN_OPERATION_NOT_SUPPORTED.; } |
| 3590 | byte_len = rk_convcxx . . $ rk_conv(f330d261486335dc).(key, key_len, keybuf, GRN_TABLE_MAX_KEY_SIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/table.h:25:9`!, &state); |
| 3591 | len = byte_len * 16; |
| 3592 | PAT_ATcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:130:9`!(pat, 0, pn); |
| 3593 | id = pn->lrcxx . . $ $anonymous_type_40923699c27225f7_0#lr.[1]; |
| 3594 | if ((id = sub_searchcxx . . $ sub_search(15c78d3d90ac36a1).(ctx, pat, id, &c0, keybuf, byte_len))) { |
| 3595 | search_pushcxx . . $ search_push(e8e3aca2d1d826b2).(ctx, pat, c, keybuf, byte_len, state, id, c0, flags); |
| 3596 | } |
| 3597 | return ctx->rccxx . . $ _grn_ctx#rc.; |
| 3598 | } |
| 3599 | |
| 3600 | uint32_tcxx . . $ uint32_t# |
| 3601 | grn_pat_total_key_sizecxx . . $ grn_pat_total_key_size(801003d623e3bbf5).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 3602 | { |
| 3603 | return pat->headercxx . . $ _grn_pat#header.->curr_keycxx . . $ grn_pat_header#curr_key.; |
| 3604 | } |
| 3605 | |
| 3606 | grn_boolcxx . . $ grn_bool# |
| 3607 | grn_pat_is_key_encodedcxx . . $ grn_pat_is_key_encoded(6db31f88b2ec10c3).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 3608 | { |
| 3609 | grn_objcxx . . $ grn_obj# *domain; |
| 3610 | uint32_tcxx . . $ uint32_t# key_size; |
| 3611 | |
| 3612 | domain = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, pat->objcxx . . $ _grn_pat#obj..headercxx . . $ $anonymous_type_9afa47707a1d1b6d_0#header..domaincxx . . $ _grn_obj_header#domain.); |
| 3613 | if (grn_obj_is_typecxx . . $ grn_obj_is_type(aa1157f04aaa08f5).(ctx, domain)) { |
| 3614 | key_size = grn_type_sizecxx . . $ grn_type_size(8dd58acc9865e889).(ctx, domain); |
| 3615 | } else { |
| 3616 | key_size = sizeof(grn_idcxx . . $ grn_id#); |
| 3617 | } |
| 3618 | |
| 3619 | return KEY_NEEDS_CONVERTcxx . . $ `storage/mroonga/vendor/groonga/lib/pat.c:881:9`!(pat, key_size); |
| 3620 | } |
| 3621 | |
| 3622 | grn_rccxx . . $ grn_rc# |
| 3623 | grn_pat_dirtycxx . . $ grn_pat_dirty(6044f5e1d38adedf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 3624 | { |
| 3625 | grn_rccxx . . $ grn_rc# rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 3626 | |
| 3627 | CRITICAL_SECTION_ENTERcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:235:10`!(pat->lock); |
| 3628 | if (!pat->is_dirtycxx . . $ _grn_pat#is_dirty.) { |
| 3629 | uint32_tcxx . . $ uint32_t# n_dirty_opens; |
| 3630 | pat->is_dirtycxx . . $ _grn_pat#is_dirty. = GRN_TRUEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:44:9`!; |
| 3631 | GRN_ATOMIC_ADD_EXcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:484:11`!(&(pat->header->n_dirty_opens), 1, n_dirty_opens); |
| 3632 | rc = grn_io_flushcxx . . $ grn_io_flush(117c07c672382ce3).(ctx, pat->iocxx . . $ _grn_pat#io.); |
| 3633 | } |
| 3634 | CRITICAL_SECTION_LEAVEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:236:10`!(pat->lock); |
| 3635 | |
| 3636 | return rc; |
| 3637 | } |
| 3638 | |
| 3639 | grn_boolcxx . . $ grn_bool# |
| 3640 | grn_pat_is_dirtycxx . . $ grn_pat_is_dirty(6db31f88b2ec10c3).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 3641 | { |
| 3642 | return pat->headercxx . . $ _grn_pat#header.->n_dirty_openscxx . . $ grn_pat_header#n_dirty_opens. > 0; |
| 3643 | } |
| 3644 | |
| 3645 | grn_rccxx . . $ grn_rc# |
| 3646 | grn_pat_cleancxx . . $ grn_pat_clean(6044f5e1d38adedf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 3647 | { |
| 3648 | grn_rccxx . . $ grn_rc# rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 3649 | |
| 3650 | CRITICAL_SECTION_ENTERcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:235:10`!(pat->lock); |
| 3651 | if (pat->is_dirtycxx . . $ _grn_pat#is_dirty.) { |
| 3652 | uint32_tcxx . . $ uint32_t# n_dirty_opens; |
| 3653 | pat->is_dirtycxx . . $ _grn_pat#is_dirty. = GRN_FALSEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:45:9`!; |
| 3654 | GRN_ATOMIC_ADD_EXcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:484:11`!(&(pat->header->n_dirty_opens), -1, n_dirty_opens); |
| 3655 | rc = grn_io_flushcxx . . $ grn_io_flush(117c07c672382ce3).(ctx, pat->iocxx . . $ _grn_pat#io.); |
| 3656 | } |
| 3657 | CRITICAL_SECTION_LEAVEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:236:10`!(pat->lock); |
| 3658 | |
| 3659 | return rc; |
| 3660 | } |
| 3661 | |
| 3662 | grn_rccxx . . $ grn_rc# |
| 3663 | grn_pat_clear_dirtycxx . . $ grn_pat_clear_dirty(6044f5e1d38adedf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat) |
| 3664 | { |
| 3665 | grn_rccxx . . $ grn_rc# rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.; |
| 3666 | |
| 3667 | CRITICAL_SECTION_ENTERcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:235:10`!(pat->lock); |
| 3668 | pat->is_dirtycxx . . $ _grn_pat#is_dirty. = GRN_FALSEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:45:9`!; |
| 3669 | pat->headercxx . . $ _grn_pat#header.->n_dirty_openscxx . . $ grn_pat_header#n_dirty_opens. = 0; |
| 3670 | rc = grn_io_flushcxx . . $ grn_io_flush(117c07c672382ce3).(ctx, pat->iocxx . . $ _grn_pat#io.); |
| 3671 | CRITICAL_SECTION_LEAVEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn.h:236:10`!(pat->lock); |
| 3672 | |
| 3673 | return rc; |
| 3674 | } |