diff options
author | dgp <dgp@users.sourceforge.net> | 2013-03-06 18:01:24 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-03-06 18:01:24 (GMT) |
commit | c16dc009d797e81788bcbe929418f4265197aad3 (patch) | |
tree | 3a2ca3f5eb608bc8013cbc4a05b7be81a5eda333 /generic/regc_nfa.c | |
parent | 2fbb537054087a99e3323cd3167814332d1053c0 (diff) | |
download | tcl-c16dc009d797e81788bcbe929418f4265197aad3.zip tcl-c16dc009d797e81788bcbe929418f4265197aad3.tar.gz tcl-c16dc009d797e81788bcbe929418f4265197aad3.tar.bz2 |
Indent reduction in fixempties()
Diffstat (limited to 'generic/regc_nfa.c')
-rw-r--r-- | generic/regc_nfa.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/generic/regc_nfa.c b/generic/regc_nfa.c index 5e2ad3a..baf4592 100644 --- a/generic/regc_nfa.c +++ b/generic/regc_nfa.c @@ -1306,15 +1306,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); } /* @@ -1324,16 +1324,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); } /* |