diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-02-14 14:24:22 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-02-14 14:24:22 +0000 |
commit | bf173a2604bd859e8f923f89df06fce145944f3c (patch) | |
tree | bc6fab0af70644c69f78c1cd5abc96b1cf7cd225 /usr.bin/mg/paragraph.c | |
parent | e672b0adc93b18c8f8186dbe2abee2a2d006664b (diff) |
some KNF
Diffstat (limited to 'usr.bin/mg/paragraph.c')
-rw-r--r-- | usr.bin/mg/paragraph.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/usr.bin/mg/paragraph.c b/usr.bin/mg/paragraph.c index a3d0912e42a..0e592f876f9 100644 --- a/usr.bin/mg/paragraph.c +++ b/usr.bin/mg/paragraph.c @@ -1,4 +1,4 @@ -/* $OpenBSD: paragraph.c,v 1.6 2001/05/24 03:05:25 mickey Exp $ */ +/* $OpenBSD: paragraph.c,v 1.7 2002/02/14 14:24:21 deraadt Exp $ */ /* * Code for dealing with paragraphs and filling. Adapted from MicroEMACS 3.6 @@ -37,14 +37,14 @@ gotobop(f, n) * <NL><NL> */ while (lback(curwp->w_dotp) != curbp->b_linep) - if (llength(lback(curwp->w_dotp)) - && lgetc(curwp->w_dotp, 0) != ' ' - && lgetc(curwp->w_dotp, 0) != '.' - && lgetc(curwp->w_dotp, 0) != '\t') + if (llength(lback(curwp->w_dotp)) && + lgetc(curwp->w_dotp, 0) != ' ' && + lgetc(curwp->w_dotp, 0) != '.' && + lgetc(curwp->w_dotp, 0) != '\t') curwp->w_dotp = lback(curwp->w_dotp); else { - if (llength(lback(curwp->w_dotp)) - && lgetc(curwp->w_dotp, 0) == '.') { + if (llength(lback(curwp->w_dotp)) && + lgetc(curwp->w_dotp, 0) == '.') { curwp->w_dotp = lforw(curwp->w_dotp); if (curwp->w_dotp == curbp->b_linep) { /* @@ -90,10 +90,10 @@ gotoeop(f, n) /* and scan forword until we hit a <NL><SP> or ... */ while (curwp->w_dotp != curbp->b_linep) { - if (llength(curwp->w_dotp) - && lgetc(curwp->w_dotp, 0) != ' ' - && lgetc(curwp->w_dotp, 0) != '.' - && lgetc(curwp->w_dotp, 0) != '\t') + if (llength(curwp->w_dotp) && + lgetc(curwp->w_dotp, 0) != ' ' && + lgetc(curwp->w_dotp, 0) != '.' && + lgetc(curwp->w_dotp, 0) != '\t') curwp->w_dotp = lforw(curwp->w_dotp); else break; @@ -304,14 +304,14 @@ fillword(f, n) if ((c = lgetc(curwp->w_dotp, curwp->w_doto)) != ' ' && c != '\t') do { (void)backchar(FFRAND, 1); - } while ((c = lgetc(curwp->w_dotp, curwp->w_doto)) != ' ' - && c != '\t' && curwp->w_doto > 0); + } while ((c = lgetc(curwp->w_dotp, curwp->w_doto)) != ' ' && + c != '\t' && curwp->w_doto > 0); if (curwp->w_doto == 0) do { (void)forwchar(FFRAND, 1); - } while ((c = lgetc(curwp->w_dotp, curwp->w_doto)) != ' ' - && c != '\t' && curwp->w_doto < llength(curwp->w_dotp)); + } while ((c = lgetc(curwp->w_dotp, curwp->w_doto)) != ' ' && + c != '\t' && curwp->w_doto < llength(curwp->w_dotp)); (void)delwhite(FFRAND, 1); (void)lnewline(); |