* [PATCH] Formatting fixes in regexec.c
@ 2003-12-21 21:16 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2003-12-21 21:16 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Glibc hackers
Hi!
Just noticed formatting problems in check_dst_limits_calc_pos.
2003-12-21 Jakub Jelinek <jakub@redhat.com>
* posix/regexec.c (check_dst_limits_calc_pos): Fix formatting.
--- libc/posix/regexec.c.jj 2003-12-19 17:54:31.000000000 +0100
+++ libc/posix/regexec.c 2003-12-21 20:59:10.000000000 +0100
@@ -1746,7 +1746,7 @@ check_dst_limits_calc_pos (dfa, mctx, li
int limit, subexp_idx, from_node, str_idx;
{
struct re_backref_cache_entry *lim = mctx->bkref_ents + limit;
- int node_idx;
+ int node_idx;
/* If we are outside the range of the subexpression, return -1 or 1. */
if (str_idx < lim->subexp_from)
@@ -1761,23 +1761,23 @@ check_dst_limits_calc_pos (dfa, mctx, li
/* Else, we are on the boundary: examine the nodes on the epsilon
closure. */
- for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx)
- {
- int node = eclosures->elems[node_idx];
+ for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx)
+ {
+ int node = eclosures->elems[node_idx];
switch (dfa->nodes[node].type)
{
case OP_BACK_REF:
- {
- int bi = search_cur_bkref_entry (mctx, str_idx);
- for (; bi < mctx->nbkref_ents; ++bi)
- {
- struct re_backref_cache_entry *ent = mctx->bkref_ents + bi;
+ {
+ int bi = search_cur_bkref_entry (mctx, str_idx);
+ for (; bi < mctx->nbkref_ents; ++bi)
+ {
+ struct re_backref_cache_entry *ent = mctx->bkref_ents + bi;
int dst, cpos;
/* If this backreference goes beyond the point we're
examining, don't go any further. */
- if (ent->str_idx > str_idx)
- break;
+ if (ent->str_idx > str_idx)
+ break;
if (ent->node != node || ent->subexp_from != ent->subexp_to)
continue;
@@ -1788,7 +1788,7 @@ check_dst_limits_calc_pos (dfa, mctx, li
node, don't recurse because it would cause an
infinite loop: a regex that exhibits this behavior
is ()\1*\1* */
- dst = dfa->edests[node].elems[0];
+ dst = dfa->edests[node].elems[0];
if (dst == from_node)
{
if (str_idx == lim->subexp_from)
@@ -1797,17 +1797,17 @@ check_dst_limits_calc_pos (dfa, mctx, li
return 0;
}
- cpos = check_dst_limits_calc_pos (dfa, mctx, limit,
- dfa->eclosures + dst,
- subexp_idx, dst,
- str_idx);
+ cpos = check_dst_limits_calc_pos (dfa, mctx, limit,
+ dfa->eclosures + dst,
+ subexp_idx, dst,
+ str_idx);
if (cpos == -1 && str_idx == lim->subexp_from)
return -1;
if (cpos == 0 /* && str_idx == lim->lim->subexp_to */)
return 0;
- }
+ }
break;
}
Jakub
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-12-21 21:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-21 21:16 [PATCH] Formatting fixes in regexec.c Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).