diff --git a/generic/rege_dfa.c b/generic/rege_dfa.c
index 0ded307..7405b70 100644
--- a/generic/rege_dfa.c
+++ b/generic/rege_dfa.c
@@ -726,10 +726,20 @@ lacon(
 }
 
 /*
- - getvacant - get a vacant state set
- * This routine clears out the inarcs and outarcs, but does not otherwise
- * clear the innards of the state set -- that's up to the caller.
- ^ static struct sset *getvacant(struct vars *, struct dfa *, chr *, chr *);
+ *----------------------------------------------------------------------
+ *
+ * getvacant --
+ *
+ *  Gets a vacant state set 
+ *
+ * Results:
+ *  Returns a vacant state set
+ *
+ * Side effects:
+ *	This routine clears out the inarcs and outarcs, but does not
+ *  clear the innards of the state set
+ *
+ *----------------------------------------------------------------------
  */
 static struct sset *
 getvacant(
@@ -754,11 +764,11 @@ getvacant(
 
     ap = ss->ins;
     while ((p = ap.ss) != NULL) {
-	co = ap.co;
-	FDEBUG(("zapping c%d's %ld outarc\n", p - d->ssets, (long)co));
-	p->outs[co] = NULL;
-	ap = p->inchain[co];
-	p->inchain[co].ss = NULL; /* paranoia */
+	    co = ap.co;
+	    FDEBUG(("zapping c%d's %ld outarc\n", p - d->ssets, (long)co));
+	    p->outs[co] = NULL;
+	    ap = p->inchain[co];
+	    p->inchain[co].ss = NULL; /* paranoia */
     }
     ss->ins.ss = NULL;
 
@@ -767,26 +777,25 @@ getvacant(
      */
 
     for (i = 0; i < d->ncolors; i++) {
-	p = ss->outs[i];
-	assert(p != ss);	/* not self-referential */
-	if (p == NULL) {
-	    continue;		/* NOTE CONTINUE */
-	}
-	FDEBUG(("del outarc %d from c%d's in chn\n", i, p - d->ssets));
-	if (p->ins.ss == ss && p->ins.co == i) {
-	    p->ins = ss->inchain[i];
-	} else {
-	    assert(p->ins.ss != NULL);
-	    for (ap = p->ins; ap.ss != NULL &&
-		    !(ap.ss == ss && ap.co == i);
-		    ap = ap.ss->inchain[ap.co]) {
-		lastap = ap;
+	    p = ss->outs[i];
+	    assert(p != ss);	/* not self-referential */
+	    if (p == NULL) {
+	        continue;		/* NOTE CONTINUE */
 	    }
-	    assert(ap.ss != NULL);
-	    lastap.ss->inchain[lastap.co] = ss->inchain[i];
-	}
-	ss->outs[i] = NULL;
-	ss->inchain[i].ss = NULL;
+	    FDEBUG(("del outarc %d from c%d's in chn\n", i, p - d->ssets));
+	    if (p->ins.ss == ss && p->ins.co == i) {
+	        p->ins = ss->inchain[i];
+	    } else {
+	        assert(p->ins.ss != NULL);
+	        for (ap = p->ins; ap.ss != NULL && !(ap.ss == ss && ap.co == i);
+		            ap = ap.ss->inchain[ap.co]) {
+		        lastap = ap;
+	        }
+	        assert(ap.ss != NULL);
+	        lastap.ss->inchain[lastap.co] = ss->inchain[i];
+	    }
+	    ss->outs[i] = NULL;
+	    ss->inchain[i].ss = NULL;
     }
 
     /*
@@ -794,8 +803,8 @@ getvacant(
      */
 
     if ((ss->flags&POSTSTATE) && ss->lastseen != d->lastpost &&
-	    (d->lastpost == NULL || d->lastpost < ss->lastseen)) {
-	d->lastpost = ss->lastseen;
+	        (d->lastpost == NULL || d->lastpost < ss->lastseen)) {
+	    d->lastpost = ss->lastseen;
     }
 
     /*
@@ -803,16 +812,27 @@ getvacant(
      */
 
     if ((ss->flags&NOPROGRESS) && ss->lastseen != d->lastnopr &&
-	    (d->lastnopr == NULL || d->lastnopr < ss->lastseen)) {
-	d->lastnopr = ss->lastseen;
+	        (d->lastnopr == NULL || d->lastnopr < ss->lastseen)) {
+	    d->lastnopr = ss->lastseen;
     }
 
     return ss;
 }
 
 /*
- - pickss - pick the next stateset to be used
- ^ static struct sset *pickss(struct vars *, struct dfa *, chr *, chr *);
+ *----------------------------------------------------------------------
+ *
+ * pickss --
+ *
+ *  pick the next stateset to be used 
+ *
+ * Results:
+ *  Returns the next state set to be used
+ *
+ * Side effects:
+ *	None
+ *
+ *----------------------------------------------------------------------
  */
 static struct sset *
 pickss(
@@ -831,26 +851,26 @@ pickss(
      */
 
     if (d->nssused < d->nssets) {
-	i = d->nssused;
-	d->nssused++;
-	ss = &d->ssets[i];
-	FDEBUG(("new c%d\n", i));
-
-	/*
-	 * Set up innards.
-	 */
-
-	ss->states = &d->statesarea[i * d->wordsper];
-	ss->flags = 0;
-	ss->ins.ss = NULL;
-	ss->ins.co = WHITE;	/* give it some value */
-	ss->outs = &d->outsarea[i * d->ncolors];
-	ss->inchain = &d->incarea[i * d->ncolors];
-	for (i = 0; i < d->ncolors; i++) {
-	    ss->outs[i] = NULL;
-	    ss->inchain[i].ss = NULL;
-	}
-	return ss;
+	    i = d->nssused;
+	    d->nssused++;
+	    ss = &d->ssets[i];
+	    FDEBUG(("new c%d\n", i));
+
+	    /*
+	    * Set up innards.
+	    */
+
+	    ss->states = &d->statesarea[i * d->wordsper];
+	    ss->flags = 0;
+	    ss->ins.ss = NULL;
+	    ss->ins.co = WHITE;	/* give it some value */
+	    ss->outs = &d->outsarea[i * d->ncolors];
+	    ss->inchain = &d->incarea[i * d->ncolors];
+	    for (i = 0; i < d->ncolors; i++) {
+	        ss->outs[i] = NULL;
+	        ss->inchain[i].ss = NULL;
+	    }
+	    return ss;
     }
 
     /*
@@ -858,25 +878,25 @@ pickss(
      */
 
     if (cp - start > d->nssets*2/3) {	/* oldest 33% are expendable */
-	ancient = cp - d->nssets*2/3;
+	    ancient = cp - d->nssets*2/3;
     } else {
-	ancient = start;
+	    ancient = start;
     }
     for (ss = d->search, end = &d->ssets[d->nssets]; ss < end; ss++) {
-	if ((ss->lastseen == NULL || ss->lastseen < ancient)
-		&& !(ss->flags&LOCKED)) {
-	    d->search = ss + 1;
-	    FDEBUG(("replacing c%d\n", ss - d->ssets));
-	    return ss;
-	}
+	    if ((ss->lastseen == NULL || ss->lastseen < ancient)
+		        && !(ss->flags&LOCKED)) {
+	        d->search = ss + 1;
+	        FDEBUG(("replacing c%d\n", ss - d->ssets));
+	        return ss;
+	    }
     }
     for (ss = d->ssets, end = d->search; ss < end; ss++) {
-	if ((ss->lastseen == NULL || ss->lastseen < ancient)
-		&& !(ss->flags&LOCKED)) {
-	    d->search = ss + 1;
-	    FDEBUG(("replacing c%d\n", ss - d->ssets));
-	    return ss;
-	}
+	    if ((ss->lastseen == NULL || ss->lastseen < ancient)
+		        && !(ss->flags&LOCKED)) {
+	        d->search = ss + 1;
+	        FDEBUG(("replacing c%d\n", ss - d->ssets));
+	        return ss;
+	    }
     }
 
     /*
diff --git a/generic/regexec.c b/generic/regexec.c
index ed6ceec..911771f 100644
--- a/generic/regexec.c
+++ b/generic/regexec.c
@@ -156,9 +156,19 @@ static struct sset *pickss(struct vars *, struct dfa *, chr *, chr *);
 /* =====^!^===== end forwards =====^!^===== */
 
 /*
- - exec - match regular expression
- ^ int exec(regex_t *, const chr *, size_t, rm_detail_t *,
- ^					size_t, regmatch_t [], int);
+ *----------------------------------------------------------------------
+ *
+ * exec --
+ *
+ *  Matches a regular expression
+ *
+ * Results:
+ *  Returns a match-code such as REG_NOMATCH
+ *
+ * Side effects:
+ *	None
+ *
+ *----------------------------------------------------------------------
  */
 int
 exec(
@@ -184,12 +194,12 @@ exec(
      */
 
     if (re == NULL || string == NULL || re->re_magic != REMAGIC) {
-	FreeVars(v);
-	return REG_INVARG;
+	    FreeVars(v);
+	    return REG_INVARG;
     }
     if (re->re_csize != sizeof(chr)) {
-	FreeVars(v);
-	return REG_MIXED;
+	    FreeVars(v);
+	    return REG_MIXED;
     }
 
     /*
@@ -199,63 +209,63 @@ exec(
     v->re = re;
     v->g = (struct guts *)re->re_guts;
     if ((v->g->cflags&REG_EXPECT) && details == NULL) {
-	FreeVars(v);
-	return REG_INVARG;
+	    FreeVars(v);
+	    return REG_INVARG;
     }
     if (v->g->info&REG_UIMPOSSIBLE) {
-	FreeVars(v);
-	return REG_NOMATCH;
+	    FreeVars(v);
+	    return REG_NOMATCH;
     }
     backref = (v->g->info&REG_UBACKREF) ? 1 : 0;
     v->eflags = flags;
     if (v->g->cflags&REG_NOSUB) {
-	nmatch = 0;		/* override client */
+	    nmatch = 0;		/* override client */
     }
     v->nmatch = nmatch;
     if (backref) {
-	/*
-	 * Need work area.
-	 */
-
-	if (v->g->nsub + 1 <= LOCALMAT) {
-	    v->pmatch = mat;
-	} else {
-	    v->pmatch = (regmatch_t *)
-		    MALLOC((v->g->nsub + 1) * sizeof(regmatch_t));
-	}
-	if (v->pmatch == NULL) {
-	    FreeVars(v);
-	    return REG_ESPACE;
-	}
-	v->nmatch = v->g->nsub + 1;
+	    /*
+	    * Need work area.
+	    */
+
+	    if (v->g->nsub + 1 <= LOCALMAT) {
+	        v->pmatch = mat;
+	    } else {
+	        v->pmatch = (regmatch_t *)
+		        MALLOC((v->g->nsub + 1) * sizeof(regmatch_t));
+	    }
+	    if (v->pmatch == NULL) {
+	        FreeVars(v);
+	        return REG_ESPACE;
+	    }
+	    v->nmatch = v->g->nsub + 1;
     } else {
-	v->pmatch = pmatch;
+	    v->pmatch = pmatch;
     }
     v->details = details;
     v->start = (chr *)string;
     v->stop = (chr *)string + len;
     v->err = 0;
     if (backref) {
-	/*
-	 * Need retry memory.
-	 */
-
-	assert(v->g->ntree >= 0);
-	n = (size_t)v->g->ntree;
-	if (n <= LOCALMEM) {
-	    v->mem = mem;
-	} else {
-	    v->mem = (regoff_t *) MALLOC(n*sizeof(regoff_t));
-	}
-	if (v->mem == NULL) {
-	    if (v->pmatch != pmatch && v->pmatch != mat) {
-		FREE(v->pmatch);
+	    /*
+	    * Need retry memory.
+	    */
+
+	    assert(v->g->ntree >= 0);
+	    n = (size_t)v->g->ntree;
+	    if (n <= LOCALMEM) {
+	        v->mem = mem;
+	    } else {
+	        v->mem = (regoff_t *) MALLOC(n*sizeof(regoff_t));
+	    }
+	    if (v->mem == NULL) {
+	        if (v->pmatch != pmatch && v->pmatch != mat) {
+		        FREE(v->pmatch);
+	        }
+	        FreeVars(v);
+	        return REG_ESPACE;
 	    }
-	    FreeVars(v);
-	    return REG_ESPACE;
-	}
     } else {
-	v->mem = NULL;
+	    v->mem = NULL;
     }
 
     /*
@@ -264,9 +274,9 @@ exec(
 
     assert(v->g->tree != NULL);
     if (backref) {
-	st = cfind(v, &v->g->tree->cnfa, &v->g->cmap);
+	    st = cfind(v, &v->g->tree->cnfa, &v->g->cmap);
     } else {
-	st = find(v, &v->g->tree->cnfa, &v->g->cmap);
+	    st = find(v, &v->g->tree->cnfa, &v->g->cmap);
     }
 
     /*
@@ -274,9 +284,9 @@ exec(
      */
 
     if (st == REG_OKAY && v->pmatch != pmatch && nmatch > 0) {
-	zapsubs(pmatch, nmatch);
-	n = (nmatch < v->nmatch) ? nmatch : v->nmatch;
-	memcpy(VS(pmatch), VS(v->pmatch), n*sizeof(regmatch_t));
+	    zapsubs(pmatch, nmatch);
+	    n = (nmatch < v->nmatch) ? nmatch : v->nmatch;
+	    memcpy(VS(pmatch), VS(v->pmatch), n*sizeof(regmatch_t));
     }
 
     /*
@@ -284,18 +294,29 @@ exec(
      */
 
     if (v->pmatch != pmatch && v->pmatch != mat) {
-	FREE(v->pmatch);
+	    FREE(v->pmatch);
     }
     if (v->mem != NULL && v->mem != mem) {
-	FREE(v->mem);
+	    FREE(v->mem);
     }
     FreeVars(v);
     return st;
 }
 
 /*
- - find - find a match for the main NFA (no-complications case)
- ^ static int find(struct vars *, struct cnfa *, struct colormap *);
+ *----------------------------------------------------------------------
+ *
+ * find --
+ *
+ *  Finds a match for the main NFA (no-complications case)
+ *
+ * Results:
+ *  Returns a match-code such as REG_NOMATCH
+ *
+ * Side effects:
+ *	None
+ *
+ *----------------------------------------------------------------------
  */
 static int
 find(
@@ -327,19 +348,19 @@ find(
     freedfa(s);
     NOERR();
     if (v->g->cflags&REG_EXPECT) {
-	assert(v->details != NULL);
-	if (cold != NULL) {
-	    v->details->rm_extend.rm_so = OFF(cold);
-	} else {
-	    v->details->rm_extend.rm_so = OFF(v->stop);
-	}
-	v->details->rm_extend.rm_eo = OFF(v->stop);	/* unknown */
+	    assert(v->details != NULL);
+	    if (cold != NULL) {
+	        v->details->rm_extend.rm_so = OFF(cold);
+	    } else {
+	        v->details->rm_extend.rm_so = OFF(v->stop);
+	    }
+	    v->details->rm_extend.rm_eo = OFF(v->stop);	/* unknown */
     }
     if (close == NULL) {	/* not found */
-	return REG_NOMATCH;
+	    return REG_NOMATCH;
     }
     if (v->nmatch == 0) {	/* found, don't need exact location */
-	return REG_OKAY;
+	    return REG_OKAY;
     }
 
     /*
@@ -354,19 +375,19 @@ find(
     assert(!(ISERR() && d != NULL));
     NOERR();
     for (begin = open; begin <= close; begin++) {
-	MDEBUG(("\nfind trying at %ld\n", LOFF(begin)));
-	if (shorter) {
-	    end = shortest(v, d, begin, begin, v->stop, NULL, &hitend);
-	} else {
-	    end = longest(v, d, begin, v->stop, &hitend);
-	}
-	NOERR();
-	if (hitend && cold == NULL) {
-	    cold = begin;
-	}
-	if (end != NULL) {
-	    break;		/* NOTE BREAK OUT */
-	}
+	    MDEBUG(("\nfind trying at %ld\n", LOFF(begin)));
+	    if (shorter) {
+	        end = shortest(v, d, begin, begin, v->stop, NULL, &hitend);
+	    } else {
+	        end = longest(v, d, begin, v->stop, &hitend);
+	    }
+	    NOERR();
+	    if (hitend && cold == NULL) {
+	        cold = begin;
+	    }
+	    if (end != NULL) {
+	        break;		/* NOTE BREAK OUT */
+	    }
     }
     assert(end != NULL);	/* search RE succeeded so loop should */
     freedfa(d);
@@ -379,15 +400,15 @@ find(
     v->pmatch[0].rm_so = OFF(begin);
     v->pmatch[0].rm_eo = OFF(end);
     if (v->g->cflags&REG_EXPECT) {
-	if (cold != NULL) {
-	    v->details->rm_extend.rm_so = OFF(cold);
-	} else {
-	    v->details->rm_extend.rm_so = OFF(v->stop);
-	}
-	v->details->rm_extend.rm_eo = OFF(v->stop);	/* unknown */
+	    if (cold != NULL) {
+	        v->details->rm_extend.rm_so = OFF(cold);
+	    } else {
+	        v->details->rm_extend.rm_so = OFF(v->stop);
+	    }
+	    v->details->rm_extend.rm_eo = OFF(v->stop);	/* unknown */
     }
     if (v->nmatch == 1) {	/* no need for submatches */
-	return REG_OKAY;
+	    return REG_OKAY;
     }
 
     /*
@@ -399,8 +420,19 @@ find(
 }
 
 /*
- - cfind - find a match for the main NFA (with complications)
- ^ static int cfind(struct vars *, struct cnfa *, struct colormap *);
+ *----------------------------------------------------------------------
+ *
+ * cfind --
+ *
+ *  Finds a match for the main NFA (with complications)
+ *
+ * Results:
+ *  Returns a match-code such as REG_NOMATCH
+ *
+ * Side effects:
+ *	None
+ *
+ *----------------------------------------------------------------------
  */
 static int
 cfind(
@@ -417,9 +449,9 @@ cfind(
     NOERR();
     d = newdfa(v, cnfa, cm, &v->dfa2);
     if (ISERR()) {
-	assert(d == NULL);
-	freedfa(s);
-	return v->err;
+	    assert(d == NULL);
+	    freedfa(s);
+	    return v->err;
     }
 
     ret = cfindloop(v, cnfa, cm, d, s, &cold);
@@ -428,21 +460,31 @@ cfind(
     freedfa(s);
     NOERR();
     if (v->g->cflags&REG_EXPECT) {
-	assert(v->details != NULL);
-	if (cold != NULL) {
-	    v->details->rm_extend.rm_so = OFF(cold);
-	} else {
-	    v->details->rm_extend.rm_so = OFF(v->stop);
-	}
-	v->details->rm_extend.rm_eo = OFF(v->stop);	/* unknown */
+	    assert(v->details != NULL);
+	    if (cold != NULL) {
+	        v->details->rm_extend.rm_so = OFF(cold);
+	    } else {
+	        v->details->rm_extend.rm_so = OFF(v->stop);
+	    }
+	    v->details->rm_extend.rm_eo = OFF(v->stop);	/* unknown */
     }
     return ret;
 }
 
 /*
- - cfindloop - the heart of cfind
- ^ static int cfindloop(struct vars *, struct cnfa *, struct colormap *,
- ^	struct dfa *, struct dfa *, chr **);
+ *----------------------------------------------------------------------
+ *
+ * cfindloop --
+ *
+ *  The heart of cfind
+ *
+ * Results:
+ *  Returns a match-code such as REG_NOMATCH
+ *
+ * Side effects:
+ *	None
+ *
+ *----------------------------------------------------------------------
  */
 static int
 cfindloop(
@@ -469,68 +511,68 @@ cfindloop(
     cold = NULL;
     close = v->start;
     do {
-	MDEBUG(("\ncsearch at %ld\n", LOFF(close)));
-	close = shortest(v, s, close, close, v->stop, &cold, NULL);
-	if (close == NULL) {
-	    break;		/* NOTE BREAK */
-	}
-	assert(cold != NULL);
-	open = cold;
-	cold = NULL;
-	MDEBUG(("cbetween %ld and %ld\n", LOFF(open), LOFF(close)));
-	for (begin = open; begin <= close; begin++) {
-	    MDEBUG(("\ncfind trying at %ld\n", LOFF(begin)));
-	    estart = begin;
-	    estop = v->stop;
-	    for (;;) {
-		if (shorter) {
-		    end = shortest(v, d, begin, estart, estop, NULL, &hitend);
-		} else {
-		    end = longest(v, d, begin, estop, &hitend);
-		}
-		if (hitend && cold == NULL) {
-		    cold = begin;
-		}
-		if (end == NULL) {
-		    break;	/* NOTE BREAK OUT */
-		}
-
-		MDEBUG(("tentative end %ld\n", LOFF(end)));
-		zapsubs(v->pmatch, v->nmatch);
-		zapmem(v, v->g->tree);
-		er = cdissect(v, v->g->tree, begin, end);
-		if (er == REG_OKAY) {
-		    if (v->nmatch > 0) {
-			v->pmatch[0].rm_so = OFF(begin);
-			v->pmatch[0].rm_eo = OFF(end);
-		    }
-		    *coldp = cold;
-		    return REG_OKAY;
-		}
-		if (er != REG_NOMATCH) {
-		    ERR(er);
-		    return er;
-		}
-		if ((shorter) ? end == estop : end == begin) {
-		    /*
-		     * No point in trying again.
-		     */
-
-		    *coldp = cold;
-		    return REG_NOMATCH;
-		}
-
-		/*
-		 * Go around and try again
-		 */
-
-		if (shorter) {
-		    estart = end + 1;
-		} else {
-		    estop = end - 1;
-		}
+	    MDEBUG(("\ncsearch at %ld\n", LOFF(close)));
+	    close = shortest(v, s, close, close, v->stop, &cold, NULL);
+	    if (close == NULL) {
+	        break;		/* NOTE BREAK */
+	    }
+	    assert(cold != NULL);
+	    open = cold;
+	    cold = NULL;
+	    MDEBUG(("cbetween %ld and %ld\n", LOFF(open), LOFF(close)));
+	    for (begin = open; begin <= close; begin++) {
+	        MDEBUG(("\ncfind trying at %ld\n", LOFF(begin)));
+	        estart = begin;
+	        estop = v->stop;
+	        for (;;) {
+		        if (shorter) {
+		            end = shortest(v, d, begin, estart, estop, NULL, &hitend);
+		        } else {
+		            end = longest(v, d, begin, estop, &hitend);
+		        }
+		        if (hitend && cold == NULL) {
+		            cold = begin;
+		        }
+		        if (end == NULL) {
+		            break;	/* NOTE BREAK OUT */
+		        }
+
+		        MDEBUG(("tentative end %ld\n", LOFF(end)));
+		        zapsubs(v->pmatch, v->nmatch);
+		        zapmem(v, v->g->tree);
+		        er = cdissect(v, v->g->tree, begin, end);
+		        if (er == REG_OKAY) {
+		            if (v->nmatch > 0) {
+			            v->pmatch[0].rm_so = OFF(begin);
+			            v->pmatch[0].rm_eo = OFF(end);
+		            }
+		            *coldp = cold;
+		            return REG_OKAY;
+		        }
+		        if (er != REG_NOMATCH) {
+		            ERR(er);
+		            return er;
+		        }
+		        if ((shorter) ? end == estop : end == begin) {
+		            /*
+		            * No point in trying again.
+		            */
+
+		            *coldp = cold;
+		            return REG_NOMATCH;
+		        }
+
+		        /*
+		        * Go around and try again
+		        */
+
+		        if (shorter) {
+		            estart = end + 1;
+		        } else {
+		            estop = end - 1;
+		        }
+	        }
 	    }
-	}
     } while (close < v->stop);
 
     *coldp = cold;
@@ -538,8 +580,20 @@ cfindloop(
 }
 
 /*
- - zapsubs - initialize the subexpression matches to "no match"
- ^ static void zapsubs(regmatch_t *, size_t);
+ *----------------------------------------------------------------------
+ *
+ * zapsubs --
+ *
+ *  Initializes the subexpression matches to "no match"
+ *
+ * Results:
+ *  No result
+ *
+ * Side effects:
+ *	Initializes the subexpression matches of the passed regmatch_t
+ *  p to "no match"
+ *
+ *----------------------------------------------------------------------
  */
 static void
 zapsubs(
@@ -549,14 +603,25 @@ zapsubs(
     size_t i;
 
     for (i = n-1; i > 0; i--) {
-	p[i].rm_so = -1;
-	p[i].rm_eo = -1;
+	    p[i].rm_so = -1;
+	    p[i].rm_eo = -1;
     }
 }
 
 /*
- - zapmem - initialize the retry memory of a subtree to zeros
- ^ static void zapmem(struct vars *, struct subre *);
+ *----------------------------------------------------------------------
+ *
+ * zapmem --
+ *
+ *  Initializes the retry memory of a subtree to zeros
+ *
+ * Results:
+ *  No result
+ *
+ * Side effects:
+ *	Initializes the retry memory of the passed subtree to zeros
+ *
+ *----------------------------------------------------------------------
  */
 static void
 zapmem(
@@ -564,28 +629,39 @@ zapmem(
     struct subre *t)
 {
     if (t == NULL) {
-	return;
+	    return;
     }
 
     assert(v->mem != NULL);
     v->mem[t->retry] = 0;
     if (t->op == '(') {
-	assert(t->subno > 0);
-	v->pmatch[t->subno].rm_so = -1;
+	    assert(t->subno > 0);
+	    v->pmatch[t->subno].rm_so = -1;
 		v->pmatch[t->subno].rm_eo = -1;
     }
 
     if (t->left != NULL) {
-	zapmem(v, t->left);
+	    zapmem(v, t->left);
     }
     if (t->right != NULL) {
-	zapmem(v, t->right);
+	    zapmem(v, t->right);
     }
 }
 
 /*
- - subset - set any subexpression relevant to a successful subre
- ^ static void subset(struct vars *, struct subre *, chr *, chr *);
+ *----------------------------------------------------------------------
+ *
+ * subset --
+ *
+ *  Sets any relevant subexpression to a successful subre
+ *
+ * Results:
+ *  No result
+ *
+ * Side effects:
+ *	Sets any relevant subexpression to a successful subre
+ *
+ *----------------------------------------------------------------------
  */
 static void
 subset(
@@ -598,7 +674,7 @@ subset(
 
     assert(n > 0);
     if ((size_t)n >= v->nmatch) {
-	return;
+	    return;
     }
 
     MDEBUG(("setting %d\n", n));
@@ -607,8 +683,19 @@ subset(
 }
 
 /*
- - dissect - determine subexpression matches (uncomplicated case)
- ^ static int dissect(struct vars *, struct subre *, chr *, chr *);
+ *----------------------------------------------------------------------
+ *
+ * dissect --
+ *
+ *  Determines subexpression matches (uncomplicated case)
+ *
+ * Results:
+ *  Returns a match-code such as REG_NOMATCH
+ *
+ * Side effects:
+ *	None
+ *
+ *----------------------------------------------------------------------
  */
 static int			/* regexec return code */
 dissect(
@@ -622,35 +709,46 @@ dissect(
 
     switch (t->op) {
     case '=':			/* terminal node */
-	assert(t->left == NULL && t->right == NULL);
-	return REG_OKAY;	/* no action, parent did the work */
-	break;
+	    assert(t->left == NULL && t->right == NULL);
+	    return REG_OKAY;	/* no action, parent did the work */
+	    break;
     case '|':			/* alternation */
-	assert(t->left != NULL);
-	return altdissect(v, t, begin, end);
-	break;
+	    assert(t->left != NULL);
+	    return altdissect(v, t, begin, end);
+	    break;
     case 'b':			/* back ref -- shouldn't be calling us! */
-	return REG_ASSERT;
-	break;
+	    return REG_ASSERT;
+	    break;
     case '.':			/* concatenation */
-	assert(t->left != NULL && t->right != NULL);
-	return condissect(v, t, begin, end);
-	break;
-    case '(':			/* capturing */
-	assert(t->left != NULL && t->right == NULL);
-	assert(t->subno > 0);
-	subset(v, t, begin, end);
-	return dissect(v, t->left, begin, end);
+	    assert(t->left != NULL && t->right != NULL);
+	    return condissect(v, t, begin, end);
 	break;
+        case '(':			/* capturing */
+	    assert(t->left != NULL && t->right == NULL);
+	    assert(t->subno > 0);
+	    subset(v, t, begin, end);
+	    return dissect(v, t->left, begin, end);
+	    break;
     default:
-	return REG_ASSERT;
-	break;
+	    return REG_ASSERT;
+	    break;
     }
 }
 
 /*
- - condissect - determine concatenation subexpression matches (uncomplicated)
- ^ static int condissect(struct vars *, struct subre *, chr *, chr *);
+ *----------------------------------------------------------------------
+ *
+ * condissect --
+ *
+ *  Determines concatenation subexpression matches (uncomplicated)
+ *
+ * Results:
+ *  Returns a match-code such as REG_NOMATCH
+ *
+ * Side effects:
+ *	None
+ *
+ *----------------------------------------------------------------------
  */
 static int			/* regexec return code */
 condissect(
@@ -674,9 +772,9 @@ condissect(
     NOERR();
     d2 = newdfa(v, &t->right->cnfa, &v->g->cmap, &v->dfa2);
     if (ISERR()) {
-	assert(d2 == NULL);
-	freedfa(d);
-	return v->err;
+	    assert(d2 == NULL);
+	    freedfa(d);
+	    return v->err;
     }
 
     /*
@@ -684,14 +782,14 @@ condissect(
      */
 
     if (shorter) {
-	mid = shortest(v, d, begin, begin, end, NULL, NULL);
+	    mid = shortest(v, d, begin, begin, end, NULL, NULL);
     } else {
-	mid = longest(v, d, begin, end, NULL);
+	    mid = longest(v, d, begin, end, NULL);
     }
     if (mid == NULL) {
-	freedfa(d);
-	freedfa(d2);
-	return REG_ASSERT;
+	    freedfa(d);
+	    freedfa(d2);
+	    return REG_ASSERT;
     }
     MDEBUG(("tentative midpoint %ld\n", LOFF(mid)));
 
@@ -700,36 +798,36 @@ condissect(
      */
 
     while (longest(v, d2, mid, end, NULL) != end) {
-	/*
-	 * That midpoint didn't work, find a new one.
-	 */
-
-	if (mid == stop) {
-	    /*
-	     * All possibilities exhausted!
-	     */
-
-	    MDEBUG(("no midpoint!\n"));
-	    freedfa(d);
-	    freedfa(d2);
-	    return REG_ASSERT;
-	}
-	if (shorter) {
-	    mid = shortest(v, d, begin, mid+1, end, NULL, NULL);
-	} else {
-	    mid = longest(v, d, begin, mid-1, NULL);
-	}
-	if (mid == NULL) {
 	    /*
-	     * Failed to find a new one!
-	     */
-
-	    MDEBUG(("failed midpoint!\n"));
-	    freedfa(d);
-	    freedfa(d2);
-	    return REG_ASSERT;
-	}
-	MDEBUG(("new midpoint %ld\n", LOFF(mid)));
+	    * That midpoint didn't work, find a new one.
+	    */
+
+	    if (mid == stop) {
+	        /*
+	        * All possibilities exhausted!
+	        */
+
+	        MDEBUG(("no midpoint!\n"));
+	        freedfa(d);
+	        freedfa(d2);
+	        return REG_ASSERT;
+	    }
+	    if (shorter) {
+	        mid = shortest(v, d, begin, mid+1, end, NULL, NULL);
+	    } else {
+	        mid = longest(v, d, begin, mid-1, NULL);
+	    }
+	    if (mid == NULL) {
+	        /*
+	        * Failed to find a new one!
+	        */
+
+	        MDEBUG(("failed midpoint!\n"));
+	        freedfa(d);
+	        freedfa(d2);
+	        return REG_ASSERT;
+	    }
+	    MDEBUG(("new midpoint %ld\n", LOFF(mid)));
     }
 
     /*
@@ -741,14 +839,25 @@ condissect(
     freedfa(d2);
     i = dissect(v, t->left, begin, mid);
     if (i != REG_OKAY) {
-	return i;
+	    return i;
     }
     return dissect(v, t->right, mid, end);
 }
 
 /*
- - altdissect - determine alternative subexpression matches (uncomplicated)
- ^ static int altdissect(struct vars *, struct subre *, chr *, chr *);
+ *----------------------------------------------------------------------
+ *
+ * altdissect --
+ *
+ *  Determines alternative subexpression matches (uncomplicated)
+ *
+ * Results:
+ *  Returns a match-code such as REG_NOMATCH
+ *
+ * Side effects:
+ *	None
+ *
+ *----------------------------------------------------------------------
  */
 static int			/* regexec return code */
 altdissect(
@@ -764,27 +873,38 @@ altdissect(
     assert(t->op == '|');
 
     for (i = 0; t != NULL; t = t->right, i++) {
-	MDEBUG(("trying %dth\n", i));
-	assert(t->left != NULL && t->left->cnfa.nstates > 0);
-	d = newdfa(v, &t->left->cnfa, &v->g->cmap, &v->dfa1);
-	if (ISERR()) {
-	    return v->err;
-	}
-	if (longest(v, d, begin, end, NULL) == end) {
-	    MDEBUG(("success\n"));
+	    MDEBUG(("trying %dth\n", i));
+	    assert(t->left != NULL && t->left->cnfa.nstates > 0);
+	    d = newdfa(v, &t->left->cnfa, &v->g->cmap, &v->dfa1);
+	    if (ISERR()) {
+	        return v->err;
+	    }
+	    if (longest(v, d, begin, end, NULL) == end) {
+	        MDEBUG(("success\n"));
+	        freedfa(d);
+	        return dissect(v, t->left, begin, end);
+	    }
 	    freedfa(d);
-	    return dissect(v, t->left, begin, end);
-	}
-	freedfa(d);
     }
     return REG_ASSERT;		/* none of them matched?!? */
 }
 
 /*
- - cdissect - determine subexpression matches (with complications)
+ *----------------------------------------------------------------------
+ *
+ * cdissect --
+ *
+ *  Determines subexpression matches (with complications)
  * The retry memory stores the offset of the trial midpoint from begin, plus 1
  * so that 0 uniquely means "clean slate".
- ^ static int cdissect(struct vars *, struct subre *, chr *, chr *);
+ *
+ * Results:
+ *  Returns a match-code such as REG_NOMATCH
+ *
+ * Side effects:
+ *	None
+ *
+ *----------------------------------------------------------------------
  */
 static int			/* regexec return code */
 cdissect(
@@ -799,42 +919,53 @@ cdissect(
     MDEBUG(("cdissect %ld-%ld %c\n", LOFF(begin), LOFF(end), t->op));
 
     switch (t->op) {
-    case '=':			/* terminal node */
-	assert(t->left == NULL && t->right == NULL);
-	return REG_OKAY;	/* no action, parent did the work */
-	break;
+        case '=':			/* terminal node */
+	    assert(t->left == NULL && t->right == NULL);
+	    return REG_OKAY;	/* no action, parent did the work */
+	    break;
     case '|':			/* alternation */
-	assert(t->left != NULL);
-	return caltdissect(v, t, begin, end);
-	break;
+	    assert(t->left != NULL);
+	    return caltdissect(v, t, begin, end);
+	    break;
     case 'b':			/* back ref -- shouldn't be calling us! */
-	assert(t->left == NULL && t->right == NULL);
-	return cbrdissect(v, t, begin, end);
-	break;
+	    assert(t->left == NULL && t->right == NULL);
+	    return cbrdissect(v, t, begin, end);
+	    break;
     case '.':			/* concatenation */
-	assert(t->left != NULL && t->right != NULL);
-	return ccondissect(v, t, begin, end);
-	break;
+	    assert(t->left != NULL && t->right != NULL);
+	    return ccondissect(v, t, begin, end);
+	    break;
     case '(':			/* capturing */
-	assert(t->left != NULL && t->right == NULL);
-	assert(t->subno > 0);
-	er = cdissect(v, t->left, begin, end);
-	if (er == REG_OKAY) {
-	    subset(v, t, begin, end);
-	}
-	return er;
-	break;
+	    assert(t->left != NULL && t->right == NULL);
+	    assert(t->subno > 0);
+	    er = cdissect(v, t->left, begin, end);
+	    if (er == REG_OKAY) {
+	        subset(v, t, begin, end);
+	    }
+	    return er;
+	    break;
     default:
-	return REG_ASSERT;
-	break;
+	    return REG_ASSERT;
+	    break;
     }
 }
 
 /*
- - ccondissect - concatenation subexpression matches (with complications)
+ *----------------------------------------------------------------------
+ *
+ * ccondissect --
+ *
+ *  Determines concatenation subexpression matches (with complications)
  * The retry memory stores the offset of the trial midpoint from begin, plus 1
  * so that 0 uniquely means "clean slate".
- ^ static int ccondissect(struct vars *, struct subre *, chr *, chr *);
+ *
+ * Results:
+ *  Returns a match-code such as REG_NOMATCH
+ *
+ * Side effects:
+ *	None
+ *
+ *----------------------------------------------------------------------
  */
 static int			/* regexec return code */
 ccondissect(
@@ -853,17 +984,17 @@ ccondissect(
     assert(t->right != NULL && t->right->cnfa.nstates > 0);
 
     if (t->left->flags&SHORTER) { /* reverse scan */
-	return crevdissect(v, t, begin, end);
+	    return crevdissect(v, t, begin, end);
     }
 
     d = newdfa(v, &t->left->cnfa, &v->g->cmap, DOMALLOC);
     if (ISERR()) {
-	return v->err;
+	    return v->err;
     }
     d2 = newdfa(v, &t->right->cnfa, &v->g->cmap, DOMALLOC);
     if (ISERR()) {
-	freedfa(d);
-	return v->err;
+	    freedfa(d);
+	    return v->err;
     }
     MDEBUG(("cconcat %d\n", t->retry));
 
@@ -872,17 +1003,17 @@ ccondissect(
      */
 
     if (v->mem[t->retry] == 0) {
-	mid = longest(v, d, begin, end, NULL);
-	if (mid == NULL) {
-	    freedfa(d);
-	    freedfa(d2);
-	    return REG_NOMATCH;
-	}
-	MDEBUG(("tentative midpoint %ld\n", LOFF(mid)));
-	v->mem[t->retry] = (mid - begin) + 1;
+	    mid = longest(v, d, begin, end, NULL);
+	    if (mid == NULL) {
+	        freedfa(d);
+	        freedfa(d2);
+	        return REG_NOMATCH;
+	    }
+	    MDEBUG(("tentative midpoint %ld\n", LOFF(mid)));
+	    v->mem[t->retry] = (mid - begin) + 1;
     } else {
-	mid = begin + (v->mem[t->retry] - 1);
-	MDEBUG(("working midpoint %ld\n", LOFF(mid)));
+	    mid = begin + (v->mem[t->retry] - 1);
+	    MDEBUG(("working midpoint %ld\n", LOFF(mid)));
     }
 
     /*
@@ -890,50 +1021,50 @@ ccondissect(
      */
 
     for (;;) {
-	/*
-	 * Try this midpoint on for size.
-	 */
-
-	er = cdissect(v, t->left, begin, mid);
-	if ((er == REG_OKAY) && (longest(v, d2, mid, end, NULL) == end)
-		&& (er = cdissect(v, t->right, mid, end)) == REG_OKAY) {
-	    break;		/* NOTE BREAK OUT */
-	}
-	if ((er != REG_OKAY) && (er != REG_NOMATCH)) {
-	    freedfa(d);
-	    freedfa(d2);
-	    return er;
-	}
-
-	/*
-	 * That midpoint didn't work, find a new one.
-	 */
-
-	if (mid == begin) {
 	    /*
-	     * All possibilities exhausted.
-	     */
+	    * Try this midpoint on for size.
+	    */
 
-	    MDEBUG(("%d no midpoint\n", t->retry));
-	    freedfa(d);
-	    freedfa(d2);
-	    return REG_NOMATCH;
-	}
-	mid = longest(v, d, begin, mid-1, NULL);
-	if (mid == NULL) {
-	    /*
-	     * Failed to find a new one.
-	     */
+	    er = cdissect(v, t->left, begin, mid);
+	    if ((er == REG_OKAY) && (longest(v, d2, mid, end, NULL) == end)
+		        && (er = cdissect(v, t->right, mid, end)) == REG_OKAY) {
+	        break;		/* NOTE BREAK OUT */
+	    }
+	    if ((er != REG_OKAY) && (er != REG_NOMATCH)) {
+	        freedfa(d);
+	        freedfa(d2);
+	        return er;
+	    }
 
-	    MDEBUG(("%d failed midpoint\n", t->retry));
-	    freedfa(d);
-	    freedfa(d2);
-	    return REG_NOMATCH;
-	}
-	MDEBUG(("%d: new midpoint %ld\n", t->retry, LOFF(mid)));
-	v->mem[t->retry] = (mid - begin) + 1;
-	zapmem(v, t->left);
-	zapmem(v, t->right);
+	    /*
+	    * That midpoint didn't work, find a new one.
+	    */
+
+	    if (mid == begin) {
+	        /*
+	        * All possibilities exhausted.
+	        */
+
+	        MDEBUG(("%d no midpoint\n", t->retry));
+	        freedfa(d);
+	        freedfa(d2);
+	        return REG_NOMATCH;
+	    }
+	    mid = longest(v, d, begin, mid-1, NULL);
+	    if (mid == NULL) {
+	        /*
+	        * Failed to find a new one.
+	        */
+
+	        MDEBUG(("%d failed midpoint\n", t->retry));
+	        freedfa(d);
+	        freedfa(d2);
+	        return REG_NOMATCH;
+	    }
+	    MDEBUG(("%d: new midpoint %ld\n", t->retry, LOFF(mid)));
+	    v->mem[t->retry] = (mid - begin) + 1;
+	    zapmem(v, t->left);
+	    zapmem(v, t->right);
     }
 
     /*
@@ -947,10 +1078,21 @@ ccondissect(
 }
 
 /*
- - crevdissect - determine backref shortest-first subexpression matches
+ *----------------------------------------------------------------------
+ *
+ * crevdissect --
+ *
+ *  Determines backref shortest-first subexpression matches
  * The retry memory stores the offset of the trial midpoint from begin, plus 1
  * so that 0 uniquely means "clean slate".
- ^ static int crevdissect(struct vars *, struct subre *, chr *, chr *);
+ *
+ * Results:
+ *  Returns a match-code such as REG_NOMATCH
+ *
+ * Side effects:
+ *	None
+ *
+ *----------------------------------------------------------------------
  */
 static int			/* regexec return code */
 crevdissect(
@@ -975,12 +1117,12 @@ crevdissect(
 
     d = newdfa(v, &t->left->cnfa, &v->g->cmap, DOMALLOC);
     if (ISERR()) {
-	return v->err;
+	    return v->err;
     }
     d2 = newdfa(v, &t->right->cnfa, &v->g->cmap, DOMALLOC);
     if (ISERR()) {
-	freedfa(d);
-	return v->err;
+	    freedfa(d);
+	    return v->err;
     }
     MDEBUG(("crev %d\n", t->retry));
 
@@ -989,17 +1131,17 @@ crevdissect(
      */
 
     if (v->mem[t->retry] == 0) {
-	mid = shortest(v, d, begin, begin, end, NULL, NULL);
-	if (mid == NULL) {
-	    freedfa(d);
-	    freedfa(d2);
-	    return REG_NOMATCH;
-	}
-	MDEBUG(("tentative midpoint %ld\n", LOFF(mid)));
-	v->mem[t->retry] = (mid - begin) + 1;
+	    mid = shortest(v, d, begin, begin, end, NULL, NULL);
+	    if (mid == NULL) {
+	        freedfa(d);
+	        freedfa(d2);
+	        return REG_NOMATCH;
+	    }
+	    MDEBUG(("tentative midpoint %ld\n", LOFF(mid)));
+	    v->mem[t->retry] = (mid - begin) + 1;
     } else {
-	mid = begin + (v->mem[t->retry] - 1);
-	MDEBUG(("working midpoint %ld\n", LOFF(mid)));
+	    mid = begin + (v->mem[t->retry] - 1);
+	    MDEBUG(("working midpoint %ld\n", LOFF(mid)));
     }
 
     /*
@@ -1007,50 +1149,50 @@ crevdissect(
      */
 
     for (;;) {
-	/*
-	 * Try this midpoint on for size.
-	 */
-
-	er = cdissect(v, t->left, begin, mid);
-	if ((er == REG_OKAY) && (longest(v, d2, mid, end, NULL) == end)
-		&& (er = cdissect(v, t->right, mid, end)) == REG_OKAY) {
-	    break;		/* NOTE BREAK OUT */
-	}
-	if (er != REG_OKAY && er != REG_NOMATCH) {
-	    freedfa(d);
-	    freedfa(d2);
-	    return er;
-	}
-
-	/*
-	 * That midpoint didn't work, find a new one.
-	 */
-
-	if (mid == end) {
 	    /*
-	     * All possibilities exhausted.
-	     */
+	    * Try this midpoint on for size.
+	    */
 
-	    MDEBUG(("%d no midpoint\n", t->retry));
-	    freedfa(d);
-	    freedfa(d2);
-	    return REG_NOMATCH;
-	}
-	mid = shortest(v, d, begin, mid+1, end, NULL, NULL);
-	if (mid == NULL) {
-	    /*
-	     * Failed to find a new one.
-	     */
+	    er = cdissect(v, t->left, begin, mid);
+	    if ((er == REG_OKAY) && (longest(v, d2, mid, end, NULL) == end)
+		        && (er = cdissect(v, t->right, mid, end)) == REG_OKAY) {
+	        break;		/* NOTE BREAK OUT */
+	    }
+	    if (er != REG_OKAY && er != REG_NOMATCH) {
+	        freedfa(d);
+	        freedfa(d2);
+	        return er;
+	    }
 
-	    MDEBUG(("%d failed midpoint\n", t->retry));
-	    freedfa(d);
-	    freedfa(d2);
-	    return REG_NOMATCH;
-	}
-	MDEBUG(("%d: new midpoint %ld\n", t->retry, LOFF(mid)));
-	v->mem[t->retry] = (mid - begin) + 1;
-	zapmem(v, t->left);
-	zapmem(v, t->right);
+	    /*
+	    * That midpoint didn't work, find a new one.
+	    */
+
+	    if (mid == end) {
+	        /*
+	        * All possibilities exhausted.
+	        */
+
+	        MDEBUG(("%d no midpoint\n", t->retry));
+	        freedfa(d);
+	        freedfa(d2);
+	        return REG_NOMATCH;
+	    }
+	    mid = shortest(v, d, begin, mid+1, end, NULL, NULL);
+	    if (mid == NULL) {
+	        /*
+	        * Failed to find a new one.
+	        */
+
+	        MDEBUG(("%d failed midpoint\n", t->retry));
+	        freedfa(d);
+	        freedfa(d2);
+	        return REG_NOMATCH;
+	    }
+	    MDEBUG(("%d: new midpoint %ld\n", t->retry, LOFF(mid)));
+	    v->mem[t->retry] = (mid - begin) + 1;
+	    zapmem(v, t->left);
+	    zapmem(v, t->right);
     }
 
     /*
@@ -1064,8 +1206,19 @@ crevdissect(
 }
 
 /*
- - cbrdissect - determine backref subexpression matches
- ^ static int cbrdissect(struct vars *, struct subre *, chr *, chr *);
+ *----------------------------------------------------------------------
+ *
+ * cbrdissect --
+ *
+ *  Determines backref subexpression matches
+ *
+ * Results:
+ *  Returns a match-code such as REG_NOMATCH
+ *
+ * Side effects:
+ *	None
+ *
+ *----------------------------------------------------------------------
  */
 static int			/* regexec return code */
 cbrdissect(
@@ -1091,7 +1244,7 @@ cbrdissect(
     MDEBUG(("cbackref n%d %d{%d-%d}\n", t->retry, n, min, max));
 
     if (v->pmatch[n].rm_so == -1) {
-	return REG_NOMATCH;
+	    return REG_NOMATCH;
     }
     paren = v->start + v->pmatch[n].rm_so;
     len = v->pmatch[n].rm_eo - v->pmatch[n].rm_so;
@@ -1101,7 +1254,7 @@ cbrdissect(
      */
 
     if (v->mem[t->retry]) {
-	return REG_NOMATCH;
+	    return REG_NOMATCH;
     }
     v->mem[t->retry] = 1;
 
@@ -1110,10 +1263,10 @@ cbrdissect(
      */
 
     if (len == 0) {
-	if (begin == end) {
-	    return REG_OKAY;
-	}
-	return REG_NOMATCH;
+	    if (begin == end) {
+	        return REG_OKAY;
+	    }
+	    return REG_NOMATCH;
     }
 
     /*
@@ -1122,7 +1275,7 @@ cbrdissect(
 
     assert(end >= begin);
     if ((size_t)(end - begin) < len) {
-	return REG_NOMATCH;
+	    return REG_NOMATCH;
     }
     stop = end - len;
 
@@ -1132,10 +1285,10 @@ cbrdissect(
 
     i = 0;
     for (p = begin; p <= stop && (i < max || max == INFINITY); p += len) {
-	if (v->g->compare(paren, p, len) != 0) {
-	    break;
-	}
-	i++;
+	    if (v->g->compare(paren, p, len) != 0) {
+	        break;
+	    }
+	    i++;
     }
     MDEBUG(("cbackref found %d\n", i));
 
@@ -1144,17 +1297,28 @@ cbrdissect(
      */
 
     if (p != end) {		/* didn't consume all of it */
-	return REG_NOMATCH;
+	    return REG_NOMATCH;
     }
     if (min <= i && (i <= max || max == INFINITY)) {
-	return REG_OKAY;
+	    return REG_OKAY;
     }
     return REG_NOMATCH;		/* out of range */
 }
 
 /*
- - caltdissect - determine alternative subexpression matches (w. complications)
- ^ static int caltdissect(struct vars *, struct subre *, chr *, chr *);
+ *----------------------------------------------------------------------
+ *
+ * caltdissect --
+ *
+ *  Determines alternative subexpression matches (with complications)
+ *
+ * Results:
+ *  Returns a match-code such as REG_NOMATCH
+ *
+ * Side effects:
+ *	None
+ *
+ *----------------------------------------------------------------------
  */
 static int			/* regexec return code */
 caltdissect(
@@ -1170,34 +1334,34 @@ caltdissect(
 #define	TRIED	2		/* top didn't match or submatches exhausted */
 
     if (t == NULL) {
-	return REG_NOMATCH;
+	    return REG_NOMATCH;
     }
     assert(t->op == '|');
     if (v->mem[t->retry] == TRIED) {
-	return caltdissect(v, t->right, begin, end);
+	    return caltdissect(v, t->right, begin, end);
     }
 
     MDEBUG(("calt n%d\n", t->retry));
     assert(t->left != NULL);
 
     if (v->mem[t->retry] == UNTRIED) {
-	d = newdfa(v, &t->left->cnfa, &v->g->cmap, DOMALLOC);
-	if (ISERR()) {
-	    return v->err;
-	}
-	if (longest(v, d, begin, end, NULL) != end) {
+	    d = newdfa(v, &t->left->cnfa, &v->g->cmap, DOMALLOC);
+	    if (ISERR()) {
+	        return v->err;
+	    }
+	    if (longest(v, d, begin, end, NULL) != end) {
+	        freedfa(d);
+	        v->mem[t->retry] = TRIED;
+	        return caltdissect(v, t->right, begin, end);
+	    }
 	    freedfa(d);
-	    v->mem[t->retry] = TRIED;
-	    return caltdissect(v, t->right, begin, end);
-	}
-	freedfa(d);
-	MDEBUG(("calt matched\n"));
-	v->mem[t->retry] = TRYING;
+	    MDEBUG(("calt matched\n"));
+	    v->mem[t->retry] = TRYING;
     }
 
     er = cdissect(v, t->left, begin, end);
     if (er != REG_NOMATCH) {
-	return er;
+	    return er;
     }
 
     v->mem[t->retry] = TRIED;
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index d9c41a9..3c41880 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -103,21 +103,21 @@ Tcl_RegexpObjCmd(
     Tcl_Interp *interp,		/* Current interpreter. */
     int objc,			/* Number of arguments. */
     Tcl_Obj *const objv[])	/* Argument objects. */
-{
+{        
     int i, indices, match, about, offset, all, doinline, numMatchesSaved;
     int cflags, eflags, stringLength;
     Tcl_RegExp regExpr;
     Tcl_Obj *objPtr, *startIndex = NULL, *resultPtr = NULL;
     Tcl_RegExpInfo info;
     static const char *const options[] = {
-	"-all",		"-about",	"-indices",	"-inline",
-	"-expanded",	"-line",	"-linestop",	"-lineanchor",
-	"-nocase",	"-start",	"--",		NULL
+	    "-all",		"-about",	"-indices",	"-inline",
+	    "-expanded",	"-line",	"-linestop",	"-lineanchor",
+	    "-nocase",	"-start",	"--",		NULL
     };
     enum options {
-	REGEXP_ALL,	REGEXP_ABOUT,	REGEXP_INDICES,	REGEXP_INLINE,
-	REGEXP_EXPANDED,REGEXP_LINE,	REGEXP_LINESTOP,REGEXP_LINEANCHOR,
-	REGEXP_NOCASE,	REGEXP_START,	REGEXP_LAST
+	    REGEXP_ALL,	REGEXP_ABOUT,	REGEXP_INDICES,	REGEXP_INLINE,
+	    REGEXP_EXPANDED,REGEXP_LINE,	REGEXP_LINESTOP,REGEXP_LINEANCHOR,
+	    REGEXP_NOCASE,	REGEXP_START,	REGEXP_LAST
     };
 
     indices = 0;
@@ -128,72 +128,72 @@ Tcl_RegexpObjCmd(
     all = 0;
     doinline = 0;
 
-    for (i = 1; i < objc; i++) {
-	const char *name;
-	int index;
+    for (i = 1; i < objc; i++) {        
+	    const char *name;
+	    int index;
 
-	name = TclGetString(objv[i]);
-	if (name[0] != '-') {
-	    break;
-	}
-	if (Tcl_GetIndexFromObj(interp, objv[i], options, "switch", TCL_EXACT,
-		&index) != TCL_OK) {
-	    goto optionError;
-	}
-	switch ((enum options) index) {
-	case REGEXP_ALL:
-	    all = 1;
-	    break;
-	case REGEXP_INDICES:
-	    indices = 1;
-	    break;
-	case REGEXP_INLINE:
-	    doinline = 1;
-	    break;
-	case REGEXP_NOCASE:
-	    cflags |= TCL_REG_NOCASE;
-	    break;
-	case REGEXP_ABOUT:
-	    about = 1;
-	    break;
-	case REGEXP_EXPANDED:
-	    cflags |= TCL_REG_EXPANDED;
-	    break;
-	case REGEXP_LINE:
-	    cflags |= TCL_REG_NEWLINE;
-	    break;
-	case REGEXP_LINESTOP:
-	    cflags |= TCL_REG_NLSTOP;
-	    break;
-	case REGEXP_LINEANCHOR:
-	    cflags |= TCL_REG_NLANCH;
-	    break;
-	case REGEXP_START: {
-	    int temp;
-	    if (++i >= objc) {
-		goto endOfForLoop;
+	    name = TclGetString(objv[i]);
+	    if (name[0] != '-') {
+	        break;
 	    }
-	    if (TclGetIntForIndexM(interp, objv[i], 0, &temp) != TCL_OK) {
-		goto optionError;
+	    if (Tcl_GetIndexFromObj(interp, objv[i], options, "switch", TCL_EXACT,
+		    &index) != TCL_OK) {
+	        goto optionError;
 	    }
-	    if (startIndex) {
-		Tcl_DecrRefCount(startIndex);
+	    switch ((enum options) index) {
+	    case REGEXP_ALL:
+	        all = 1;
+	        break;
+	    case REGEXP_INDICES:
+	        indices = 1;
+	        break;
+	    case REGEXP_INLINE:
+	        doinline = 1;
+	        break;
+	    case REGEXP_NOCASE:
+	        cflags |= TCL_REG_NOCASE;
+	        break;
+	    case REGEXP_ABOUT:
+	        about = 1;
+	        break;
+	    case REGEXP_EXPANDED:
+	        cflags |= TCL_REG_EXPANDED;
+	        break;
+	    case REGEXP_LINE:
+	        cflags |= TCL_REG_NEWLINE;
+	        break;
+	    case REGEXP_LINESTOP:
+	        cflags |= TCL_REG_NLSTOP;
+	        break;
+	    case REGEXP_LINEANCHOR:
+	        cflags |= TCL_REG_NLANCH;
+	        break;
+	    case REGEXP_START: {
+	        int temp;
+	        if (++i >= objc) {
+		        goto endOfForLoop;
+	        }
+	        if (TclGetIntForIndexM(interp, objv[i], 0, &temp) != TCL_OK) {
+		        goto optionError;
+	        }
+	        if (startIndex) {
+		        Tcl_DecrRefCount(startIndex);
+	        }
+	        startIndex = objv[i];
+	        Tcl_IncrRefCount(startIndex);
+	        break;
+	    }
+	    case REGEXP_LAST:
+	        i++;
+	        goto endOfForLoop;
 	    }
-	    startIndex = objv[i];
-	    Tcl_IncrRefCount(startIndex);
-	    break;
-	}
-	case REGEXP_LAST:
-	    i++;
-	    goto endOfForLoop;
-	}
     }
 
   endOfForLoop:
     if ((objc - i) < (2 - about)) {
-	Tcl_WrongNumArgs(interp, 1, objv,
-	    "?-switch ...? exp string ?matchVar? ?subMatchVar ...?");
-	goto optionError;
+	    Tcl_WrongNumArgs(interp, 1, objv,
+	        "?-switch ...? exp string ?matchVar? ?subMatchVar ...?");
+	    goto optionError;
     }
     objc -= i;
     objv += i;
@@ -204,9 +204,9 @@ Tcl_RegexpObjCmd(
      */
 
     if (doinline && ((objc - 2) != 0)) {
-	Tcl_AppendResult(interp, "regexp match variables not allowed"
-		" when using -inline", NULL);
-	goto optionError;
+	    Tcl_AppendResult(interp, "regexp match variables not allowed"
+		    " when using -inline", NULL);
+	    goto optionError;
     }
 
     /*
@@ -214,15 +214,15 @@ Tcl_RegexpObjCmd(
      */
 
     if (about) {
-	regExpr = Tcl_GetRegExpFromObj(interp, objv[0], cflags);
-	if ((regExpr == NULL) || (TclRegAbout(interp, regExpr) < 0)) {
-	optionError:
-	    if (startIndex) {
-		Tcl_DecrRefCount(startIndex);
+	    regExpr = Tcl_GetRegExpFromObj(interp, objv[0], cflags);
+	    if ((regExpr == NULL) || (TclRegAbout(interp, regExpr) < 0)) {
+	        optionError:
+	            if (startIndex) {
+		            Tcl_DecrRefCount(startIndex);
+	            }
+	            return TCL_ERROR;
 	    }
-	    return TCL_ERROR;
-	}
-	return TCL_OK;
+	    return TCL_OK;
     }
 
     /*
@@ -230,49 +230,48 @@ Tcl_RegexpObjCmd(
      * the termination test for -all matches. Do this before getting the
      * regexp to avoid shimmering problems.
      */
-
     objPtr = objv[1];
     stringLength = Tcl_GetCharLength(objPtr);
 
     if (startIndex) {
-	TclGetIntForIndexM(NULL, startIndex, stringLength, &offset);
-	Tcl_DecrRefCount(startIndex);
-	if (offset < 0) {
-	    offset = 0;
-	}
+	    TclGetIntForIndexM(NULL, startIndex, stringLength, &offset);
+	    Tcl_DecrRefCount(startIndex);
+	    if (offset < 0) {
+	        offset = 0;
+	    }
     }
 
     regExpr = Tcl_GetRegExpFromObj(interp, objv[0], cflags);
     if (regExpr == NULL) {
-	return TCL_ERROR;
+	    return TCL_ERROR;
     }
 
     if (offset > 0) {
-	/*
-	 * Add flag if using offset (string is part of a larger string), so
-	 * that "^" won't match.
-	 */
+	    /*
+	    * Add flag if using offset (string is part of a larger string), so
+	    * that "^" won't match.
+	    */
 
-	eflags |= TCL_REG_NOTBOL;
+	    eflags |= TCL_REG_NOTBOL;
     }
 
     objc -= 2;
     objv += 2;
 
     if (doinline) {
-	/*
-	 * Save all the subexpressions, as we will return them as a list
-	 */
+	    /*
+	    * Save all the subexpressions, as we will return them as a list
+	    */
 
-	numMatchesSaved = -1;
+	    numMatchesSaved = -1;
     } else {
-	/*
-	 * Save only enough subexpressions for matches we want to keep, expect
-	 * in the case of -all, where we need to keep at least one to know
-	 * where to move the offset.
-	 */
+	    /*
+	    * Save only enough subexpressions for matches we want to keep, expect
+	    * in the case of -all, where we need to keep at least one to know
+	    * where to move the offset.
+	    */
 
-	numMatchesSaved = (objc == 0) ? all : objc;
+	    numMatchesSaved = (objc == 0) ? all : objc;
     }
 
     /*
@@ -283,137 +282,139 @@ Tcl_RegexpObjCmd(
      */
 
     while (1) {
-	match = Tcl_RegExpExecObj(interp, regExpr, objPtr,
-		offset /* offset */, numMatchesSaved, eflags
-		| ((offset > 0 &&
-		(Tcl_GetUniChar(objPtr,offset-1) != (Tcl_UniChar)'\n'))
-		? TCL_REG_NOTBOL : 0));
-
-	if (match < 0) {
-	    return TCL_ERROR;
-	}
-
-	if (match == 0) {
-	    /*
-	     * We want to set the value of the intepreter result only when
-	     * this is the first time through the loop.
-	     */
+	    match = Tcl_RegExpExecObj(interp, regExpr, objPtr,
+		    offset /* offset */, numMatchesSaved, eflags
+		    | ((offset > 0 &&
+		    (Tcl_GetUniChar(objPtr,offset-1) != (Tcl_UniChar)'\n'))
+		    ? TCL_REG_NOTBOL : 0));
+
+	    if (match < 0) {
+	        return TCL_ERROR;
+	    }
 
-	    if (all <= 1) {
-		/*
-		 * If inlining, the interpreter's object result remains an
-		 * empty list, otherwise set it to an integer object w/ value
-		 * 0.
-		 */
+	    if (match == 0) {
+	        /*
+	        * We want to set the value of the intepreter result only when
+	        * this is the first time through the loop.
+	        */
 
-		if (!doinline) {
-		    Tcl_SetObjResult(interp, Tcl_NewIntObj(0));
-		}
-		return TCL_OK;
+	        if (all <= 1) {
+		    /*
+		    * If inlining, the interpreter's object result remains an
+		    * empty list, otherwise set it to an integer object w/ value
+		    * 0.
+		    */
+
+		        if (!doinline) {
+		            Tcl_SetObjResult(interp, Tcl_NewIntObj(0));
+		        }
+		        return TCL_OK;
+	        }
+	        break;
 	    }
-	    break;
-	}
+    
 
-	/*
-	 * If additional variable names have been specified, return index
-	 * information in those variables.
-	 */
-
-	Tcl_RegExpGetInfo(regExpr, &info);
-	if (doinline) {
 	    /*
-	     * It's the number of substitutions, plus one for the matchVar at
-	     * index 0
-	     */
+	    * If additional variable names have been specified, return index
+	    * information in those variables.
+	    */
 
-	    objc = info.nsubs + 1;
-	    if (all <= 1) {
-		resultPtr = Tcl_NewObj();
+	    Tcl_RegExpGetInfo(regExpr, &info);
+	    if (doinline) {
+	        /*
+	        * It's the number of substitutions, plus one for the matchVar at
+	        * index 0
+	        */
+
+	        objc = info.nsubs + 1;
+	        if (all <= 1) {
+		        resultPtr = Tcl_NewObj();
+	        }
+	    }
+	    for (i = 0; i < objc; i++) {
+	        Tcl_Obj *newPtr;
+
+	        if (indices) {
+		        int start, end;
+		        Tcl_Obj *objs[2];
+
+		        /*
+		        * Only adjust the match area if there was a match for that
+		        * area. (Scriptics Bug 4391/SF Bug #219232)
+		        */
+
+		        if (i <= info.nsubs && info.matches[i].start >= 0) {
+		            start = offset + info.matches[i].start;
+		            end = offset + info.matches[i].end;
+
+		            /*
+		            * Adjust index so it refers to the last character in the
+		            * match instead of the first character after the match.
+		            */
+
+		            if (end >= offset) {
+		    	        end--;
+		            }
+		        } else {
+		            start = -1;
+		            end = -1;
+		        }
+
+		        objs[0] = Tcl_NewLongObj(start);
+		        objs[1] = Tcl_NewLongObj(end);
+
+		        newPtr = Tcl_NewListObj(2, objs);
+	        } else {
+		        if (i <= info.nsubs) {
+		            newPtr = Tcl_GetRange(objPtr,
+			            offset + info.matches[i].start,
+			            offset + info.matches[i].end - 1);
+		        } else {
+		            newPtr = Tcl_NewObj();
+		        }
+	        }
+	        if (doinline) {
+		        if (Tcl_ListObjAppendElement(interp, resultPtr, newPtr)
+			        != TCL_OK) {
+		            Tcl_DecrRefCount(newPtr);
+		            Tcl_DecrRefCount(resultPtr);
+		            return TCL_ERROR;
+		        }
+	        } else {
+		        Tcl_Obj *valuePtr;
+		        valuePtr = Tcl_ObjSetVar2(interp, objv[i], NULL, newPtr, 0);
+		        if (valuePtr == NULL) {
+		            Tcl_AppendResult(interp, "couldn't set variable \"",
+			            TclGetString(objv[i]), "\"", NULL);
+		            return TCL_ERROR;
+		        }
+	        }
 	    }
-	}
-	for (i = 0; i < objc; i++) {
-	    Tcl_Obj *newPtr;
-
-	    if (indices) {
-		int start, end;
-		Tcl_Obj *objs[2];
-
-		/*
-		 * Only adjust the match area if there was a match for that
-		 * area. (Scriptics Bug 4391/SF Bug #219232)
-		 */
-
-		if (i <= info.nsubs && info.matches[i].start >= 0) {
-		    start = offset + info.matches[i].start;
-		    end = offset + info.matches[i].end;
-
-		    /*
-		     * Adjust index so it refers to the last character in the
-		     * match instead of the first character after the match.
-		     */
 
-		    if (end >= offset) {
-			end--;
-		    }
-		} else {
-		    start = -1;
-		    end = -1;
-		}
+	    if (all == 0) {
+	        break;
+	    }
 
-		objs[0] = Tcl_NewLongObj(start);
-		objs[1] = Tcl_NewLongObj(end);
 
-		newPtr = Tcl_NewListObj(2, objs);
-	    } else {
-		if (i <= info.nsubs) {
-		    newPtr = Tcl_GetRange(objPtr,
-			    offset + info.matches[i].start,
-			    offset + info.matches[i].end - 1);
-		} else {
-		    newPtr = Tcl_NewObj();
-		}
+	    /*
+	    * Adjust the offset to the character just after the last one in the
+	    * matchVar and increment all to count how many times we are making a
+	    * match. We always increment the offset by at least one to prevent
+	    * endless looping (as in the case: regexp -all {a*} a). Otherwise,
+	    * when we match the NULL string at the end of the input string, we
+	    * will loop indefinately (because the length of the match is 0, so
+	    * offset never changes).
+	    */
+
+	    if (info.matches[0].end == 0) {
+	        offset++;
 	    }
-	    if (doinline) {
-		if (Tcl_ListObjAppendElement(interp, resultPtr, newPtr)
-			!= TCL_OK) {
-		    Tcl_DecrRefCount(newPtr);
-		    Tcl_DecrRefCount(resultPtr);
-		    return TCL_ERROR;
-		}
-	    } else {
-		Tcl_Obj *valuePtr;
-		valuePtr = Tcl_ObjSetVar2(interp, objv[i], NULL, newPtr, 0);
-		if (valuePtr == NULL) {
-		    Tcl_AppendResult(interp, "couldn't set variable \"",
-			    TclGetString(objv[i]), "\"", NULL);
-		    return TCL_ERROR;
-		}
+	    offset += info.matches[0].end;
+	    all++;
+	    eflags |= TCL_REG_NOTBOL;
+	    if (offset >= stringLength) {
+	        break;
 	    }
-	}
-
-	if (all == 0) {
-	    break;
-	}
-
-	/*
-	 * Adjust the offset to the character just after the last one in the
-	 * matchVar and increment all to count how many times we are making a
-	 * match. We always increment the offset by at least one to prevent
-	 * endless looping (as in the case: regexp -all {a*} a). Otherwise,
-	 * when we match the NULL string at the end of the input string, we
-	 * will loop indefinately (because the length of the match is 0, so
-	 * offset never changes).
-	 */
-
-	if (info.matches[0].end == 0) {
-	    offset++;
-	}
-	offset += info.matches[0].end;
-	all++;
-	eflags |= TCL_REG_NOTBOL;
-	if (offset >= stringLength) {
-	    break;
-	}
     }
 
     /*
@@ -423,9 +424,9 @@ Tcl_RegexpObjCmd(
      */
 
     if (doinline) {
-	Tcl_SetObjResult(interp, resultPtr);
+	    Tcl_SetObjResult(interp, resultPtr);
     } else {
-	Tcl_SetObjResult(interp, Tcl_NewIntObj(all ? all-1 : 1));
+	    Tcl_SetObjResult(interp, Tcl_NewIntObj(all ? all-1 : 1));
     }
     return TCL_OK;
 }
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c
index 734ef40..facb9c6 100644
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -185,9 +185,9 @@ Tcl_RegExpExec(
      */
 
     if (text > start) {
-	flags = REG_NOTBOL;
+	    flags = REG_NOTBOL;
     } else {
-	flags = 0;
+	    flags = 0;
     }
 
     /*
@@ -299,7 +299,7 @@ RegExpExecUniChar(
     size_t nm = last;
 
     if (nmatches >= 0 && (size_t) nmatches < nm) {
-	nm = (size_t) nmatches;
+	    nm = (size_t) nmatches;
     }
 
     status = TclReExec(&regexpPtr->re, wString, (size_t) numChars,
@@ -310,14 +310,14 @@ RegExpExecUniChar(
      */
 
     if (status != REG_OKAY) {
-	if (status == REG_NOMATCH) {
-	    return 0;
-	}
-	if (interp != NULL) {
-	    TclRegError(interp, "error while matching regular expression: ",
-		    status);
-	}
-	return -1;
+	    if (status == REG_NOMATCH) {
+	        return 0;
+	    }
+	    if (interp != NULL) {
+	        TclRegError(interp, "error while matching regular expression: ",
+		        status);
+	    }
+	    return -1;
     }
     return 1;
 }
@@ -358,14 +358,14 @@ TclRegExpRangeUniChar(
     TclRegexp *regexpPtr = (TclRegexp *) re;
 
     if ((regexpPtr->flags&REG_EXPECT) && index == -1) {
-	*startPtr = regexpPtr->details.rm_extend.rm_so;
-	*endPtr = regexpPtr->details.rm_extend.rm_eo;
+	    *startPtr = regexpPtr->details.rm_extend.rm_so;
+	    *endPtr = regexpPtr->details.rm_extend.rm_eo;
     } else if ((size_t) index > regexpPtr->re.re_nsub) {
-	*startPtr = -1;
-	*endPtr = -1;
+	    *startPtr = -1;
+	    *endPtr = -1;
     } else {
-	*startPtr = regexpPtr->matches[index].rm_so;
-	*endPtr = regexpPtr->matches[index].rm_eo;
+	    *startPtr = regexpPtr->matches[index].rm_so;
+	    *endPtr = regexpPtr->matches[index].rm_eo;
     }
 }
 
@@ -397,7 +397,7 @@ Tcl_RegExpMatch(
 
     re = Tcl_RegExpCompile(interp, pattern);
     if (re == NULL) {
-	return -1;
+	    return -1;
     }
     return Tcl_RegExpExec(interp, re, text, text);
 }
@@ -469,7 +469,7 @@ Tcl_RegExpExecObj(
     udata = Tcl_GetUnicodeFromObj(textObj, &length);
 
     if (offset > length) {
-	offset = length;
+	    offset = length;
     }
     udata += offset;
     length -= offset;
@@ -507,8 +507,9 @@ Tcl_RegExpMatchObj(
     re = Tcl_GetRegExpFromObj(interp, patternObj,
 	    TCL_REG_ADVANCED | TCL_REG_NOSUB);
     if (re == NULL) {
-	return -1;
+	    return -1;
     }
+
     return Tcl_RegExpExecObj(interp, re, textObj, 0 /* offset */,
 	    0 /* nmatches */, 0 /* flags */);
 }
@@ -583,28 +584,28 @@ Tcl_GetRegExpFromObj(
     regexpPtr = (TclRegexp *) objPtr->internalRep.otherValuePtr;
 
     if ((objPtr->typePtr != &tclRegexpType) || (regexpPtr->flags != flags)) {
-	pattern = TclGetStringFromObj(objPtr, &length);
+	    pattern = TclGetStringFromObj(objPtr, &length);
 
-	regexpPtr = CompileRegexp(interp, pattern, length, flags);
-	if (regexpPtr == NULL) {
-	    return NULL;
-	}
+	    regexpPtr = CompileRegexp(interp, pattern, length, flags);
+	    if (regexpPtr == NULL) {
+	        return NULL;
+	    }
 
-	/*
-	 * Add a reference to the regexp so it will persist even if it is
-	 * pushed out of the current thread's regexp cache. This reference
-	 * will be removed when the object's internal rep is freed.
-	 */
+	    /*
+	    * Add a reference to the regexp so it will persist even if it is
+	    * pushed out of the current thread's regexp cache. This reference
+	    * will be removed when the object's internal rep is freed.
+	    */
 
-	regexpPtr->refCount++;
+	    regexpPtr->refCount++;
 
-	/*
-	 * Free the old representation and set our type.
-	 */
+	    /*
+	    * Free the old representation and set our type.
+	    */
 
-	TclFreeIntRep(objPtr);
-	objPtr->internalRep.otherValuePtr = (void *) regexpPtr;
-	objPtr->typePtr = &tclRegexpType;
+	    TclFreeIntRep(objPtr);
+	    objPtr->internalRep.otherValuePtr = (void *) regexpPtr;
+	    objPtr->typePtr = &tclRegexpType;
     }
     return (Tcl_RegExp) regexpPtr;
 }
@@ -758,7 +759,7 @@ FreeRegexpInternalRep(
      */
 
     if (--(regexpRepPtr->refCount) <= 0) {
-	FreeRegexp(regexpRepPtr);
+	    FreeRegexp(regexpRepPtr);
     }
 }
 
@@ -884,19 +885,19 @@ CompileRegexp(
 	     */
 
 	    if (i != 0) {
-		int j;
-		char *cachedString;
-
-		cachedString = tsdPtr->patterns[i];
-		regexpPtr = tsdPtr->regexps[i];
-		for (j = i-1; j >= 0; j--) {
-		    tsdPtr->patterns[j+1] = tsdPtr->patterns[j];
-		    tsdPtr->patLengths[j+1] = tsdPtr->patLengths[j];
-		    tsdPtr->regexps[j+1] = tsdPtr->regexps[j];
-		}
-		tsdPtr->patterns[0] = cachedString;
-		tsdPtr->patLengths[0] = length;
-		tsdPtr->regexps[0] = regexpPtr;
+		    int j;
+		    char *cachedString;
+
+		    cachedString = tsdPtr->patterns[i];
+		    regexpPtr = tsdPtr->regexps[i];
+		    for (j = i-1; j >= 0; j--) {
+		        tsdPtr->patterns[j+1] = tsdPtr->patterns[j];
+		        tsdPtr->patLengths[j+1] = tsdPtr->patLengths[j];
+		        tsdPtr->regexps[j+1] = tsdPtr->regexps[j];
+		    }
+		    tsdPtr->patterns[0] = cachedString;
+		    tsdPtr->patLengths[0] = length;
+		    tsdPtr->regexps[0] = regexpPtr;
 	    }
 	    return tsdPtr->regexps[0];
 	}
