=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mg/paragraph.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- src/usr.bin/mg/paragraph.c 2001/01/29 01:58:09 1.4 +++ src/usr.bin/mg/paragraph.c 2001/05/23 22:20:36 1.5 @@ -1,4 +1,4 @@ -/* $OpenBSD: paragraph.c,v 1.4 2001/01/29 01:58:09 niklas Exp $ */ +/* $OpenBSD: paragraph.c,v 1.5 2001/05/23 22:20:36 art Exp $ */ /* * Code for dealing with paragraphs and filling. Adapted from MicroEMACS 3.6 @@ -131,16 +131,16 @@ char wbuf[MAXWORD]; /* buffer for current word */ /* record the pointer to the line just past the EOP */ - (VOID)gotoeop(FFRAND, 1); + (void)gotoeop(FFRAND, 1); if (curwp->w_doto != 0) { /* paragraph ends at end of buffer */ - (VOID)lnewline(); + (void)lnewline(); eopline = lforw(curwp->w_dotp); } else eopline = curwp->w_dotp; /* and back top the begining of the paragraph */ - (VOID)gotobop(FFRAND, 1); + (void)gotobop(FFRAND, 1); /* initialize various info */ while (inword() == NULL && forwchar(FFRAND, 1)); @@ -198,7 +198,7 @@ if (newlength <= fillcol) { /* add word to current line */ if (!firstflag) { - (VOID)linsert(1, ' '); + (void)linsert(1, ' '); ++clength; } firstflag = FALSE; @@ -206,30 +206,30 @@ if (curwp->w_doto > 0 && lgetc(curwp->w_dotp, curwp->w_doto - 1) == ' ') { curwp->w_doto -= 1; - (VOID)ldelete((RSIZE) 1, KNONE); + (void)ldelete((RSIZE) 1, KNONE); } /* start a new line */ - (VOID)lnewline(); + (void)lnewline(); clength = 0; } /* and add the word in in either case */ for (i = 0; i < wordlen; i++) { - (VOID)linsert(1, wbuf[i]); + (void)linsert(1, wbuf[i]); ++clength; } wordlen = 0; } } /* and add a last newline for the end of our new paragraph */ - (VOID)lnewline(); + (void)lnewline(); /* * we realy should wind up where we started, (which is hard to keep * track of) but I think the end of the last line is better than the * begining of the blank line. */ - (VOID)backchar(FFRAND, 1); + (void)backchar(FFRAND, 1); return TRUE; } @@ -247,14 +247,14 @@ while (n--) { /* mark out the end and begining of the para to delete */ - (VOID)gotoeop(FFRAND, 1); + (void)gotoeop(FFRAND, 1); /* set the mark here */ curwp->w_markp = curwp->w_dotp; curwp->w_marko = curwp->w_doto; /* go to the begining of the paragraph */ - (VOID)gotobop(FFRAND, 1); + (void)gotobop(FFRAND, 1); /* force us to the beginning of line */ curwp->w_doto = 0; @@ -264,7 +264,7 @@ return status; /* and clean up the 2 extra lines */ - (VOID)ldelete((RSIZE) 1, KFORW); + (void)ldelete((RSIZE) 1, KFORW); } return TRUE; } @@ -295,7 +295,7 @@ ++col; } if (curwp->w_doto != llength(curwp->w_dotp)) { - (VOID)selfinsert(f, n); + (void)selfinsert(f, n); nce = llength(curwp->w_dotp) - curwp->w_doto; } else nce = 0; @@ -303,18 +303,18 @@ if ((c = lgetc(curwp->w_dotp, curwp->w_doto)) != ' ' && c != '\t') do { - (VOID)backchar(FFRAND, 1); + (void)backchar(FFRAND, 1); } 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); + (void)forwchar(FFRAND, 1); } while ((c = lgetc(curwp->w_dotp, curwp->w_doto)) != ' ' && c != '\t' && curwp->w_doto < llength(curwp->w_dotp)); - (VOID)delwhite(FFRAND, 1); - (VOID)lnewline(); + (void)delwhite(FFRAND, 1); + (void)lnewline(); i = llength(curwp->w_dotp) - nce; curwp->w_doto = i > 0 ? i : 0; curwp->w_flag |= WFMOVE;