diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-01-18 06:22:29 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-01-18 06:22:29 +0200 |
commit | 7c84c5f2d9e9a044e17b132628f675e0b199f640 (patch) | |
tree | 39b67feb78bfb189f80cdaf745fc61606fe1cf78 /regexec.c | |
parent | f8445dd6243fd158794d6d26c0373b5cdf45f18a (diff) | |
parent | 07795bbecb05b4d2d52bd8808c713b0c5ece7b3b (diff) | |
download | egawk-7c84c5f2d9e9a044e17b132628f675e0b199f640.tar.gz egawk-7c84c5f2d9e9a044e17b132628f675e0b199f640.tar.bz2 egawk-7c84c5f2d9e9a044e17b132628f675e0b199f640.zip |
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -306,7 +306,7 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); concerned. If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match - and all groups is stroed in REGS. (For the "_2" variants, the offsets are + and all groups is stored in REGS. (For the "_2" variants, the offsets are computed relative to the concatenation, not relative to the individual strings.) @@ -627,7 +627,7 @@ re_exec (s) /* Searches for a compiled pattern PREG in the string STRING, whose length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same - mingings with regexec. START, and RANGE have the same meanings + meaning as with regexec. START, and RANGE have the same meanings with re_search. Return REG_NOERROR if we find a match, and REG_NOMATCH if not, otherwise return the error code. @@ -695,7 +695,8 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch, fl_longest_match = (nmatch != 0 || dfa->nbackref); err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, - preg->translate, preg->syntax & RE_ICASE, dfa); + preg->translate, (preg->syntax & RE_ICASE) != 0, + dfa); if (BE (err != REG_NOERROR, 0)) goto free_return; mctx.input.stop = stop; @@ -912,7 +913,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch, goto free_return; } - /* At last, add the offset to the each registers, since we slided + /* At last, add the offset to each register, since we slid the buffers so that we could assume that the matching starts from 0. */ for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) @@ -963,8 +964,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch, static reg_errcode_t __attribute_warn_unused_result__ -prune_impossible_nodes (mctx) - re_match_context_t *mctx; +prune_impossible_nodes (re_match_context_t *mctx) { const re_dfa_t *const dfa = mctx->dfa; int halt_node, match_last; @@ -2420,7 +2420,7 @@ merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, /* Skip bytes in the input that correspond to part of a multi-byte match, then look in the log for a state from which to restart matching. */ -re_dfastate_t * +static re_dfastate_t * internal_function find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) { @@ -2449,7 +2449,7 @@ find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) /* From the node set CUR_NODES, pick up the nodes whose types are OP_OPEN_SUBEXP and which have corresponding back references in the regular expression. And register them to use them later for evaluating the - correspoding back references. */ + corresponding back references. */ static reg_errcode_t internal_function |