mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
Merge pull request #2501 from RaiKoHoff/grepWin_Integration
Oniguruma bug fixes
This commit is contained in:
commit
be72dc1384
@ -1,4 +1,4 @@
|
||||
Oniguruma API Version 6.9.6 2020/05/20
|
||||
Oniguruma API Version 6.9.6 2020/07/05
|
||||
|
||||
#include <oniguruma.h>
|
||||
|
||||
@ -335,8 +335,11 @@ Oniguruma API Version 6.9.6 2020/05/20
|
||||
6 region: address for return group match range info (NULL is allowed)
|
||||
7 option: search time option
|
||||
|
||||
ONIG_OPTION_NOTBOL string head(str) isn't considered as begin of line
|
||||
ONIG_OPTION_NOTEOL string end (end) isn't considered as end of line
|
||||
ONIG_OPTION_NOTBOL (str) isn't considered as begin of line and begin of string (* ONIG_OPTION_NOT_BEGIN_STRING)
|
||||
ONIG_OPTION_NOTEOL (end) isn't considered as end of line and end of string (* ONIG_OPTION_NOT_END_STRING)
|
||||
ONIG_OPTION_NOT_BEGIN_STRING (str) isn't considered as begin of string (* fail \A)
|
||||
ONIG_OPTION_NOT_END_STRING (end) isn't considered as end of string (* fail \z, \Z)
|
||||
ONIG_OPTION_NOT_BEGIN_POSITION (start) isn't considered as start position of search (* fail \G)
|
||||
|
||||
|
||||
# int onig_search_with_param(regex_t* reg, const UChar* str, const UChar* end,
|
||||
@ -369,8 +372,11 @@ Oniguruma API Version 6.9.6 2020/05/20
|
||||
5 region: address for return group match range info (NULL is allowed)
|
||||
6 option: search time option
|
||||
|
||||
ONIG_OPTION_NOTBOL string head(str) isn't considered as begin of line
|
||||
ONIG_OPTION_NOTEOL string end (end) isn't considered as end of line
|
||||
ONIG_OPTION_NOTBOL (str) isn't considered as begin of line and begin of string (* ONIG_OPTION_NOT_BEGIN_STRING)
|
||||
ONIG_OPTION_NOTEOL (end) isn't considered as end of line and end of string (* ONIG_OPTION_NOT_END_STRING)
|
||||
ONIG_OPTION_NOT_BEGIN_STRING (str) isn't considered as begin of string (* fail \A)
|
||||
ONIG_OPTION_NOT_END_STRING (end) isn't considered as end of string (* fail \z, \Z)
|
||||
ONIG_OPTION_NOT_BEGIN_POSITION (at) isn't considered as start position of search (* fail \G)
|
||||
|
||||
|
||||
# int onig_match_with_param(regex_t* reg, const UChar* str, const UChar* end,
|
||||
@ -502,8 +508,12 @@ Oniguruma API Version 6.9.6 2020/05/20
|
||||
ONIG_REGSET_REGEX_LEAD (returns most left position)
|
||||
ONIG_REGSET_PRIORITY_TO_REGEX_ORDER (returns first match regex)
|
||||
7 option: search time option
|
||||
ONIG_OPTION_NOTBOL string head(str) isn't considered as begin of line
|
||||
ONIG_OPTION_NOTEOL string end (end) isn't considered as end of line
|
||||
ONIG_OPTION_NOTBOL (str) isn't considered as begin of line and begin of string (* ONIG_OPTION_NOT_BEGIN_STRING)
|
||||
ONIG_OPTION_NOTEOL end (end) isn't considered as end of line and end of string (* ONIG_OPTION_NOT_END_STRING)
|
||||
ONIG_OPTION_NOT_BEGIN_STRING (str) isn't considered as begin of string (* fail \A)
|
||||
ONIG_OPTION_NOT_END_STRING (end) isn't considered as end of string (* fail \z, \Z)
|
||||
ONIG_OPTION_NOT_BEGIN_POSITION (start) isn't considered as start position of search (* fail \G)
|
||||
|
||||
8 rmatch_pos: return address of match position (match_address - str)
|
||||
|
||||
* ONIG_REGSET_POSITION_LEAD and ONIG_REGSET_REGEX_LEAD return the same result.
|
||||
@ -531,8 +541,12 @@ Oniguruma API Version 6.9.6 2020/05/20
|
||||
ONIG_REGSET_REGEX_LEAD (returns most left position)
|
||||
ONIG_REGSET_PRIORITY_TO_REGEX_ORDER (returns first match regex)
|
||||
7 option: search time option
|
||||
ONIG_OPTION_NOTBOL string head(str) isn't considered as begin of line
|
||||
ONIG_OPTION_NOTEOL string end (end) isn't considered as end of line
|
||||
ONIG_OPTION_NOTBOL (str) isn't considered as begin of line and begin of string (* ONIG_OPTION_NOT_BEGIN_STRING)
|
||||
ONIG_OPTION_NOTEOL (end) isn't considered as end of line and end of string (* ONIG_OPTION_NOT_END_STRING)
|
||||
ONIG_OPTION_NOT_BEGIN_STRING (str) isn't considered as begin of string (* fail \A)
|
||||
ONIG_OPTION_NOT_END_STRING (end) isn't considered as end of string (* fail \z, \Z)
|
||||
ONIG_OPTION_NOT_BEGIN_POSITION (start) isn't considered as start position of search (* fail \G)
|
||||
|
||||
8 mps: array of match-params
|
||||
9 rmatch_pos: return address of match position (match_address - str)
|
||||
|
||||
|
||||
@ -3557,6 +3557,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
||||
|
||||
CASE_OP(BEGIN_BUF)
|
||||
if (! ON_STR_BEGIN(s)) goto fail;
|
||||
if (OPTON_NOTBOL(msa->options)) goto fail;
|
||||
if (OPTON_NOT_BEGIN_STRING(msa->options)) goto fail;
|
||||
|
||||
INC_OP;
|
||||
@ -3564,6 +3565,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
||||
|
||||
CASE_OP(END_BUF)
|
||||
if (! ON_STR_END(s)) goto fail;
|
||||
if (OPTON_NOTEOL(msa->options)) goto fail;
|
||||
if (OPTON_NOT_END_STRING(msa->options)) goto fail;
|
||||
|
||||
INC_OP;
|
||||
@ -3611,6 +3613,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
||||
if (IS_EMPTY_STR || !ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) {
|
||||
#endif
|
||||
if (OPTON_NOTEOL(msa->options)) goto fail;
|
||||
if (OPTON_NOT_END_STRING(msa->options)) goto fail;
|
||||
INC_OP;
|
||||
JUMP_OUT;
|
||||
#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
|
||||
@ -3619,6 +3622,8 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
||||
}
|
||||
else if (ONIGENC_IS_MBC_NEWLINE(encode, s, end) &&
|
||||
ON_STR_END(s + enclen(encode, s))) {
|
||||
if (OPTON_NOTEOL(msa->options)) goto fail;
|
||||
if (OPTON_NOT_END_STRING(msa->options)) goto fail;
|
||||
INC_OP;
|
||||
JUMP_OUT;
|
||||
}
|
||||
@ -3627,6 +3632,8 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
||||
UChar* ss = s + enclen(encode, s);
|
||||
ss += enclen(encode, ss);
|
||||
if (ON_STR_END(ss)) {
|
||||
if (OPTON_NOTEOL(msa->options)) goto fail;
|
||||
if (OPTON_NOT_END_STRING(msa->options)) goto fail;
|
||||
INC_OP;
|
||||
JUMP_OUT;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user