From 982ee0a9b0c9c0fb3e41e0d88c5f8f8e4146ced7 Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Fri, 15 Feb 2019 21:36:16 +0900 Subject: [PATCH] remove unused codes --- src/regcomp.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/regcomp.c b/src/regcomp.c index 254c9bf..8e3376a 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -268,10 +268,6 @@ onig_positive_int_multiply(int x, int y) } -#ifndef PLATFORM_UNALIGNED_WORD_ACCESS -static unsigned char PadBuf[WORD_ALIGNMENT_SIZE]; -#endif - static void swap_node(Node* a, Node* b) { @@ -660,31 +656,6 @@ compile_string_raw_node(StrNode* sn, regex_t* reg) return add_compile_string(sn->s, 1 /* sb */, (int )(sn->end - sn->s), reg, 0); } -#if 0 -static int -add_multi_byte_cclass(BBuf* mbuf, regex_t* reg) -{ -#ifdef PLATFORM_UNALIGNED_WORD_ACCESS - add_length(reg, mbuf->used); - return add_bytes(reg, mbuf->p, mbuf->used); -#else - int r, pad_size; - UChar* p = BB_GET_ADD_ADDRESS(reg) + SIZE_LENGTH; - - GET_ALIGNMENT_PAD_SIZE(p, pad_size); - add_length(reg, mbuf->used + (WORD_ALIGNMENT_SIZE - 1)); - if (pad_size != 0) add_bytes(reg, PadBuf, pad_size); - - r = add_bytes(reg, mbuf->p, mbuf->used); - - /* padding for return value from compile_length_cclass_node() to be fix. */ - pad_size = (WORD_ALIGNMENT_SIZE - 1) - pad_size; - if (pad_size != 0) add_bytes(reg, PadBuf, pad_size); - return r; -#endif -} -#endif - static void* set_multi_byte_cclass(BBuf* mbuf, regex_t* reg) { -- 2.40.0