diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-23 22:20:37 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-23 22:20:37 +0000 |
commit | e26c13adf68b1b5d232a24497363f79effdea7e4 (patch) | |
tree | 2c22022762ad93a7ad1a83baa723395e85baef55 | |
parent | dedc2917e1594f44221d8474a7317eca1669caf8 (diff) |
remove VOID. We're way beyond the point where this could build with an
ancient compiler.
-rw-r--r-- | usr.bin/mg/basic.c | 20 | ||||
-rw-r--r-- | usr.bin/mg/buffer.c | 8 | ||||
-rw-r--r-- | usr.bin/mg/cinfo.c | 4 | ||||
-rw-r--r-- | usr.bin/mg/def.h | 85 | ||||
-rw-r--r-- | usr.bin/mg/dir.c | 6 | ||||
-rw-r--r-- | usr.bin/mg/display.c | 52 | ||||
-rw-r--r-- | usr.bin/mg/echo.c | 32 | ||||
-rw-r--r-- | usr.bin/mg/extend.c | 18 | ||||
-rw-r--r-- | usr.bin/mg/file.c | 20 | ||||
-rw-r--r-- | usr.bin/mg/fileio.c | 24 | ||||
-rw-r--r-- | usr.bin/mg/help.c | 4 | ||||
-rw-r--r-- | usr.bin/mg/kbd.c | 4 | ||||
-rw-r--r-- | usr.bin/mg/line.c | 20 | ||||
-rw-r--r-- | usr.bin/mg/main.c | 12 | ||||
-rw-r--r-- | usr.bin/mg/match.c | 6 | ||||
-rw-r--r-- | usr.bin/mg/paragraph.c | 36 | ||||
-rw-r--r-- | usr.bin/mg/random.c | 8 | ||||
-rw-r--r-- | usr.bin/mg/re_search.c | 6 | ||||
-rw-r--r-- | usr.bin/mg/region.c | 12 | ||||
-rw-r--r-- | usr.bin/mg/search.c | 48 | ||||
-rw-r--r-- | usr.bin/mg/tty.c | 28 | ||||
-rw-r--r-- | usr.bin/mg/ttyio.c | 4 |
22 files changed, 219 insertions, 238 deletions
diff --git a/usr.bin/mg/basic.c b/usr.bin/mg/basic.c index 285a9cbc0b2..9712838e5aa 100644 --- a/usr.bin/mg/basic.c +++ b/usr.bin/mg/basic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: basic.c,v 1.5 2001/02/12 21:51:55 millert Exp $ */ +/* $OpenBSD: basic.c,v 1.6 2001/05/23 22:20:34 art Exp $ */ /* * Basic cursor motion commands. @@ -11,7 +11,7 @@ */ #include "def.h" -VOID setgoal __P((void)); +void setgoal __P((void)); /* * Go to beginning of line. @@ -109,7 +109,7 @@ gotobob(f, n) int f, n; { - (VOID) setmark(f, n); + (void) setmark(f, n); curwp->w_dotp = lforw(curbp->b_linep); curwp->w_doto = 0; curwp->w_flag |= WFHARD; @@ -126,7 +126,7 @@ gotoeob(f, n) int f, n; { - (VOID) setmark(f, n); + (void) setmark(f, n); curwp->w_dotp = lback(curbp->b_linep); curwp->w_doto = llength(curwp->w_dotp); curwp->w_flag |= WFHARD; @@ -213,7 +213,7 @@ backline(f, n) * "curgoal", to the current cursor column. The column is never off * the edge of the screen; it's more like display then show position. */ -VOID +void setgoal() { @@ -342,7 +342,7 @@ backpage(f, n) * are used to scroll the display up (or down) one line at a time. */ #ifdef GOSMACS -VOID +void forw1page(f, n) int f, n; { @@ -354,7 +354,7 @@ forw1page(f, n) forwpage(f | FFRAND, n); } -VOID +void back1page(f, n) int f, n; { @@ -382,8 +382,8 @@ pagenext(f, n) return FALSE; } wp = curwp; - (VOID) nextwind(f, n); - (VOID) forwpage(f, n); + (void) nextwind(f, n); + (void) forwpage(f, n); curwp = wp; curbp = wp->w_bufp; return TRUE; @@ -392,7 +392,7 @@ pagenext(f, n) /* * Internal set mark routine, used by other functions (daveb). */ -VOID +void isetmark() { diff --git a/usr.bin/mg/buffer.c b/usr.bin/mg/buffer.c index c80da333497..533b17e00c9 100644 --- a/usr.bin/mg/buffer.c +++ b/usr.bin/mg/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.11 2001/05/23 15:50:27 art Exp $ */ +/* $OpenBSD: buffer.c,v 1.12 2001/05/23 22:20:34 art Exp $ */ /* * Buffer handling. @@ -299,8 +299,8 @@ anycb(f) for (bp = bheadp; bp != NULL; bp = bp->b_bufp) { if (*(bp->b_fname) != '\0' && (bp->b_flag & BFCHG) != 0) { - (VOID) strcpy(prompt, "Save file "); - (VOID) strcpy(prompt + 10, bp->b_fname); + (void) strcpy(prompt, "Save file "); + (void) strcpy(prompt + 10, bp->b_fname); if ((f == TRUE || (save = eyorn(prompt)) == TRUE) && buffsave(bp) == TRUE) { bp->b_flag &= ~BFCHG; @@ -371,7 +371,7 @@ bfind(bname, cflag) } while (i++ < defb_nmodes); bp->b_fname[0] = '\0'; bzero(&bp->b_fi, sizeof(bp->b_fi)); - (VOID) strcpy(bp->b_bname, bname); + (void) strcpy(bp->b_bname, bname); lp->l_fp = lp; lp->l_bp = lp; bp->b_bufp = bheadp; diff --git a/usr.bin/mg/cinfo.c b/usr.bin/mg/cinfo.c index d3a751ef1d6..429c57f3f68 100644 --- a/usr.bin/mg/cinfo.c +++ b/usr.bin/mg/cinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cinfo.c,v 1.4 2001/05/23 21:55:32 art Exp $ */ +/* $OpenBSD: cinfo.c,v 1.5 2001/05/23 22:20:35 art Exp $ */ /* * Character class tables. @@ -145,6 +145,6 @@ keyname(cp, k) *cp = '\0'; return cp; } - (VOID) strcpy(cp, np); + strcpy(cp, np); return cp + strlen(cp); } diff --git a/usr.bin/mg/def.h b/usr.bin/mg/def.h index 843ad94c291..3d775ba758f 100644 --- a/usr.bin/mg/def.h +++ b/usr.bin/mg/def.h @@ -1,4 +1,4 @@ -/* $OpenBSD: def.h,v 1.15 2001/05/23 21:59:45 art Exp $ */ +/* $OpenBSD: def.h,v 1.16 2001/05/23 22:20:35 art Exp $ */ /* * This file is the general header file for all parts @@ -13,25 +13,6 @@ #include "ttydef.h" #include "chrdef.h" -/* - * If your system and/or compiler does not support the "void" type - * then define NO_VOID_TYPE in sysdef.h. In the absence of some - * other definition for VOID, the default in that case will be to - * turn it into an int, which works with most compilers that don't - * support void. In the absence of any definition of VOID or - * NO_VOID_TYPE, the default is to assume void is supported, which - * should be the case for most modern C compilers. - */ - -#ifdef NO_VOID_TYPE -#undef VOID -#define VOID int /* Default for no void is int */ -#else -#ifndef VOID -#define VOID void /* Just use normal void */ -#endif /* VOID */ -#endif /* NO_VOID_TYPE */ - #ifdef NO_MACRO #ifndef NO_STARTUP #define NO_STARTUP /* NO_MACRO implies NO_STARTUP */ @@ -278,34 +259,34 @@ typedef struct { */ /* tty.c X */ -VOID ttinit __P((void)); -VOID ttreinit __P((void)); -VOID tttidy __P((void)); -VOID ttmove __P((int, int)); -VOID tteeol __P((void)); -VOID tteeop __P((void)); -VOID ttbeep __P((void)); -VOID ttinsl __P((int, int, int)); -VOID ttdell __P((int, int, int)); -VOID ttwindow __P((int, int)); -VOID ttnowindow __P((void)); -VOID ttcolor __P((int)); -VOID ttresize __P((void)); +void ttinit __P((void)); +void ttreinit __P((void)); +void tttidy __P((void)); +void ttmove __P((int, int)); +void tteeol __P((void)); +void tteeop __P((void)); +void ttbeep __P((void)); +void ttinsl __P((int, int, int)); +void ttdell __P((int, int, int)); +void ttwindow __P((int, int)); +void ttnowindow __P((void)); +void ttcolor __P((int)); +void ttresize __P((void)); /* ttyio.c */ -VOID ttopen __P((void)); +void ttopen __P((void)); int ttraw __P((void)); -VOID ttclose __P((void)); +void ttclose __P((void)); int ttcooked __P((void)); int ttputc __P((int)); -VOID ttflush __P((void)); +void ttflush __P((void)); int ttgetc __P((void)); int ttwait __P((int)); -VOID setttysize __P((void)); +void setttysize __P((void)); int typeahead __P((void)); /* dir.c */ -VOID dirinit __P((VOID)); +void dirinit __P((void)); int changedir __P((int, int)); int showcwdir __P((int, int)); @@ -333,19 +314,19 @@ int filesave __P((int, int)); int buffsave __P((BUFFER *)); int makebkfile __P((int, int)); int writeout __P((BUFFER *, char *)); -VOID upmodes __P((BUFFER *)); +void upmodes __P((BUFFER *)); /* line.c X */ LINE *lalloc __P((int)); LINE *lallocx __P((int)); -VOID lfree __P((LINE *)); -VOID lchange __P((int)); +void lfree __P((LINE *)); +void lchange __P((int)); int linsert __P((int, int)); int lnewline __P((void)); int ldelete __P((RSIZE, int)); int ldelnewline __P((void)); int lreplace __P((RSIZE, char *, int)); -VOID kdelete __P((void)); +void kdelete __P((void)); int kinsert __P((int, int)); int kremove __P((int)); @@ -379,19 +360,19 @@ int notmodified __P((int, int)); int popbuftop __P((BUFFER *)); /* display.c */ -VOID vtinit __P((void)); -VOID vttidy __P((void)); -VOID update __P((void)); +void vtinit __P((void)); +void vttidy __P((void)); +void update __P((void)); /* echo.c X */ -VOID eerase __P((void)); +void eerase __P((void)); int eyorn __P((char *)); int eyesno __P((char *)); -VOID ewprintf __P((const char *fmt, ...)); +void ewprintf __P((const char *fmt, ...)); int ereply __P((const char *, char *, int, ...)); int eread __P((const char *, char *, int, int, ...)); int getxtra __P((LIST *, LIST *, int, int)); -VOID free_file_list __P((LIST *)); +void free_file_list __P((LIST *)); /* fileio.c */ int ffropen __P((char *, BUFFER *)); @@ -413,7 +394,7 @@ LIST *complete_function_list __P((char *, int)); /* kbd.c X */ int do_meta __P((int, int)); int bsmap __P((int, int)); -VOID ungetkey __P((int)); +void ungetkey __P((int)); int getkey __P((int)); int doin __P((void)); int rescan __P((int, int)); @@ -428,7 +409,7 @@ int ctrlg __P((int, int)); int quit __P((int, int)); /* ttyio.c */ -VOID panic __P((char *)); +void panic __P((char *)); /* cinfo.c */ char *keyname __P((char *, int)); @@ -442,14 +423,14 @@ int gotobob __P((int, int)); int gotoeob __P((int, int)); int forwline __P((int, int)); int backline __P((int, int)); -VOID setgoal __P((void)); +void setgoal __P((void)); int getgoal __P((LINE *)); int forwpage __P((int, int)); int backpage __P((int, int)); int forw1page __P((int, int)); int back1page __P((int, int)); int pagenext __P((int, int)); -VOID isetmark __P((VOID)); +void isetmark __P((void)); int setmark __P((int, int)); int swapmark __P((int, int)); int gotoline __P((int, int)); diff --git a/usr.bin/mg/dir.c b/usr.bin/mg/dir.c index 20bfc8a96f7..a0251f55be7 100644 --- a/usr.bin/mg/dir.c +++ b/usr.bin/mg/dir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dir.c,v 1.4 2001/01/29 01:58:06 niklas Exp $ */ +/* $OpenBSD: dir.c,v 1.5 2001/05/23 22:20:35 art Exp $ */ /* * Name: MG 2a @@ -16,7 +16,7 @@ static char cwd[NFILEN]; /* * Initialize anything the directory management routines need */ -VOID +void dirinit() { @@ -38,7 +38,7 @@ changedir(f, n) if ((s = ereply("Change default directory: ", bufc, NPAT)) != TRUE) return (s); if (bufc[0] == '\0') - (VOID) strcpy(bufc, wdir); + (void) strcpy(bufc, wdir); if (chdir(bufc) == -1) { ewprintf("Can't change dir to %s", bufc); return (FALSE); diff --git a/usr.bin/mg/display.c b/usr.bin/mg/display.c index 3272132314f..1154949ecb5 100644 --- a/usr.bin/mg/display.c +++ b/usr.bin/mg/display.c @@ -1,4 +1,4 @@ -/* $OpenBSD: display.c,v 1.4 2001/01/29 01:58:07 niklas Exp $ */ +/* $OpenBSD: display.c,v 1.5 2001/05/23 22:20:35 art Exp $ */ /* * The functions in this file handle redisplay. The @@ -66,18 +66,18 @@ typedef struct { } SCORE; -VOID vtmove __P((int, int)); -VOID vtputc __P((int)); -VOID vtpute __P((int)); +void vtmove __P((int, int)); +void vtputc __P((int)); +void vtpute __P((int)); int vtputs __P((char *)); -VOID vteeol __P((void)); -VOID updext __P((int, int)); -VOID modeline __P((MGWIN *)); -VOID setscores __P((int, int)); -VOID traceback __P((int, int, int, int)); -VOID ucopy __P((VIDEO *, VIDEO *)); -VOID uline __P((int, VIDEO *, VIDEO *)); -VOID hash __P((VIDEO *)); +void vteeol __P((void)); +void updext __P((int, int)); +void modeline __P((MGWIN *)); +void setscores __P((int, int)); +void traceback __P((int, int, int, int)); +void ucopy __P((VIDEO *, VIDEO *)); +void uline __P((int, VIDEO *, VIDEO *)); +void hash __P((VIDEO *)); int sgarbf = TRUE; /* TRUE if screen is garbage. */ @@ -118,7 +118,7 @@ SCORE score[NROW * NROW]; * is marked as garbage, so all the right stuff happens * on the first call to redisplay. */ -VOID +void vtinit() { VIDEO *vp; @@ -145,7 +145,7 @@ vtinit() * the cursor to the last line, erase the line, and * close the terminal channel. */ -VOID +void vttidy() { @@ -165,7 +165,7 @@ vttidy() * on the line, which would make "vtputc" a little bit * more efficient. No checking for errors. */ -VOID +void vtmove(row, col) int row, col; { @@ -186,7 +186,7 @@ vtmove(row, col) * makes the tab code loop if you are not careful. * Three guesses how we found this. */ -VOID +void vtputc(c) int c; { @@ -215,7 +215,7 @@ vtputc(c) * yet on left edge, don't print it yet. Check for overflow on the right * margin. */ -VOID +void vtpute(c) int c; { @@ -249,7 +249,7 @@ vtpute(c) * the software cursor is located. The display routines will decide if a * hardware erase to end of line command should be used to display this. */ -VOID +void vteeol() { VIDEO *vp; @@ -268,7 +268,7 @@ vteeol() * correct for the current window. Third, make the * virtual and physical screens the same. */ -VOID +void update() { LINE *lp; @@ -500,7 +500,7 @@ update() * virtual and physical screens the same when * display has done an update. */ -VOID +void ucopy(vvp, pvp) VIDEO *vvp; VIDEO *pvp; @@ -519,7 +519,7 @@ ucopy(vvp, pvp) * column greater than the terminal width. The line will be scrolled right or * left to let the user see where the cursor is */ -VOID +void updext(currow, curcol) int currow, curcol; { @@ -552,7 +552,7 @@ updext(currow, curcol) * line when updating CMODE color lines, because of the way that * reverse video works on most terminals. */ -VOID +void uline(row, vvp, pvp) int row; VIDEO *vvp; @@ -649,7 +649,7 @@ uline(row, vvp, pvp) * that if STANDOUT_GLITCH is defined, first and last magic_cookie_glitch * characters may never be seen. */ -VOID +void modeline(wp) MGWIN *wp; { @@ -721,7 +721,7 @@ vtputs(s) * Tuned for the VAX by Bob McNamara; better than it used to be on * just about any machine. */ -VOID +void hash(vp) VIDEO *vp; { @@ -771,7 +771,7 @@ hash(vp) * i = 1; do { } while (++i <=size)" will make the code quite a * bit better; but it looks ugly. */ -VOID +void setscores(offs, size) int offs; int size; @@ -861,7 +861,7 @@ setscores(offs, size) * which is acceptable because this routine is much less compute * intensive then the code that builds the score matrix! */ -VOID +void traceback(offs, size, i, j) int offs; int size; diff --git a/usr.bin/mg/echo.c b/usr.bin/mg/echo.c index b0391d8e790..ad32f445a46 100644 --- a/usr.bin/mg/echo.c +++ b/usr.bin/mg/echo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: echo.c,v 1.9 2001/05/23 22:01:44 art Exp $ */ +/* $OpenBSD: echo.c,v 1.10 2001/05/23 22:20:35 art Exp $ */ /* * Echo line reading and writing. @@ -22,11 +22,11 @@ static int veread __P((const char *, char *buf, int, int, va_list)); static int complt __P((int, int, char *, int)); static int complt_list __P((int, int, char *, int)); -static VOID eformat __P((const char *, va_list)); -static VOID eputi __P((int, int)); -static VOID eputl __P((long, int)); -static VOID eputs __P((char *)); -static VOID eputc __P((char)); +static void eformat __P((const char *, va_list)); +static void eputi __P((int, int)); +static void eputl __P((long, int)); +static void eputs __P((char *)); +static void eputc __P((char)); static LIST *copy_list __P((LIST *)); int epresf = FALSE; /* stuff in echo line flag */ @@ -34,7 +34,7 @@ int epresf = FALSE; /* stuff in echo line flag */ /* * Erase the echo line. */ -VOID +void eerase() { ttcolor(CTEXT); @@ -260,7 +260,7 @@ veread(fp, buf, nbuf, flag, ap) goto done; case CCHR('G'): /* bell, abort */ eputc(CCHR('G')); - (VOID)ctrlg(FFRAND, 0); + (void)ctrlg(FFRAND, 0); ttflush(); return ABORT; case CCHR('H'): /* rubout, erase */ @@ -618,7 +618,7 @@ getxtra(lp1, lp2, cpos, wflag) * routine. */ /* VARARGS */ -VOID +void #ifdef __STDC__ ewprintf(const char *fmt, ...) #else /* __STDC__ */ @@ -658,7 +658,7 @@ ewprintf(va_alist) * Note: %c works, and prints the "name" of the character. * %k prints the name of a key (and takes no arguments). */ -static VOID +static void eformat(fp, ap) const char *fp; va_list ap; @@ -674,7 +674,7 @@ eformat(fp, ap) c = *fp++; switch (c) { case 'c': - (VOID)keyname(kname, va_arg(ap, int)); + (void)keyname(kname, va_arg(ap, int)); eputs(kname); break; @@ -723,7 +723,7 @@ eformat(fp, ap) /* * Put integer, in radix "r". */ -static VOID +static void eputi(i, r) int i, r; { @@ -741,7 +741,7 @@ eputi(i, r) /* * Put long, in radix "r". */ -static VOID +static void eputl(l, r) long l; int r; @@ -760,7 +760,7 @@ eputl(l, r) /* * Put string. */ -static VOID +static void eputs(s) char *s; { @@ -774,7 +774,7 @@ eputs(s) * Put character. Watch for control characters, and for the line getting * too long. */ -static VOID +static void eputc(c) char c; { @@ -788,7 +788,7 @@ eputc(c) } } -VOID +void free_file_list(lp) LIST *lp; { diff --git a/usr.bin/mg/extend.c b/usr.bin/mg/extend.c index 4c8d67d7965..3c7bce7d8e3 100644 --- a/usr.bin/mg/extend.c +++ b/usr.bin/mg/extend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: extend.c,v 1.11 2001/05/23 22:12:10 art Exp $ */ +/* $OpenBSD: extend.c,v 1.12 2001/05/23 22:20:35 art Exp $ */ /* * Extended (M-X) commands, rebinding, and startup file processing. @@ -22,7 +22,7 @@ static int remap __P((KEYMAP *, int, PF, KEYMAP *)); static KEYMAP *realocmap __P((KEYMAP *)); -static VOID fixmap __P((KEYMAP *, KEYMAP *, KEYMAP *)); +static void fixmap __P((KEYMAP *, KEYMAP *, KEYMAP *)); static int dobind __P((KEYMAP *, char *, int)); static char *skipwhite __P((char *)); static char *parsetoken __P((char *)); @@ -293,7 +293,7 @@ realocmap(curmap) /* * Fix references to a reallocated keymap (recursive). */ -static VOID +static void fixmap(curmap, mp, mt) KEYMAP *mt; KEYMAP *curmap; @@ -346,12 +346,12 @@ dobind(curmap, p, unbind) return FALSE; } } - (VOID)doscan(curmap, c = maclcur->l_text[s], NULL); + (void)doscan(curmap, c = maclcur->l_text[s], NULL); maclcur = maclcur->l_fp; } else { #endif /* !NO_STARTUP */ #endif /* !NO_MACRO */ - (VOID)strcpy(prompt, p); + (void)strcpy(prompt, p); pep = prompt + strlen(prompt); for (;;) { ewprintf("%s", prompt); @@ -417,7 +417,7 @@ bindkey(mapp, fname, keys, kcount) curmap = ele->k_prefmap; } } - (VOID)doscan(curmap, c = *keys, NULL); + (void)doscan(curmap, c = *keys, NULL); return remap(curmap, c, funct, pref_map); } @@ -506,7 +506,7 @@ define_key(f, n) ewprintf("Unknown map %s", &buf[16]); return FALSE; } - (VOID)strncat(&buf[16], " key: ", 48 - 16 - 1); + (void)strncat(&buf[16], " key: ", 48 - 16 - 1); return dobind(mp, buf, FALSE); } @@ -610,7 +610,7 @@ evalbuffer(f, n) for (lp = lforw(bp->b_linep); lp != bp->b_linep; lp = lforw(lp)) { if (llength(lp) >= 128) return FALSE; - (VOID)strncpy(excbuf, ltext(lp), llength(lp)); + (void)strncpy(excbuf, ltext(lp), llength(lp)); /* make sure it's terminated */ excbuf[llength(lp)] = '\0'; @@ -663,7 +663,7 @@ load(fname) break; } } - (VOID)ffclose((BUFFER *)NULL); + (void)ffclose((BUFFER *)NULL); excbuf[nbytes] = '\0'; if (s != FIOEOF || (nbytes && excline(excbuf) != TRUE)) return FALSE; diff --git a/usr.bin/mg/file.c b/usr.bin/mg/file.c index 029e5c2e96b..c52f871fce7 100644 --- a/usr.bin/mg/file.c +++ b/usr.bin/mg/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.6 2001/05/04 22:00:35 art Exp $ */ +/* $OpenBSD: file.c,v 1.7 2001/05/23 22:20:35 art Exp $ */ /* * File commands. @@ -182,7 +182,7 @@ insertfile(fname, newname, needinfo) /* cheap */ bp = curbp; if (newname != (char *)NULL) - (VOID)strcpy(bp->b_fname, newname); + (void)strcpy(bp->b_fname, newname); /* hard file open */ if ((s = ffropen(fname, needinfo ? bp : (BUFFER *) NULL)) == FIOERR) @@ -198,11 +198,11 @@ insertfile(fname, newname, needinfo) opos = curwp->w_doto; /* open a new line, at point, and start inserting after it */ - (VOID)lnewline(); + (void)lnewline(); olp = lback(curwp->w_dotp); if (olp == curbp->b_linep) { /* if at end of buffer, create a line to insert before */ - (VOID)lnewline(); + (void)lnewline(); curwp->w_dotp = lback(curwp->w_dotp); } @@ -262,7 +262,7 @@ doneread: } endoffile: /* ignore errors */ - (VOID)ffclose((BUFFER *)NULL); + (void)ffclose((BUFFER *)NULL); /* don't zap an error */ if (s == FIOEOF) { if (nline == 1) @@ -273,7 +273,7 @@ endoffile: /* set mark at the end of the text */ curwp->w_dotp = curwp->w_markp = lback(curwp->w_dotp); curwp->w_marko = llength(curwp->w_markp); - (VOID)ldelnewline(); + (void)ldelnewline(); curwp->w_dotp = olp; curwp->w_doto = opos; if (olp == curbp->b_linep) @@ -298,7 +298,7 @@ endoffile: lp2 = curwp->w_dotp; } else { /* delete extraneous newline */ - (VOID)ldelnewline(); + (void)ldelnewline(); out: lp2 = NULL; } for (wp = wheadp; wp != NULL; wp = wp->w_wndp) { @@ -340,7 +340,7 @@ filewrite(f, n) /* old attributes are no longer current */ bzero(&curbp->b_fi, sizeof(curbp->b_fi)); if ((s = writeout(curbp, adjfname)) == TRUE) { - (VOID)strcpy(curbp->b_fname, adjfname); + (void)strcpy(curbp->b_fname, adjfname); #ifndef NO_BACKUP curbp->b_flag &= ~(BFBAK | BFCHG); #else /* !NO_BACKUP */ @@ -472,7 +472,7 @@ writeout(bp, fn) ewprintf("Wrote %s", fn); } else /* ignore close error if it is a write error */ - (VOID)ffclose(bp); + (void)ffclose(bp); return s == FIOSUC; } @@ -480,7 +480,7 @@ writeout(bp, fn) * Tag all windows for bp (all windows if bp == NULL) as needing their * mode line updated. */ -VOID +void upmodes(bp) BUFFER *bp; { diff --git a/usr.bin/mg/fileio.c b/usr.bin/mg/fileio.c index 232af9f66e1..4c5efd28aa0 100644 --- a/usr.bin/mg/fileio.c +++ b/usr.bin/mg/fileio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fileio.c,v 1.12 2001/05/03 12:57:22 art Exp $ */ +/* $OpenBSD: fileio.c,v 1.13 2001/05/23 22:20:35 art Exp $ */ /* * POSIX fileio.c @@ -75,7 +75,7 @@ ffclose(bp) BUFFER *bp; { - (VOID) fclose(ffp); + (void) fclose(ffp); return (FIOSUC); } @@ -245,7 +245,7 @@ adjustname(fn) fn++; cp = getenv("HOME"); if (cp != NULL && *cp != '\0' && (*fn == '/' || *fn == '\0')) { - (VOID) strcpy(fnb, cp); + (void) strcpy(fnb, cp); cp = fnb + strlen(fnb); if (*fn) fn++; @@ -256,7 +256,7 @@ adjustname(fn) *cp++ = *fn++; *cp = '\0'; if ((pwent = getpwnam(fnb)) != NULL) { - (VOID) strcpy(fnb, pwent->pw_dir); + (void) strcpy(fnb, pwent->pw_dir); cp = fnb + strlen(fnb); break; } else { @@ -300,10 +300,10 @@ adjustname(fn) while (cp > fnb && *--cp != '/') { } ++cp; - (VOID) strncpy(cp, linkbuf, i); + (void) strncpy(cp, linkbuf, i); cp += i; } else { - (VOID) strncpy(fnb, linkbuf, i); + (void) strncpy(fnb, linkbuf, i); cp = fnb + i; } if (cp[-1] != '/') @@ -425,15 +425,15 @@ dired_(dirname) return NULL; } if (dirname[strlen(dirname) - 1] != '/') - (VOID) strcat(dirname, "/"); + (void) strcat(dirname, "/"); if ((bp = findbuffer(dirname)) == NULL) { ewprintf("Could not create buffer"); return NULL; } if (bclear(bp) != TRUE) return FALSE; - (VOID) strcpy(line, "ls -al "); - (VOID) strcpy(&line[7], dirname); + (void) strcpy(line, "ls -al "); + (void) strcpy(&line[7], dirname); if ((dirpipe = popen(line, "r")) == NULL) { ewprintf("Problem opening pipe to ls"); return NULL; @@ -441,14 +441,14 @@ dired_(dirname) line[0] = line[1] = ' '; while (fgets(&line[2], 254, dirpipe) != NULL) { line[strlen(line) - 1] = '\0'; /* remove ^J */ - (VOID) addline(bp, line); + (void) addline(bp, line); } if (pclose(dirpipe) == -1) { ewprintf("Problem closing pipe to ls"); return NULL; } bp->b_dotp = lforw(bp->b_linep); /* go to first line */ - (VOID) strncpy(bp->b_fname, dirname, NFILEN); + (void) strncpy(bp->b_fname, dirname, NFILEN); if ((bp->b_modes[0] = name_mode("dired")) == NULL) { bp->b_modes[0] = &map_table[0]; ewprintf("Could not find mode dired"); @@ -467,7 +467,7 @@ d_makename(lp, fn) if (llength(lp) <= 56) return ABORT; - (VOID) strcpy(fn, curbp->b_fname); + (void) strcpy(fn, curbp->b_fname); cp = fn + strlen(fn); bcopy(&lp->l_text[56], cp, llength(lp) - 56); cp[llength(lp) - 56] = '\0'; diff --git a/usr.bin/mg/help.c b/usr.bin/mg/help.c index cd4a15fb80e..413482821ab 100644 --- a/usr.bin/mg/help.c +++ b/usr.bin/mg/help.c @@ -1,4 +1,4 @@ -/* $OpenBSD: help.c,v 1.9 2001/05/23 22:12:10 art Exp $ */ +/* $OpenBSD: help.c,v 1.10 2001/05/23 22:20:35 art Exp $ */ /* * Help functions for Mg 2 @@ -35,7 +35,7 @@ desckey(f, n) if (inmacro) return TRUE; /* ignore inside keyboard macro */ #endif /* !NO_MACRO */ - (VOID)strcpy(prompt, "Describe key briefly: "); + strcpy(prompt, "Describe key briefly: "); pep = prompt + strlen(prompt); key.k_count = 0; m = curbp->b_nmodes; diff --git a/usr.bin/mg/kbd.c b/usr.bin/mg/kbd.c index c68c7de9f60..4d733cb0516 100644 --- a/usr.bin/mg/kbd.c +++ b/usr.bin/mg/kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kbd.c,v 1.7 2001/05/23 20:19:44 art Exp $ */ +/* $OpenBSD: kbd.c,v 1.8 2001/05/23 22:20:35 art Exp $ */ /* * Terminal independent keyboard handling. @@ -64,7 +64,7 @@ bsmap(f, n) } #endif /* BSMAP */ -VOID +void ungetkey(c) int c; { diff --git a/usr.bin/mg/line.c b/usr.bin/mg/line.c index 8b6cfd5baa2..fda781e4ab4 100644 --- a/usr.bin/mg/line.c +++ b/usr.bin/mg/line.c @@ -1,4 +1,4 @@ -/* $OpenBSD: line.c,v 1.5 2001/01/29 01:58:08 niklas Exp $ */ +/* $OpenBSD: line.c,v 1.6 2001/05/23 22:20:35 art Exp $ */ /* * Text line handling. @@ -95,7 +95,7 @@ lallocx(used) * it might be in, and release the memory. The buffers are updated too; the * magic conditions described in the above comments don't hold here. */ -VOID +void lfree(lp) LINE *lp; { @@ -138,7 +138,7 @@ lfree(lp) * displayed in more than 1 window we change EDIT to HARD. Set MODE if the * mode line needs to be updated (the "*" has to be set). */ -VOID +void lchange(flag) int flag; { @@ -506,7 +506,7 @@ lreplace(plen, st, f) * lowercase found), so bypass check. */ /* NOSTRICT */ - (VOID)backchar(FFARG | FFRAND, (int)plen); + (void)backchar(FFARG | FFRAND, (int)plen); rtype = _L; c = lgetc(curwp->w_dotp, curwp->w_doto); if (ISUPPER(c) != FALSE && f == FALSE) { @@ -526,7 +526,7 @@ lreplace(plen, st, f) rlen = strlen(st); doto = curwp->w_doto; if (plen > rlen) - (VOID)ldelete((RSIZE) (plen - rlen), KNONE); + (void)ldelete((RSIZE) (plen - rlen), KNONE); else if (plen < rlen) { if (linsert((int)(rlen - plen), ' ') == FALSE) return FALSE; @@ -545,16 +545,16 @@ lreplace(plen, st, f) rtype = _L; if (c == CCHR('J')) { if (curwp->w_doto == llength(curwp->w_dotp)) - (VOID)forwchar(FFRAND, 1); + (void)forwchar(FFRAND, 1); else { if (ldelete((RSIZE) 1, KNONE) != FALSE) - (VOID)lnewline(); + (void)lnewline(); } } else if (curwp->w_dotp == curbp->b_linep) { - (VOID)linsert(1, c); + (void)linsert(1, c); } else if (curwp->w_doto == llength(curwp->w_dotp)) { if (ldelete((RSIZE) 1, KNONE) != FALSE) - (VOID)linsert(1, c); + (void)linsert(1, c); } else lputc(curwp->w_dotp, curwp->w_doto++, c); } @@ -567,7 +567,7 @@ lreplace(plen, st, f) * a new kill context is created. The kill buffer array is released, just in * case the buffer has grown to an immense size. No errors. */ -VOID +void kdelete() { if (kbufp != NULL) { diff --git a/usr.bin/mg/main.c b/usr.bin/mg/main.c index 02729be0cd4..9ea37882628 100644 --- a/usr.bin/mg/main.c +++ b/usr.bin/mg/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.6 2001/01/29 01:58:08 niklas Exp $ */ +/* $OpenBSD: main.c,v 1.7 2001/05/23 22:20:35 art Exp $ */ /* * Mainline. @@ -19,7 +19,7 @@ MGWIN *curwp; /* current window */ MGWIN *wheadp = (MGWIN *)NULL; /* MGWIN listhead */ char pat[NPAT]; /* pattern */ -static VOID edinit __P((VOID)); +static void edinit __P((void)); int main(argc, argv) @@ -48,13 +48,13 @@ main(argc, argv) #ifndef NO_STARTUP /* user startup file */ if ((cp = startupfile((char *)NULL)) != NULL) - (VOID)load(cp); + (void)load(cp); #endif /* !NO_STARTUP */ while (--argc > 0) { cp = adjustname(*++argv); curbp = findbuffer(cp); - (VOID)showbuffer(curbp, curwp, 0); - (VOID)readin(cp); + (void)showbuffer(curbp, curwp, 0); + (void)readin(cp); } /* fake last flags */ @@ -88,7 +88,7 @@ main(argc, argv) /* * Initialize default buffer and window. */ -static VOID +static void edinit() { BUFFER *bp; diff --git a/usr.bin/mg/match.c b/usr.bin/mg/match.c index 159a21d1366..7d0656518f9 100644 --- a/usr.bin/mg/match.c +++ b/usr.bin/mg/match.c @@ -1,4 +1,4 @@ -/* $OpenBSD: match.c,v 1.5 2001/05/23 15:20:19 art Exp $ */ +/* $OpenBSD: match.c,v 1.6 2001/05/23 22:20:36 art Exp $ */ /* * Limited parenthesis matching routines @@ -15,7 +15,7 @@ #include "key.h" static int balance __P((void)); -static VOID displaymatch __P((LINE *, int)); +static void displaymatch __P((LINE *, int)); /* * Balance table. When balance() encounters a character that is to be @@ -145,7 +145,7 @@ balance() * move dot to the matching character, sit there a while, then move back. */ -static VOID +static void displaymatch(clp, cbo) LINE *clp; int cbo; diff --git a/usr.bin/mg/paragraph.c b/usr.bin/mg/paragraph.c index fa1f196d4c8..498b040cc44 100644 --- a/usr.bin/mg/paragraph.c +++ b/usr.bin/mg/paragraph.c @@ -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 @@ fillpara(f, n) 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 @@ fillpara(f, n) if (newlength <= fillcol) { /* add word to current line */ if (!firstflag) { - (VOID)linsert(1, ' '); + (void)linsert(1, ' '); ++clength; } firstflag = FALSE; @@ -206,30 +206,30 @@ fillpara(f, n) 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 @@ killpara(f, n) 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 @@ killpara(f, n) 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 @@ fillword(f, n) ++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 @@ fillword(f, n) 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; diff --git a/usr.bin/mg/random.c b/usr.bin/mg/random.c index 5f1a4910605..bd488201be4 100644 --- a/usr.bin/mg/random.c +++ b/usr.bin/mg/random.c @@ -1,4 +1,4 @@ -/* $OpenBSD: random.c,v 1.4 2001/01/29 01:58:09 niklas Exp $ */ +/* $OpenBSD: random.c,v 1.5 2001/05/23 22:20:36 art Exp $ */ /* * Assorted commands. @@ -230,7 +230,7 @@ int justone(f, n) int f, n; { - (VOID)delwhite(f, n); + (void)delwhite(f, n); return linsert(1, ' '); } @@ -259,8 +259,8 @@ delwhite(f, n) } while ((c = lgetc(curwp->w_dotp, curwp->w_doto)) == ' ' || c == '\t'); if (s == TRUE) - (VOID)forwchar(FFRAND, 1); - (VOID)ldelete((RSIZE)(col - curwp->w_doto), KNONE); + (void)forwchar(FFRAND, 1); + (void)ldelete((RSIZE)(col - curwp->w_doto), KNONE); return TRUE; } diff --git a/usr.bin/mg/re_search.c b/usr.bin/mg/re_search.c index afddea279a4..2d46316309b 100644 --- a/usr.bin/mg/re_search.c +++ b/usr.bin/mg/re_search.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re_search.c,v 1.7 2001/01/29 01:58:09 niklas Exp $ */ +/* $OpenBSD: re_search.c,v 1.8 2001/05/23 22:20:36 art Exp $ */ /* * regular expression search commands for Mg @@ -174,7 +174,7 @@ retry: goto stopsearch; case CCHR('G'): /* ^G */ - (VOID)ctrlg(FFRAND, 0); + (void)ctrlg(FFRAND, 0); case CCHR('['): /* ESC */ case '`': goto stopsearch; @@ -430,7 +430,7 @@ re_readpattern(prompt) if (s == TRUE) { /* New pattern given */ - (VOID)strcpy(re_pat, tpat); + (void)strcpy(re_pat, tpat); if (casefoldsearch) flags = REG_EXTENDED | REG_ICASE; else diff --git a/usr.bin/mg/region.c b/usr.bin/mg/region.c index 0331462c726..75fac8a3047 100644 --- a/usr.bin/mg/region.c +++ b/usr.bin/mg/region.c @@ -1,4 +1,4 @@ -/* $OpenBSD: region.c,v 1.4 2001/01/29 01:58:09 niklas Exp $ */ +/* $OpenBSD: region.c,v 1.5 2001/05/23 22:20:36 art Exp $ */ /* * Region based commands. @@ -272,12 +272,12 @@ prefixregion(f, n) /* for each line, go to beginning and insert the prefix string */ while (nline--) { - (VOID)gotobol(FFRAND, 1); + (void)gotobol(FFRAND, 1); for (prefix = prefix_string; *prefix; prefix++) - (VOID)linsert(1, *prefix); - (VOID)forwline(FFRAND, 1); + (void)linsert(1, *prefix); + (void)forwline(FFRAND, 1); } - (VOID)gotobol(FFRAND, 1); + (void)gotobol(FFRAND, 1); return TRUE; } @@ -298,7 +298,7 @@ setprefix(f, n) s = ereply("Prefix string (default %s): ", buf, sizeof buf, prefix_string); if (s == TRUE) - (VOID)strcpy(prefix_string, buf); + (void)strcpy(prefix_string, buf); /* CR -- use old one */ if ((s == FALSE) && (prefix_string[0] != '\0')) s = TRUE; diff --git a/usr.bin/mg/search.c b/usr.bin/mg/search.c index 1d8d22ab233..2a88aec017d 100644 --- a/usr.bin/mg/search.c +++ b/usr.bin/mg/search.c @@ -1,4 +1,4 @@ -/* $OpenBSD: search.c,v 1.5 2001/05/03 20:43:12 art Exp $ */ +/* $OpenBSD: search.c,v 1.6 2001/05/23 22:20:36 art Exp $ */ /* * Search commands. @@ -29,14 +29,14 @@ typedef struct { } SRCHCOM; static int isearch __P((int)); -static VOID is_cpush __P((int)); -static VOID is_lpush __P((void)); -static VOID is_pop __P((void)); +static void is_cpush __P((int)); +static void is_lpush __P((void)); +static void is_pop __P((void)); static int is_peek __P((void)); -static VOID is_undo __P((int *, int *)); +static void is_undo __P((int *, int *)); static int is_find __P((int)); -static VOID is_prompt __P((int, int, int)); -static VOID is_dspl __P((char *, int)); +static void is_prompt __P((int, int, int)); +static void is_dspl __P((char *, int)); static int eq __P((int, int)); static SRCHCOM cmds[NSRCH]; @@ -175,7 +175,7 @@ isearch(dir) for (cip = 0; cip < NSRCH; cip++) cmds[cip].s_code = SRCH_NOPR; - (VOID)strcpy(opat, pat); + (void)strcpy(opat, pat); cip = 0; pptr = -1; clp = curwp->w_dotp; @@ -215,8 +215,8 @@ isearch(dir) curwp->w_doto = cbo; curwp->w_flag |= WFMOVE; srch_lastdir = dir; - (VOID)ctrlg(FFRAND, 0); - (VOID)strcpy(pat, opat); + (void)ctrlg(FFRAND, 0); + (void)strcpy(pat, opat); return ABORT; case CCHR(']'): case CCHR('S'): @@ -230,11 +230,11 @@ isearch(dir) break; is_lpush(); pptr = strlen(pat); - (VOID)forwchar(FFRAND, 1); + (void)forwchar(FFRAND, 1); if (is_find(SRCH_FORW) != FALSE) is_cpush(SRCH_MARK); else { - (VOID)backchar(FFRAND, 1); + (void)backchar(FFRAND, 1); ttbeep(); success = FALSE; } @@ -251,11 +251,11 @@ isearch(dir) break; is_lpush(); pptr = strlen(pat); - (VOID)backchar(FFRAND, 1); + (void)backchar(FFRAND, 1); if (is_find(SRCH_BACK) != FALSE) is_cpush(SRCH_MARK); else { - (VOID)forwchar(FFRAND, 1); + (void)forwchar(FFRAND, 1); ttbeep(); success = FALSE; } @@ -314,7 +314,7 @@ isearch(dir) /* NOTREACHED */ } -static VOID +static void is_cpush(cmd) int cmd; { @@ -323,7 +323,7 @@ is_cpush(cmd) cmds[cip].s_code = cmd; } -static VOID +static void is_lpush() { int ctp; @@ -336,7 +336,7 @@ is_lpush() cmds[ctp].s_dotp = curwp->w_dotp; } -static VOID +static void is_pop() { if (cmds[cip].s_code != SRCH_NOPR) { @@ -356,7 +356,7 @@ is_peek() } /* this used to always return TRUE (the return value was checked) */ -static VOID +static void is_undo(pptr, dir) int *pptr, *dir; { @@ -401,7 +401,7 @@ is_find(dir) plen = strlen(pat); if (plen != 0) { if (dir == SRCH_FORW) { - (VOID)backchar(FFARG | FFRAND, plen); + (void)backchar(FFARG | FFRAND, plen); if (forwsrch() == FALSE) { curwp->w_doto = odoto; curwp->w_dotp = odotp; @@ -410,7 +410,7 @@ is_find(dir) return TRUE; } if (dir == SRCH_BACK) { - (VOID)forwchar(FFARG | FFRAND, plen); + (void)forwchar(FFARG | FFRAND, plen); if (backsrch() == FALSE) { curwp->w_doto = odoto; curwp->w_dotp = odotp; @@ -430,7 +430,7 @@ is_find(dir) * on if it liked the "dir". However, none of the callers looked at the * status, so I just made the checking vanish. */ -static VOID +static void is_prompt(dir, flag, success) int dir, flag, success; { @@ -452,7 +452,7 @@ is_prompt(dir, flag, success) * Prompt writing routine for the incremental search. The "prompt" is just * a string. The "flag" determines whether pat should be printed. */ -static VOID +static void is_dspl(prompt, flag) char *prompt; int flag; @@ -514,7 +514,7 @@ retry: goto stopsearch; /* ^G or ESC */ case CCHR('G'): - (VOID)ctrlg(FFRAND, 0); + (void)ctrlg(FFRAND, 0); case CCHR('['): goto stopsearch; case '!': @@ -689,7 +689,7 @@ readpattern(prompt) /* specified */ if (s == TRUE) - (VOID) strcpy(pat, tpat); + (void) strcpy(pat, tpat); /* CR, but old one */ else if (s == FALSE && pat[0] != 0) s = TRUE; diff --git a/usr.bin/mg/tty.c b/usr.bin/mg/tty.c index 8ed08dd4861..d33f798a227 100644 --- a/usr.bin/mg/tty.c +++ b/usr.bin/mg/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.7 2001/01/29 01:58:10 niklas Exp $ */ +/* $OpenBSD: tty.c,v 1.8 2001/05/23 22:20:36 art Exp $ */ /* * Terminfo display driver @@ -43,7 +43,7 @@ static char *scroll_fwd; /* How to scroll forward. */ * Initialize the terminal when the editor * gets started up. */ -VOID +void ttinit() { char *tv_stype, *p; @@ -119,7 +119,7 @@ ttinit() * Re-initialize the terminal when the editor is resumed. * The keypad_xmit doesn't really belong here but... */ -VOID +void ttreinit() { if (enter_ca_mode) @@ -138,7 +138,7 @@ ttreinit() * it sets the window back to half screen scrolling. Perhaps it should * query the display for the increment, and put it back to what it was. */ -VOID +void tttidy() { #ifdef XKEYS @@ -155,7 +155,7 @@ tttidy() * optimize out extra moves; redisplay may have left the cursor in the right * location last time! */ -VOID +void ttmove(row, col) int row, col; { @@ -169,7 +169,7 @@ ttmove(row, col) /* * Erase to end of line. */ -VOID +void tteeol() { int i; @@ -187,7 +187,7 @@ tteeol() /* * Erase to end of page. */ -VOID +void tteeop() { int line; @@ -212,7 +212,7 @@ tteeop() /* * Make a noise. */ -VOID +void ttbeep() { putpad(bell, 1); @@ -225,7 +225,7 @@ ttbeep() * smoother display. If there is no scrolling region, use a set of insert * and delete line sequences. */ -VOID +void ttinsl(row, bot, nchunk) int row, bot, nchunk; { @@ -278,7 +278,7 @@ ttinsl(row, bot, nchunk) * this is done with crafty sequences of insert and delete lines. The * presence of the echo area makes a boundry condition go away. */ -VOID +void ttdell(row, bot, nchunk) int row, bot, nchunk; { @@ -332,7 +332,7 @@ ttdell(row, bot, nchunk) * ensure that the next call to "ttmove" does not turn into a no-op (the * window adjustment moves the cursor). */ -VOID +void ttwindow(top, bot) int top, bot; { @@ -353,7 +353,7 @@ ttwindow(top, bot) * larger. This behavior seems to work right on systems where you can set * your terminal size. */ -VOID +void ttnowindow() { if (change_scroll_region) { @@ -373,7 +373,7 @@ ttnowindow() * in putline.s on a line by line basis, so don't bother sending out the * color shift. */ -VOID +void ttcolor(color) int color; { @@ -396,7 +396,7 @@ ttcolor(color) * always deal with a screen NROW by NCOL. Look in "window.c" to see how * the caller deals with a change. */ -VOID +void ttresize() { /* found in "ttyio.c" */ diff --git a/usr.bin/mg/ttyio.c b/usr.bin/mg/ttyio.c index 58ad2cd05a6..42b5967c03b 100644 --- a/usr.bin/mg/ttyio.c +++ b/usr.bin/mg/ttyio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttyio.c,v 1.14 2001/05/03 20:40:22 art Exp $ */ +/* $OpenBSD: ttyio.c,v 1.15 2001/05/23 22:20:36 art Exp $ */ /* * POSIX terminal I/O. @@ -202,7 +202,7 @@ typeahead() /* * panic - just exit, as quickly as we can. */ -VOID +void panic(s) char *s; { |