]> granicus.if.org Git - onig/commitdiff
remove tabs
authorK.Kosako <kkosako0@gmail.com>
Fri, 29 Mar 2019 12:10:24 +0000 (21:10 +0900)
committerK.Kosako <kkosako0@gmail.com>
Fri, 29 Mar 2019 12:10:24 +0000 (21:10 +0900)
sample/bug_fix.c
sample/crnl.c
sample/encode.c
sample/listcap.c
sample/names.c
sample/simple.c
sample/sql.c
sample/syntax.c
sample/user_property.c

index 44802efab1579b1b06aaacc7c57f6f1d86f3c950..81c278409d81f2cd42bed5dcfed77f0cb8bf110c 100644 (file)
@@ -95,8 +95,8 @@ exec(OnigEncoding enc, OnigOptionType options, char* apattern, char* astr)
   onig_initialize(&enc, 1);
 
   r = onig_new(&reg, pattern,
-              pattern + onigenc_str_bytelen_null(enc, pattern),
-              options, enc, ONIG_SYNTAX_DEFAULT, &einfo);
+               pattern + onigenc_str_bytelen_null(enc, pattern),
+               options, enc, ONIG_SYNTAX_DEFAULT, &einfo);
   if (r != ONIG_NORMAL) {
     char s[ONIG_MAX_ERROR_MESSAGE_LEN];
     onig_error_code_to_str((UChar* )s, r, &einfo);
index ee6a516b23c5a2a0cf9676785af9212a0f55fec2..3ad12102e674d9928980fd45742c0e6a1d8a6af3 100644 (file)
@@ -12,7 +12,7 @@
 static int nfail = 0;
 
 static void result(int no, int from, int to,
-                  int expected_from, int expected_to)
+                   int expected_from, int expected_to)
 {
   fprintf(stderr, "%3d: ", no);
   if (from == expected_from && to == expected_to) {
@@ -20,7 +20,7 @@ static void result(int no, int from, int to,
   }
   else {
     fprintf(stderr, "Fail: expected: (%d-%d), result: (%d-%d)\n",
-           expected_from, expected_to, from, to);
+            expected_from, expected_to, from, to);
 
     nfail++;
   }
@@ -41,7 +41,7 @@ x(int no, char* pattern_arg, char* str_arg,
   str     = (UChar* )str_arg;
 
   r = onig_new(&reg, pattern, pattern + strlen((char* )pattern),
-       ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo);
+        ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo);
   if (r != ONIG_NORMAL) {
     char s[ONIG_MAX_ERROR_MESSAGE_LEN];
     onig_error_code_to_str(s, r, &einfo);
index 4eead6e70c7aef1f3010943b5c000066ff5ec41a..8a03ab82c7f9e6c9a242741ae8d91633ab3b53ca 100644 (file)
@@ -129,55 +129,55 @@ extern int main(int argc, char* argv[])
   static unsigned char pattern[] = { 0xe7, 0xf6, 0xde, '\\', 'w', '+', 0x00 };
 
   r = exec(ONIG_ENCODING_SJIS, ONIG_OPTION_NONE,
-          "^a\\p{Hiragana}c$", "a\202\274c");
+           "^a\\p{Hiragana}c$", "a\202\274c");
 
   r = exec(ONIG_ENCODING_EUC_JP, ONIG_OPTION_NONE,
-          "^a\\p{Hiragana}c$", "a\244\276c");
+           "^a\\p{Hiragana}c$", "a\244\276c");
 
   r = exec(ONIG_ENCODING_CP1251, ONIG_OPTION_IGNORECASE,
-          "aBc", " AbC");
+           "aBc", " AbC");
 
   r = exec(ONIG_ENCODING_ISO_8859_1, ONIG_OPTION_IGNORECASE,
-          " [a-c\337z] ", "  SS  ");
+           " [a-c\337z] ", "  SS  ");
   r = exec(ONIG_ENCODING_ISO_8859_1, ONIG_OPTION_IGNORECASE,
-          " [\330-\341] ", "  SS  ");
+           " [\330-\341] ", "  SS  ");
 
   r = exec(ONIG_ENCODING_ISO_8859_2, ONIG_OPTION_IGNORECASE,
-          "\337          ", "          Ss          ");
+           "\337          ", "          Ss          ");
   r = exec(ONIG_ENCODING_ISO_8859_2, ONIG_OPTION_IGNORECASE,
-          "SS          ", "          \337          ");
+           "SS          ", "          \337          ");
   r = exec(ONIG_ENCODING_ISO_8859_2, ONIG_OPTION_IGNORECASE,
-          "\\A\\S\\z", "ss");
+           "\\A\\S\\z", "ss");
 
   r = exec(ONIG_ENCODING_ISO_8859_2, ONIG_OPTION_IGNORECASE,
-          "[ac]+", "bbbaAaCCC");
+           "[ac]+", "bbbaAaCCC");
 
   r = exec(ONIG_ENCODING_ISO_8859_3, ONIG_OPTION_IGNORECASE,
-          "[ac]+", "bbbaAaCCC");
+           "[ac]+", "bbbaAaCCC");
   r = exec(ONIG_ENCODING_ISO_8859_4, ONIG_OPTION_IGNORECASE,
-          "[ac]+", "bbbaAaCCC");
+           "[ac]+", "bbbaAaCCC");
   r = exec(ONIG_ENCODING_ISO_8859_5, ONIG_OPTION_IGNORECASE,
-          "[ac]+", "bbbaAaCCC");
+           "[ac]+", "bbbaAaCCC");
   r = exec(ONIG_ENCODING_ISO_8859_6, ONIG_OPTION_IGNORECASE,
-          "[ac]+", "bbbaAaCCC");
+           "[ac]+", "bbbaAaCCC");
   r = exec(ONIG_ENCODING_ISO_8859_7, ONIG_OPTION_IGNORECASE,
-          "[ac]+", "bbbaAaCCC");
+           "[ac]+", "bbbaAaCCC");
   r = exec(ONIG_ENCODING_ISO_8859_8, ONIG_OPTION_IGNORECASE,
-          "[ac]+", "bbbaAaCCC");
+           "[ac]+", "bbbaAaCCC");
   r = exec(ONIG_ENCODING_ISO_8859_9, ONIG_OPTION_IGNORECASE,
-          "[ac]+", "bbbaAaCCC");
+           "[ac]+", "bbbaAaCCC");
   r = exec(ONIG_ENCODING_ISO_8859_10, ONIG_OPTION_IGNORECASE,
-          "[ac]+", "bbbaAaCCC");
+           "[ac]+", "bbbaAaCCC");
   r = exec(ONIG_ENCODING_ISO_8859_11, ONIG_OPTION_IGNORECASE,
-          "[ac]+", "bbbaAaCCC");
+           "[ac]+", "bbbaAaCCC");
   r = exec(ONIG_ENCODING_ISO_8859_13, ONIG_OPTION_IGNORECASE,
-          "[ac]+", "bbbaAaCCC");
+           "[ac]+", "bbbaAaCCC");
   r = exec(ONIG_ENCODING_ISO_8859_14, ONIG_OPTION_IGNORECASE,
-          "[ac]+", "bbbaAaCCC");
+           "[ac]+", "bbbaAaCCC");
   r = exec(ONIG_ENCODING_ISO_8859_15, ONIG_OPTION_IGNORECASE,
-          (char* )pattern, (char* )str);
+           (char* )pattern, (char* )str);
   r = exec(ONIG_ENCODING_ISO_8859_16, ONIG_OPTION_IGNORECASE,
-          (char* )pattern, (char* )str);
+           (char* )pattern, (char* )str);
 
   r = exec(ONIG_ENCODING_KOI8_R, ONIG_OPTION_NONE, "a+", "bbbaaaccc");
   r = exec(ONIG_ENCODING_EUC_TW, ONIG_OPTION_NONE, "b*a+?c+", "bbbaaaccc");
@@ -230,45 +230,45 @@ extern int main(int argc, char* argv[])
                   "\337", "S\000\000\000S\000\000\000\000\000\000\000");
 
   r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_NONE,
-          "\000[\000[\000:\000a\000l\000n\000u\000m\000:\000]\000]\000+\000\000",
+           "\000[\000[\000:\000a\000l\000n\000u\000m\000:\000]\000]\000+\000\000",
            "\000#\002\120\000a\000Z\012\077\012\076\012\075\000\000");
   /* 0x0a3d == \012\075 : is not alnum */
   /* 0x0a3e == \012\076 : is alnum */
 
   r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_NONE,
-          "\000\\\000d\000+\000\000",
+           "\000\\\000d\000+\000\000",
            "\0003\0001\377\020\377\031\377\032\000\000");
 
   r = exec(ONIG_ENCODING_GB18030, ONIG_OPTION_IGNORECASE,
-          "(Aa\\d)+", "BaA5Aa0234");
+           "(Aa\\d)+", "BaA5Aa0234");
 
   r = exec_deluxe(ONIG_ENCODING_ISO_8859_1, ONIG_ENCODING_UTF16_BE,
                   ONIG_OPTION_NONE,
-                 "^\\P{Hiragana}\\p{^Hiragana}(\\p{Hiragana}+)$",
-                 "\060\100\060\240\060\101\060\102\060\226\060\237\000\000");
+                  "^\\P{Hiragana}\\p{^Hiragana}(\\p{Hiragana}+)$",
+                  "\060\100\060\240\060\101\060\102\060\226\060\237\000\000");
 
   r = exec_deluxe(ONIG_ENCODING_UTF16_BE, ONIG_ENCODING_UTF16_BE,
                   ONIG_OPTION_IGNORECASE,
-                 "\000[\000\337\000]\000\000", "\000S\000S\000\000");
+                  "\000[\000\337\000]\000\000", "\000S\000S\000\000");
 
   r = exec_deluxe(ONIG_ENCODING_UTF16_BE, ONIG_ENCODING_UTF16_BE,
                   ONIG_OPTION_IGNORECASE,
-                 "\000[\000\337\000]\000\000", "\000s\000S\000\000");
+                  "\000[\000\337\000]\000\000", "\000s\000S\000\000");
 
   r = exec_deluxe(ONIG_ENCODING_UTF16_BE, ONIG_ENCODING_UTF16_BE,
                   ONIG_OPTION_IGNORECASE,
-                 "\000^\000[\000\001\000-\377\375\000]\000$\000\000",
-                 "\000s\000S\000\000");
+                  "\000^\000[\000\001\000-\377\375\000]\000$\000\000",
+                  "\000s\000S\000\000");
 
   r = exec_deluxe(ONIG_ENCODING_UTF16_BE, ONIG_ENCODING_UTF16_BE,
                   ONIG_OPTION_IGNORECASE,
-                 "\000S\000S\000\000",
-                 "\000S\000T\000\337\000\000");
+                  "\000S\000S\000\000",
+                  "\000S\000T\000\337\000\000");
 
   r = exec_deluxe(ONIG_ENCODING_UTF16_BE, ONIG_ENCODING_UTF16_BE,
                   ONIG_OPTION_IGNORECASE,
-                 "\000S\000T\000S\000S\000\000",
-                 "\000S\000t\000s\000S\000\000");
+                  "\000S\000T\000S\000S\000\000",
+                  "\000S\000t\000s\000S\000\000");
 
   {
     UChar pat[]  = { 0x1f, 0xfc, 0x00, 0x00 };
@@ -276,12 +276,10 @@ extern int main(int argc, char* argv[])
     UChar str2[] = { 0x1f, 0xf3, 0x00, 0x00 };
 
     r = exec_deluxe(ONIG_ENCODING_UTF16_BE, ONIG_ENCODING_UTF16_BE,
-                   ONIG_OPTION_IGNORECASE,
-                   (char* )pat, (char* )str1);
+                    ONIG_OPTION_IGNORECASE, (char* )pat, (char* )str1);
 
     r = exec_deluxe(ONIG_ENCODING_UTF16_BE, ONIG_ENCODING_UTF16_BE,
-                   ONIG_OPTION_IGNORECASE,
-                   (char* )pat, (char* )str2);
+                    ONIG_OPTION_IGNORECASE, (char* )pat, (char* )str2);
   }
 
 #if 0
@@ -291,15 +289,15 @@ extern int main(int argc, char* argv[])
 
   r = exec_deluxe(ONIG_ENCODING_UTF8, ONIG_ENCODING_UTF8,
                   ONIG_OPTION_IGNORECASE,
-                 "Ii", "\304\261\304\260");
+                  "Ii", "\304\261\304\260");
 
   r = exec_deluxe(ONIG_ENCODING_UTF16_BE, ONIG_ENCODING_UTF16_BE,
                   ONIG_OPTION_IGNORECASE,
-                 "\000I\000i\000\000", "\001\061\001\060\000\000");
+                  "\000I\000i\000\000", "\001\061\001\060\000\000");
 
   r = exec_deluxe(ONIG_ENCODING_UTF16_BE, ONIG_ENCODING_UTF16_BE,
                   ONIG_OPTION_IGNORECASE,
-                 "\001\061\001\060\000\000", "\000I\000i\000\000");
+                  "\001\061\001\060\000\000", "\000I\000i\000\000");
 
   set_case_fold(ONIGENC_CASE_FOLD_MIN);
 #endif
index 8598d6af8afabf03ba0d5ad0eef0795c43d9135c..e0fe23a564880903c820e8df2a5708904e448dab 100644 (file)
@@ -33,7 +33,7 @@ extern int ex(unsigned char* str, unsigned char* pattern,
   OnigRegion *region;
 
   r = onig_new(&reg, pattern, pattern + strlen((char* )pattern),
-              ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, syntax, &einfo);
+               ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, syntax, &einfo);
   if (r != ONIG_NORMAL) {
     char s[ONIG_MAX_ERROR_MESSAGE_LEN];
     onig_error_code_to_str((UChar* )s, r, &einfo);
index e570402dd165563eff5582fdf5478dd38a35b8c4..a838056729e8906c991bf732ff64066fdc682c3b 100644 (file)
@@ -7,8 +7,8 @@
 
 static int
 name_callback(const UChar* name, const UChar* name_end,
-             int ngroup_num, int* group_nums,
-             regex_t* reg, void* arg)
+              int ngroup_num, int* group_nums,
+              regex_t* reg, void* arg)
 {
   int i, gn, ref;
   char* s;
@@ -39,7 +39,7 @@ extern int main(int argc, char* argv[])
   onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0]));
 
   r = onig_new(&reg, pattern, pattern + strlen((char* )pattern),
-       ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo);
+        ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo);
   if (r != ONIG_NORMAL) {
     char s[ONIG_MAX_ERROR_MESSAGE_LEN];
     onig_error_code_to_str((UChar* )s, r, &einfo);
index 9860dbe7d0d796c29a13c333245dce090cb3d92a..95110b888e1a222fe5c2afe96e21426f969943de 100644 (file)
@@ -20,7 +20,7 @@ extern int main(int argc, char* argv[])
   onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0]));
 
   r = onig_new(&reg, pattern, pattern + strlen((char* )pattern),
-       ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo);
+        ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo);
   if (r != ONIG_NORMAL) {
     char s[ONIG_MAX_ERROR_MESSAGE_LEN];
     onig_error_code_to_str((UChar* )s, r, &einfo);
index 4f5283a006551ac812063a86a96203499cbc449f..8e95f70be42aac79fc21710ecc1d99c69203782e 100644 (file)
@@ -28,16 +28,16 @@ extern int main(int argc, char* argv[])
   onig_set_meta_char(&SQLSyntax, ONIG_META_CHAR_ESCAPE, (OnigCodePoint )'\\');
   onig_set_meta_char(&SQLSyntax, ONIG_META_CHAR_ANYCHAR, (OnigCodePoint )'_');
   onig_set_meta_char(&SQLSyntax, ONIG_META_CHAR_ANYTIME,
-                    ONIG_INEFFECTIVE_META_CHAR);
+                     ONIG_INEFFECTIVE_META_CHAR);
   onig_set_meta_char(&SQLSyntax, ONIG_META_CHAR_ZERO_OR_ONE_TIME,
-                    ONIG_INEFFECTIVE_META_CHAR);
+                     ONIG_INEFFECTIVE_META_CHAR);
   onig_set_meta_char(&SQLSyntax, ONIG_META_CHAR_ONE_OR_MORE_TIME,
-                    ONIG_INEFFECTIVE_META_CHAR);
+                     ONIG_INEFFECTIVE_META_CHAR);
   onig_set_meta_char(&SQLSyntax, ONIG_META_CHAR_ANYCHAR_ANYTIME,
-                    (OnigCodePoint )'%');
+                     (OnigCodePoint )'%');
 
   r = onig_new(&reg, pattern, pattern + strlen((char* )pattern),
-              ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, &SQLSyntax, &einfo);
+               ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, &SQLSyntax, &einfo);
   if (r != ONIG_NORMAL) {
     char s[ONIG_MAX_ERROR_MESSAGE_LEN];
     onig_error_code_to_str((UChar* )s, r, &einfo);
index 02af2eab1b60f38ebca210298ca1d0806161aefb..e2920798d90ff5be03b1fa07f872b6f16b8c693a 100644 (file)
@@ -5,8 +5,7 @@
 #include <string.h>
 #include "oniguruma.h"
 
-extern int exec(OnigSyntaxType* syntax,
-               char* apattern, char* astr)
+extern int exec(OnigSyntaxType* syntax, char* apattern, char* astr)
 {
   int r;
   unsigned char *start, *range, *end;
@@ -17,7 +16,7 @@ extern int exec(OnigSyntaxType* syntax,
   UChar* str     = (UChar* )astr;
 
   r = onig_new(&reg, pattern, pattern + strlen((char* )pattern),
-              ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, syntax, &einfo);
+               ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, syntax, &einfo);
   if (r != ONIG_NORMAL) {
     char s[ONIG_MAX_ERROR_MESSAGE_LEN];
     onig_error_code_to_str((UChar* )s, r, &einfo);
@@ -62,11 +61,10 @@ extern int main(int argc, char* argv[])
   onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0]));
 
   r = exec(ONIG_SYNTAX_PERL,
-          "\\p{XDigit}\\P{XDigit}\\p{^XDigit}\\P{^XDigit}\\p{XDigit}",
-          "bgh3a");
+           "\\p{XDigit}\\P{XDigit}\\p{^XDigit}\\P{^XDigit}\\p{XDigit}",
+           "bgh3a");
 
-  r = exec(ONIG_SYNTAX_JAVA,
-          "\\p{XDigit}\\P{XDigit}[a-c&&b-g]", "bgc");
+  r = exec(ONIG_SYNTAX_JAVA, "\\p{XDigit}\\P{XDigit}[a-c&&b-g]", "bgc");
 
   r = exec(ONIG_SYNTAX_ASIS,
            "abc def* e+ g?ddd[a-rvvv] (vv){3,7}hv\\dvv(?:aczui ss)\\W\\w$",
index 99b3f2c8799a51eee365fe579604e3b6aa966239..8b2abd24274291571627514dfd877d340270bca5 100644 (file)
@@ -32,8 +32,7 @@ main(int argc, char* argv[])
   OnigEncoding use_encs[] = { ONIG_ENCODING_UTF8 };
   onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0]));
 
-  r = onig_unicode_define_user_property("HandakuonHiragana",
-                                       handakuon_hiragana);
+  r = onig_unicode_define_user_property("HandakuonHiragana", handakuon_hiragana);
   if (r == ONIG_NORMAL) {
     fprintf(stdout, "define HandakuonHiragana\n");
   }
@@ -45,7 +44,7 @@ main(int argc, char* argv[])
   }
 
   r = onig_new(&reg, pattern, pattern + strlen((char* )pattern),
-       ONIG_OPTION_DEFAULT, ONIG_ENCODING_UTF8, ONIG_SYNTAX_DEFAULT, &einfo);
+       ONIG_OPTION_DEFAULT, ONIG_ENCODING_UTF8, ONIG_SYNTAX_DEFAULT, &einfo);
   if (r == ONIG_NORMAL) {
     fprintf(stdout, "onig_new: success.\n");
   }