aboutsummaryrefslogtreecommitdiffstats
path: root/regexec.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-01-18 05:52:52 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-01-18 05:52:52 +0200
commit7985a75ad0cd606794fac7ba662637372bd204a9 (patch)
treebb41be33d92ea608ccb6efe9bc6cf7b39de3daab /regexec.c
parentc5fbf475a8efa76f67c5e795d6adbb4bb0769ee8 (diff)
downloadegawk-7985a75ad0cd606794fac7ba662637372bd204a9.tar.gz
egawk-7985a75ad0cd606794fac7ba662637372bd204a9.tar.bz2
egawk-7985a75ad0cd606794fac7ba662637372bd204a9.zip
Minor bug fix and cleanup in regex routines, from GNULIB.
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/regexec.c b/regexec.c
index cff69bfc..8fe016af 100644
--- a/regexec.c
+++ b/regexec.c
@@ -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