]> granicus.if.org Git - onig/commitdiff
remove tabs
authorK.Kosako <kosako@sofnec.co.jp>
Mon, 4 Mar 2019 04:51:46 +0000 (13:51 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Mon, 4 Mar 2019 04:51:46 +0000 (13:51 +0900)
src/mktable.c
src/regcomp.c
src/regenc.c
src/regerror.c
src/regext.c
src/reggnu.c
src/regposerr.c
src/regposix.c

index a9cac2c40abca8e36fc852bf0d158475edc0ed2b..80ac08af24b9eb30ec1cdf944579c9957caed3e6 100644 (file)
@@ -2,7 +2,7 @@
   mktable.c
 **********************************************************************/
 /*-
- * Copyright (c) 2002-2016  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2019  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -269,7 +269,7 @@ static int IsBlank(int enc, int c)
   if (enc == ASCII)
     return isblank(c);
 
-  if (c == 0x09        || c == 0x20) return 1;
+  if (c == 0x09 || c == 0x20) return 1;
 
   switch (enc) {
   case UNICODE_ISO_8859_1:
@@ -308,7 +308,7 @@ static int IsCntrl(int enc, int c)
   if (enc == ASCII)
     return iscntrl(c);
 
-  if (c >= 0x00        && c <= 0x1F) return 1;
+  if (c >= 0x00 && c <= 0x1F) return 1;
 
   switch (enc) {
   case UNICODE_ISO_8859_1:
@@ -376,10 +376,10 @@ static int IsGraph(int enc, int c)
   case ISO_8859_3:
     if (c >= 0xa1) {
       if (c == 0xa5 || c == 0xae || c == 0xbe || c == 0xc3 || c == 0xd0 ||
-         c == 0xe3 || c == 0xf0)
-       return 0;
+          c == 0xe3 || c == 0xf0)
+        return 0;
       else
-       return 1;
+        return 1;
     }
     break;
 
@@ -392,8 +392,8 @@ static int IsGraph(int enc, int c)
 
   case ISO_8859_7:
     if (c >= 0xa1 && c <= 0xfe &&
-       c != 0xa4 && c != 0xa5 && c != 0xaa &&
-       c != 0xae && c != 0xd2) return 1;
+        c != 0xa4 && c != 0xa5 && c != 0xaa &&
+        c != 0xae && c != 0xd2) return 1;
     break;
 
   case ISO_8859_8:
@@ -583,10 +583,10 @@ static int IsPrint(int enc, int c)
   case ISO_8859_3:
     if (c >= 0xa0) {
       if (c == 0xa5 || c == 0xae || c == 0xbe || c == 0xc3 || c == 0xd0 ||
-         c == 0xe3 || c == 0xf0)
-       return 0;
+          c == 0xe3 || c == 0xf0)
+        return 0;
       else
-       return 1;
+        return 1;
     }
     break;
 
@@ -600,8 +600,8 @@ static int IsPrint(int enc, int c)
 
   case ISO_8859_7:
     if (c >= 0xa0 && c <= 0xfe &&
-       c != 0xa4 && c != 0xa5 && c != 0xaa &&
-       c != 0xae && c != 0xd2) return 1;
+        c != 0xa4 && c != 0xa5 && c != 0xaa &&
+        c != 0xae && c != 0xd2) return 1;
     break;
 
   case ISO_8859_8:
@@ -1012,7 +1012,7 @@ static int IsWord(int enc, int c)
   case ISO_8859_10:
     if (c >= 0xa1 && c <= 0xff) {
       if (c != 0xa7 && c != 0xad && c != 0xb0 && c != 0xb7 && c != 0xbd)
-       return 1;
+        return 1;
     }
     break;
 
@@ -1037,7 +1037,7 @@ static int IsWord(int enc, int c)
   case ISO_8859_14:
     if (c >= 0xa1 && c <= 0xff) {
       if (c == 0xa3 || c == 0xa7 || c == 0xa9 || c == 0xad || c == 0xae ||
-         c == 0xb6) return 0;
+          c == 0xb6) return 0;
       return 1;
     }
     break;
index a25f8b1b23f5bd9aa77910f1dd2d41b626ff87ce..5001de7a21a678d39b993c66b9427e87799f4182 100644 (file)
@@ -1918,10 +1918,10 @@ compile_tree(Node* node, regex_t* reg, ScanEnv* env)
       else {
 #ifdef USE_BACKREF_WITH_LEVEL
         if (NODE_IS_NEST_LEVEL(node)) {
-         if ((reg->options & ONIG_OPTION_IGNORECASE) != 0)
-           r = add_op(reg, OP_BACKREF_WITH_LEVEL_IC);
-         else
-           r = add_op(reg, OP_BACKREF_WITH_LEVEL);
+          if ((reg->options & ONIG_OPTION_IGNORECASE) != 0)
+            r = add_op(reg, OP_BACKREF_WITH_LEVEL_IC);
+          else
+            r = add_op(reg, OP_BACKREF_WITH_LEVEL);
 
           if (r != 0) return r;
           COP(reg)->backref_general.nest_level = br->nest_level;
index d8f52742fb84236377a6d9f6890963cfe366e8c4..3aeb625d6384a400dc90fc97f8da80c62ac2aca0 100644 (file)
@@ -2,7 +2,7 @@
   regenc.c -  Oniguruma (regular expression library)
 **********************************************************************/
 /*-
- * Copyright (c) 2002-2018  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2019  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -167,7 +167,7 @@ onigenc_get_right_adjust_char_head(OnigEncoding enc, const UChar* start, const U
 
 extern UChar*
 onigenc_get_right_adjust_char_head_with_prev(OnigEncoding enc,
-                                  const UChar* start, const UChar* s, const UChar** prev)
+            const UChar* start, const UChar* s, const UChar** prev)
 {
   UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s);
 
@@ -511,7 +511,7 @@ const OnigPairCaseFoldCodes OnigAsciiLowerMap[] = {
 
 extern int
 onigenc_ascii_apply_all_case_fold(OnigCaseFoldType flag ARG_UNUSED,
-                                 OnigApplyAllCaseFoldFunc f, void* arg)
+                                  OnigApplyAllCaseFoldFunc f, void* arg)
 {
   OnigCodePoint code;
   int i, r;
@@ -533,8 +533,8 @@ onigenc_ascii_apply_all_case_fold(OnigCaseFoldType flag ARG_UNUSED,
 
 extern int
 onigenc_ascii_get_case_fold_codes_by_str(OnigCaseFoldType flag ARG_UNUSED,
-        const OnigUChar* p, const OnigUChar* end ARG_UNUSED,
-        OnigCaseFoldCodeItem items[])
+    const OnigUChar* p, const OnigUChar* end ARG_UNUSED,
+    OnigCaseFoldCodeItem items[])
 {
   if (0x41 <= *p && *p <= 0x5a) {
     items[0].byte_len = 1;
@@ -554,7 +554,7 @@ onigenc_ascii_get_case_fold_codes_by_str(OnigCaseFoldType flag ARG_UNUSED,
 
 static int
 ss_apply_all_case_fold(OnigCaseFoldType flag ARG_UNUSED,
-                      OnigApplyAllCaseFoldFunc f, void* arg)
+                       OnigApplyAllCaseFoldFunc f, void* arg)
 {
   static OnigCodePoint ss[] = { 0x73, 0x73 };
 
@@ -600,7 +600,7 @@ onigenc_get_case_fold_codes_by_str_with_map(int map_size,
     items[0].code_len = 1;
     items[0].code[0] = (OnigCodePoint )(*p + 0x20);
     if (*p == 0x53 && ess_tsett_flag != 0 && end > p + 1
-       && (*(p+1) == 0x53 || *(p+1) == 0x73)) {
+        && (*(p+1) == 0x53 || *(p+1) == 0x73)) {
       /* SS */
       items[1].byte_len = 2;
       items[1].code_len = 1;
@@ -615,7 +615,7 @@ onigenc_get_case_fold_codes_by_str_with_map(int map_size,
     items[0].code_len = 1;
     items[0].code[0] = (OnigCodePoint )(*p - 0x20);
     if (*p == 0x73 && ess_tsett_flag != 0 && end > p + 1
-       && (*(p+1) == 0x73 || *(p+1) == 0x53)) {
+        && (*(p+1) == 0x73 || *(p+1) == 0x53)) {
       /* ss */
       items[1].byte_len = 2;
       items[1].code_len = 1;
@@ -653,16 +653,16 @@ onigenc_get_case_fold_codes_by_str_with_map(int map_size,
 
     for (i = 0; i < map_size; i++) {
       if (*p == map[i].from) {
-       items[0].byte_len = 1;
-       items[0].code_len = 1;
-       items[0].code[0] = map[i].to;
-       return 1;
+        items[0].byte_len = 1;
+        items[0].code_len = 1;
+        items[0].code[0] = map[i].to;
+        return 1;
       }
       else if (*p == map[i].to) {
-       items[0].byte_len = 1;
-       items[0].code_len = 1;
-       items[0].code[0] = map[i].from;
-       return 1;
+        items[0].byte_len = 1;
+        items[0].code_len = 1;
+        items[0].code[0] = map[i].from;
+        return 1;
       }
     }
   }
@@ -673,8 +673,8 @@ onigenc_get_case_fold_codes_by_str_with_map(int map_size,
 
 extern int
 onigenc_not_support_get_ctype_code_range(OnigCtype ctype ARG_UNUSED,
-        OnigCodePoint* sb_out ARG_UNUSED,
-        const OnigCodePoint* ranges[] ARG_UNUSED)
+                                         OnigCodePoint* sb_out ARG_UNUSED,
+                                         const OnigCodePoint* ranges[] ARG_UNUSED)
 {
   return ONIG_NO_SUPPORT_CONFIG;
 }
@@ -691,7 +691,7 @@ onigenc_is_mbc_newline_0x0a(const UChar* p, const UChar* end)
 /* for single byte encodings */
 extern int
 onigenc_ascii_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED, const UChar** p,
-           const UChar*end ARG_UNUSED, UChar* lower)
+                            const UChar*end ARG_UNUSED, UChar* lower)
 {
   *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(**p);
 
@@ -702,7 +702,7 @@ onigenc_ascii_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED, const UChar** p,
 #if 0
 extern int
 onigenc_ascii_is_mbc_ambiguous(OnigCaseFoldType flag,
-                              const UChar** pp, const UChar* end)
+                               const UChar** pp, const UChar* end)
 {
   const UChar* p = *pp;
 
@@ -738,35 +738,35 @@ onigenc_single_byte_code_to_mbc(OnigCodePoint code, UChar *buf)
 
 extern UChar*
 onigenc_single_byte_left_adjust_char_head(const UChar* start ARG_UNUSED,
-                                         const UChar* s)
+                                          const UChar* s)
 {
   return (UChar* )s;
 }
 
 extern int
 onigenc_always_true_is_allowed_reverse_match(const UChar* s   ARG_UNUSED,
-                                            const UChar* end ARG_UNUSED)
+                                             const UChar* end ARG_UNUSED)
 {
   return TRUE;
 }
 
 extern int
 onigenc_always_false_is_allowed_reverse_match(const UChar* s   ARG_UNUSED,
-                                             const UChar* end ARG_UNUSED)
+                                              const UChar* end ARG_UNUSED)
 {
   return FALSE;
 }
 
 extern int
 onigenc_always_true_is_valid_mbc_string(const UChar* s   ARG_UNUSED,
-                                       const UChar* end ARG_UNUSED)
+                                        const UChar* end ARG_UNUSED)
 {
   return TRUE;
 }
 
 extern int
 onigenc_length_check_is_valid_mbc_string(OnigEncoding enc,
-                                        const UChar* p, const UChar* end)
+                                         const UChar* p, const UChar* end)
 {
   while (p < end) {
     p += enclen(enc, p);
@@ -805,7 +805,7 @@ onigenc_mbn_mbc_to_code(OnigEncoding enc, const UChar* p, const UChar* end)
 extern int
 onigenc_mbn_mbc_case_fold(OnigEncoding enc, OnigCaseFoldType flag ARG_UNUSED,
                           const UChar** pp, const UChar* end ARG_UNUSED,
-                         UChar* lower)
+                          UChar* lower)
 {
   int len;
   const UChar *p = *pp;
@@ -946,7 +946,7 @@ onigenc_is_mbc_word_ascii(OnigEncoding enc, UChar* s, const UChar* end)
 
 extern int
 onigenc_mb2_is_code_ctype(OnigEncoding enc, OnigCodePoint code,
-                         unsigned int ctype)
+                          unsigned int ctype)
 {
   if (code < 128)
     return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
@@ -961,7 +961,7 @@ onigenc_mb2_is_code_ctype(OnigEncoding enc, OnigCodePoint code,
 
 extern int
 onigenc_mb4_is_code_ctype(OnigEncoding enc, OnigCodePoint code,
-                         unsigned int ctype)
+                          unsigned int ctype)
 {
   if (code < 128)
     return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
index 66d1fbc6682af61b1703a067820107f04351580a..756482744e7ea60ab5f5db6c20448832b6bf582e 100644 (file)
@@ -205,7 +205,7 @@ static void sprint_byte_with_x(char* s, unsigned int v)
 }
 
 static int to_ascii(OnigEncoding enc, UChar *s, UChar *end,
-                   UChar buf[], int buf_size, int *is_over)
+                    UChar buf[], int buf_size, int *is_over)
 {
   int len;
   UChar *p;
index 996d043f568ef62ab6868b771ce9e418acfa70a8..fa4b360bc8bc2fbea883a83581ee1ec92297e17c 100644 (file)
@@ -2,7 +2,7 @@
   regext.c -  Oniguruma (regular expression library)
 **********************************************************************/
 /*-
- * Copyright (c) 2002-2017  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2019  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -185,7 +185,7 @@ onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
   }
 
   r = onig_reg_init(*reg, ci->option, ci->case_fold_flag, ci->target_enc,
-                   ci->syntax);
+                    ci->syntax);
   if (r != 0) goto err;
 
   r = onig_compile(*reg, cpat, cpat_end, einfo);
index 37c751999eb644ab17f5bcfb2444a73441450050..a124ae82512f06807b1aa045daa0a6af1056e3c3 100644 (file)
@@ -2,7 +2,7 @@
   reggnu.c -  Oniguruma (regular expression library)
 **********************************************************************/
 /*-
- * Copyright (c) 2002-2018  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2019  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@ re_free_registers(OnigRegion* r)
 
 extern int
 re_adjust_startpos(regex_t* reg, const char* string, int size,
-                  int startpos, int range)
+                   int startpos, int range)
 {
   if (startpos > 0 && ONIGENC_MBC_MAXLEN(reg->enc) != 1 && startpos < size) {
     UChar *p;
@@ -59,20 +59,20 @@ re_adjust_startpos(regex_t* reg, const char* string, int size,
 
 extern int
 re_match(regex_t* reg, const char* str, int size, int pos,
-        struct re_registers* regs)
+         struct re_registers* regs)
 {
   return onig_match(reg, (UChar* )str, (UChar* )(str + size),
-                   (UChar* )(str + pos), regs, ONIG_OPTION_NONE);
+                    (UChar* )(str + pos), regs, ONIG_OPTION_NONE);
 }
 
 extern int
 re_search(regex_t* bufp, const char* string, int size, int startpos, int range,
-         struct re_registers* regs)
+          struct re_registers* regs)
 {
   return onig_search(bufp, (UChar* )string, (UChar* )(string + size),
-                    (UChar* )(string + startpos),
-                    (UChar* )(string + startpos + range),
-                    regs, ONIG_OPTION_NONE);
+                     (UChar* )(string + startpos),
+                     (UChar* )(string + startpos + range),
+                     regs, ONIG_OPTION_NONE);
 }
 
 extern int
@@ -103,9 +103,9 @@ re_alloc_pattern(regex_t** reg)
   if (IS_NULL(*reg)) return ONIGERR_MEMORY;
 
   return onig_reg_init(*reg, ONIG_OPTION_DEFAULT,
-                      ONIGENC_CASE_FOLD_DEFAULT,
-                      OnigEncDefaultCharEncoding,
-                      OnigDefaultSyntax);
+                       ONIGENC_CASE_FOLD_DEFAULT,
+                       OnigEncDefaultCharEncoding,
+                       OnigDefaultSyntax);
 }
 
 extern void
index c640a8192cd58f71322828a0deed85492154e296..e38953116dd6bab84deb0d056e1a9e970f5c1175 100644 (file)
@@ -2,7 +2,7 @@
   regposerr.c - Oniguruma (regular expression library)
 **********************************************************************/
 /*-
- * Copyright (c) 2002-2018  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2019  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -80,7 +80,7 @@ static char* ESTRING[] = {
 
 extern size_t
 regerror(int posix_ecode, const regex_t* reg ARG_UNUSED, char* buf,
-        size_t size)
+         size_t size)
 {
   char* s;
   char tbuf[35];
index 895cf29817d076e64c0636038bfc6ac630884ba0..c6ca535e0aae049043274eb347991bf1d01227e9 100644 (file)
@@ -2,7 +2,7 @@
   regposix.c - Oniguruma (regular expression library)
 **********************************************************************/
 /*-
- * Copyright (c) 2002-2018  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2019  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -163,8 +163,8 @@ regcomp(regex_t* reg, const char* pattern, int posix_options)
 
   ENC_STRING_LEN(OnigEncDefaultCharEncoding, pattern, len);
   r = onig_new(PONIG_C(reg), (UChar* )pattern, (UChar* )(pattern + len),
-              options, OnigEncDefaultCharEncoding, syntax,
-              (OnigErrorInfo* )NULL);
+               options, OnigEncDefaultCharEncoding, syntax,
+               (OnigErrorInfo* )NULL);
   if (r != ONIG_NORMAL) {
     return onig2posix_error_code(r);
   }
@@ -175,7 +175,7 @@ regcomp(regex_t* reg, const char* pattern, int posix_options)
 
 extern int
 regexec(regex_t* reg, const char* str, size_t nmatch,
-       regmatch_t pmatch[], int posix_options)
+        regmatch_t pmatch[], int posix_options)
 {
   int r, i, len;
   UChar* end;
@@ -203,7 +203,7 @@ regexec(regex_t* reg, const char* str, size_t nmatch,
   ENC_STRING_LEN(ONIG_C(reg)->enc, str, len);
   end = (UChar* )(str + len);
   r = onig_search(ONIG_C(reg), (UChar* )str, end, (UChar* )str, end,
-                 (OnigRegion* )pm, options);
+                  (OnigRegion* )pm, options);
 
   if (r >= 0) {
     r = 0; /* Match */
@@ -288,7 +288,7 @@ typedef struct {
 
 static int
 i_wrapper(const UChar* name, const UChar* name_end, int ng, int* gs,
-         onig_regex_t* reg ARG_UNUSED, void* arg)
+          onig_regex_t* reg ARG_UNUSED, void* arg)
 {
   i_wrap* warg = (i_wrap* )arg;