diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-02-19 07:38:51 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-02-19 07:38:51 +0000 |
commit | 23b53324e8fda2109b5165c353aa088da09367fd (patch) | |
tree | b97bc13d68a88a145d03d7dfc8d0941de7e0d2d2 | |
parent | 958739047240f5d12bee263f4b1fdc73d757679a (diff) |
ansi
-rw-r--r-- | usr.bin/vgrind/regexp.c | 18 | ||||
-rw-r--r-- | usr.bin/vgrind/vfontedpr.c | 31 | ||||
-rw-r--r-- | usr.bin/vgrind/vgrindefs.c | 35 |
3 files changed, 28 insertions, 56 deletions
diff --git a/usr.bin/vgrind/regexp.c b/usr.bin/vgrind/regexp.c index 757451bce96..b6567781561 100644 --- a/usr.bin/vgrind/regexp.c +++ b/usr.bin/vgrind/regexp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: regexp.c,v 1.5 2003/02/19 07:32:36 deraadt Exp $ */ +/* $OpenBSD: regexp.c,v 1.6 2003/02/19 07:38:49 deraadt Exp $ */ /* $NetBSD: regexp.c,v 1.3 1994/11/17 08:28:02 jtc Exp $ */ /* @@ -45,7 +45,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)regexp.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: regexp.c,v 1.5 2003/02/19 07:32:36 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: regexp.c,v 1.6 2003/02/19 07:38:49 deraadt Exp $"; #endif /* not lint */ #include <ctype.h> @@ -71,9 +71,7 @@ boolean l_onecase; /* true if upper and lower equivalent */ */ int -STRNCMP(s1, s2, len) - char *s1,*s2; - int len; +STRNCMP(char *s1, char *s2, int len) { if (l_onecase) { do @@ -153,8 +151,7 @@ static char *ccre; /* pointer to current position in converted exp*/ static char *ure; /* pointer current position in unconverted exp */ char * -convexp(re) - char *re; /* unconverted irregular expression */ +convexp(char *re) { char *cre; /* pointer to converted regular expression */ @@ -179,7 +176,7 @@ convexp(re) } static void -expconv() +expconv(void) { char *cs; /* pointer to current symbol in converted exp */ char c; /* character being processed */ @@ -350,10 +347,7 @@ expconv() */ char * -expmatch (s, re, mstring) - char *s; /* string to check for a match in */ - char *re; /* a converted irregular expression */ - char *mstring; /* where to put whatever matches a \p */ +expmatch(char *s, char *re, char *mstring) { char *cs; /* the current symbol */ char *ptr,*s1; /* temporary pointer */ diff --git a/usr.bin/vgrind/vfontedpr.c b/usr.bin/vgrind/vfontedpr.c index 96d8eeb40bf..3789fa6de88 100644 --- a/usr.bin/vgrind/vfontedpr.c +++ b/usr.bin/vgrind/vfontedpr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfontedpr.c,v 1.7 2003/02/19 07:32:36 deraadt Exp $ */ +/* $OpenBSD: vfontedpr.c,v 1.8 2003/02/19 07:38:49 deraadt Exp $ */ /* $NetBSD: vfontedpr.c,v 1.7 1998/12/19 23:41:53 christos Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)vfontedpr.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: vfontedpr.c,v 1.7 2003/02/19 07:32:36 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: vfontedpr.c,v 1.8 2003/02/19 07:38:49 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -132,9 +132,7 @@ char *language = "c"; /* the language indicator */ #define ps(x) printf("%s", x) int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { char *fname = ""; struct stat stbuf; @@ -353,8 +351,7 @@ main(argc, argv) #define isidchr(c) (isalnum(c) || (c) == '_') static void -putScp(os) - char *os; +putScp(char *os) { char *s = os; /* pointer to unmatched string */ char dummy[BUFSIZ]; /* dummy to be used by expmatch */ @@ -534,10 +531,7 @@ skip: } static void -putKcp (start, end, force) - char *start; /* start of string to write */ - char *end; /* end of string to write */ - boolean force; /* true if we should force nokeyw */ +putKcp(char *start, char *end, boolean force) { int i; int xfld = 0; @@ -584,16 +578,14 @@ putKcp (start, end, force) static int -tabs(s, os) - char *s, *os; +tabs(char *s, char *os) { return (width(s, os) / 8); } static int -width(s, os) - char *s, *os; +width(char *s, char *os) { int i = 0; @@ -613,8 +605,7 @@ width(s, os) } static void -putcp(c) - int c; +putcp(int c) { switch(c) { @@ -678,8 +669,7 @@ putcp(c) * look for a process beginning on this line */ static boolean -isproc(s) - char *s; +isproc(char *s) { pname[0] = NULL; if (!l_toplex || blklevel == 0) @@ -694,8 +684,7 @@ isproc(s) */ static int -iskw(s) - char *s; +iskw(char *s) { char **ss = l_keywds; int i = 1; diff --git a/usr.bin/vgrind/vgrindefs.c b/usr.bin/vgrind/vgrindefs.c index 818ce8b3a2e..a3527c1435d 100644 --- a/usr.bin/vgrind/vgrindefs.c +++ b/usr.bin/vgrind/vgrindefs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vgrindefs.c,v 1.5 2003/02/19 07:33:34 deraadt Exp $ */ +/* $OpenBSD: vgrindefs.c,v 1.6 2003/02/19 07:38:50 deraadt Exp $ */ /* $NetBSD: vgrindefs.c,v 1.5 1994/12/20 12:05:29 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)vgrindefs.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: vgrindefs.c,v 1.5 2003/02/19 07:33:34 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: vgrindefs.c,v 1.6 2003/02/19 07:38:50 deraadt Exp $"; #endif /* not lint */ #define BUFSIZ 1024 @@ -74,14 +74,10 @@ char *tgetstr(); * from the termcap file. Parse is very rudimentary; * we just notice escaped newlines. */ -tgetent(bp, name, file) - char *bp, *name, *file; +tgetent(char *bp, char *name, char *file) { - char *cp; - int c; - int i = 0, cnt = 0; - char ibuf[BUFSIZ]; - char *cp2; + char ibuf[BUFSIZ], *cp, *cp2; + int i = 0, cnt = 0, c; int tf; tbuf = bp; @@ -134,7 +130,7 @@ tgetent(bp, name, file) * entries to say "like an HP2621 but doesn't turn on the labels". * Note that this works because of the left to right scan. */ -tnchktc() +tnchktc(void) { char *p, *q; char tcname[16]; /* name of similar terminal */ @@ -181,8 +177,7 @@ tnchktc() * against each such name. The normal : terminator after the last * name (before the first field) stops us. */ -tnamatch(np) - char *np; +tnamatch(char *np) { char *Np, *Bp; @@ -208,8 +203,7 @@ tnamatch(np) * into the termcap file in octal. */ static char * -tskip(bp) - char *bp; +tskip(char *bp) { while (*bp && *bp != ':') @@ -227,8 +221,7 @@ tskip(bp) * a # character. If the option is not found we return -1. * Note that we handle octal numbers beginning with 0. */ -tgetnum(id) - char *id; +tgetnum(char *id) { int i, base; char *bp = tbuf; @@ -260,8 +253,7 @@ tgetnum(id) * of the buffer. Return 1 if we find the option, or 0 if it is * not given. */ -tgetflag(id) - char *id; +tgetflag(char *id) { char *bp = tbuf; @@ -287,8 +279,7 @@ tgetflag(id) * No checking on area overflow. */ char * -tgetstr(id, area) - char *id, **area; +tgetstr(char *id, char **area) { char *bp = tbuf; @@ -312,9 +303,7 @@ tgetstr(id, area) * string capability escapes. */ static char * -tdecode(str, area) - char *str; - char **area; +tdecode(char *str, char **area) { char *cp; int c; |