]> granicus.if.org Git - onig/commitdiff
remove unused codes
authorK.Kosako <kkosako0@gmail.com>
Fri, 15 Feb 2019 12:36:16 +0000 (21:36 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Thu, 28 Feb 2019 05:28:18 +0000 (14:28 +0900)
src/regcomp.c

index 254c9bff7b90c53c4393070762603ac697fbeb72..8e3376afe746f0ce68f56fc36667b086a66c99b1 100644 (file)
@@ -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)
 {