From: K.Kosako Date: Fri, 29 Mar 2019 13:39:08 +0000 (+0900) Subject: remove tabs X-Git-Tag: v6.9.2_rc1~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa4a4af364a6e28d153e3ca74e995cbf24bb9611;p=onig remove tabs --- diff --git a/contributed/libfuzzer-onig.cpp b/contributed/libfuzzer-onig.cpp index dcd7c63..e137b73 100644 --- a/contributed/libfuzzer-onig.cpp +++ b/contributed/libfuzzer-onig.cpp @@ -3,14 +3,14 @@ Usage: * compile oniguruma with something like - ./configure CC=clang LD=clang CFLAGS="-fsanitize-coverage=edge -fsanitize=address" \ - LDFLAGS="-fsanitize-coverage=edge -fsanitize=address" + ./configure CC=clang LD=clang CFLAGS="-fsanitize-coverage=edge -fsanitize=address" \ + LDFLAGS="-fsanitize-coverage=edge -fsanitize=address" * Compile libfuzzer stub and link against static libonig.a and libFuzzer.a: - clang++ libfuzzer-onig.cpp src/.libs/libonig.a libFuzzer.a -o libfuzzer-onig \ - -fsanitize-coverage=edge -fsanitize=address + clang++ libfuzzer-onig.cpp src/.libs/libonig.a libFuzzer.a -o libfuzzer-onig \ + -fsanitize-coverage=edge -fsanitize=address * Put sample patterns in directory "in/" * Run - ./libfuzzer-onig in + ./libfuzzer-onig in Consult libfuzzer docs for further details and how to create libFuzzer.a: http://llvm.org/docs/LibFuzzer.html @@ -22,7 +22,7 @@ http://llvm.org/docs/LibFuzzer.html extern "C" int LLVMFuzzerTestOneInput(const uint8_t * Data, size_t Size) { - regex_t *reg; + regex_t *reg; OnigEncoding enc; enc = ONIG_ENCODING_UTF8; @@ -31,13 +31,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t * Data, size_t Size) onig_initialize(&enc, 1); #endif - if (onig_new(®, Data, Data + Size, ONIG_OPTION_DEFAULT, enc, + if (onig_new(®, Data, Data + Size, ONIG_OPTION_DEFAULT, enc, ONIG_SYNTAX_DEFAULT, 0) == 0) - onig_free(reg); + onig_free(reg); #ifdef FULL_TEST onig_end(); #endif - return 0; + return 0; } diff --git a/doc/API.ja b/doc/API.ja index f160c97..164d0b8 100644 --- a/doc/API.ja +++ b/doc/API.ja @@ -1,4 +1,4 @@ -鬼車インターフェース Version 6.9.2 2019/03/25 +鬼車インターフェース Version 6.9.2 2019/03/29 #include @@ -327,8 +327,8 @@ 8 mp: マッチパラメタ値 (match_stack_limit, retry_limit_in_match) -# int onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, - OnigRegion* region, OnigOptionType option) +# int onig_match(regex_t* reg, const UChar* str, const UChar* end, + const UChar* at, OnigRegion* region, OnigOptionType option) 文字列の指定位置でマッチングを行い、結果とマッチ領域を返す。 diff --git a/windows/testc.c b/windows/testc.c index 2e13350..b657682 100644 --- a/windows/testc.c +++ b/windows/testc.c @@ -73,7 +73,7 @@ static void xx(char* pattern, char* str, int from, int to, int mem, int not) } else { fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str, - from, to, pmatch[mem].rm_so, pmatch[mem].rm_eo); + from, to, pmatch[mem].rm_so, pmatch[mem].rm_eo); nfail++; } } @@ -85,7 +85,7 @@ static void xx(char* pattern, char* str, int from, int to, int mem, int not) OnigErrorInfo einfo; r = onig_new(®, (UChar* )pattern, (UChar* )(pattern + SLEN(pattern)), - ONIG_OPTION_DEFAULT, ONIG_ENCODING_SJIS, ONIG_SYNTAX_DEFAULT, &einfo); + ONIG_OPTION_DEFAULT, ONIG_ENCODING_SJIS, ONIG_SYNTAX_DEFAULT, &einfo); if (r) { char s[ONIG_MAX_ERROR_MESSAGE_LEN]; onig_error_code_to_str((UChar* )s, r, &einfo); @@ -95,8 +95,8 @@ static void xx(char* pattern, char* str, int from, int to, int mem, int not) } r = onig_search(reg, (UChar* )str, (UChar* )(str + SLEN(str)), - (UChar* )str, (UChar* )(str + SLEN(str)), - region, ONIG_OPTION_NONE); + (UChar* )str, (UChar* )(str + SLEN(str)), + region, ONIG_OPTION_NONE); if (r < ONIG_MISMATCH) { char s[ONIG_MAX_ERROR_MESSAGE_LEN]; onig_error_code_to_str((UChar* )s, r); @@ -127,7 +127,7 @@ static void xx(char* pattern, char* str, int from, int to, int mem, int not) } else { fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str, - from, to, region->beg[mem], region->end[mem]); + from, to, region->beg[mem], region->end[mem]); nfail++; } }