summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-03-06 18:10:30 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-03-06 18:10:30 (GMT)
commit398bd3324f741d815b0f5d07260f6b0b1cba3707 (patch)
tree1fb07729d01f76971fd6c78b36d6238bc971d414 /generic
parent9ddb2d5b89db7bc23eb859ec16e10c2c43404c5f (diff)
downloadtcl-398bd3324f741d815b0f5d07260f6b0b1cba3707.zip
tcl-398bd3324f741d815b0f5d07260f6b0b1cba3707.tar.gz
tcl-398bd3324f741d815b0f5d07260f6b0b1cba3707.tar.bz2
Indent reduction in fixempties()
Diffstat (limited to 'generic')
-rw-r--r--generic/regc_nfa.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/generic/regc_nfa.c b/generic/regc_nfa.c
index d96dac8..800cb09 100644
--- a/generic/regc_nfa.c
+++ b/generic/regc_nfa.c
@@ -1319,15 +1319,15 @@ fixempties(
*/
for (s = nfa->states; s != NULL && !NISERR(); s = nexts) {
nexts = s->next;
- if (s->nouts == 1 && !s->flag) {
- a = s->outs;
- assert(a != NULL && a->outchain == NULL);
- if (a->type == EMPTY) {
- if (s != a->to)
- moveins(nfa, s, a->to);
- dropstate(nfa, s);
- }
- }
+ if (s->flag || s->nouts != 1)
+ continue;
+ a = s->outs;
+ assert(a != NULL && a->outchain == NULL);
+ if (a->type != EMPTY)
+ continue;
+ if (s != a->to)
+ moveins(nfa, s, a->to);
+ dropstate(nfa, s);
}
/*
@@ -1337,16 +1337,16 @@ fixempties(
for (s = nfa->states; s != NULL && !NISERR(); s = nexts) {
nexts = s->next;
/* while we're at it, ensure tmp fields are clear for next step */
- s->tmp = NULL;
- if (s->nins == 1 && !s->flag) {
- a = s->ins;
- assert(a != NULL && a->inchain == NULL);
- if (a->type == EMPTY) {
- if (s != a->from)
- moveouts(nfa, s, a->from);
- dropstate(nfa, s);
- }
- }
+ assert(s->tmp = NULL);
+ if (s->flag || s->nins != 1)
+ continue;
+ a = s->ins;
+ assert(a != NULL && a->inchain == NULL);
+ if (a->type != EMPTY)
+ continue;
+ if (s != a->from)
+ moveouts(nfa, s, a->from);
+ dropstate(nfa, s);
}
/*