Date: Tue, 5 May 2015 07:33:39 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282449 - head/usr.bin/vgrind Message-ID: <201505050733.t457Xdum008775@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Tue May 5 07:33:38 2015 New Revision: 282449 URL: https://svnweb.freebsd.org/changeset/base/282449 Log: Ansify to allow to work on it later Modified: head/usr.bin/vgrind/regexp.c head/usr.bin/vgrind/vfontedpr.c head/usr.bin/vgrind/vgrindefs.c Modified: head/usr.bin/vgrind/regexp.c ============================================================================== --- head/usr.bin/vgrind/regexp.c Tue May 5 05:14:12 2015 (r282448) +++ head/usr.bin/vgrind/regexp.c Tue May 5 07:33:38 2015 (r282449) @@ -66,9 +66,7 @@ boolean l_onecase; /* true if upper and */ int -STRNCMP(s1, s2, len) - register char *s1,*s2; - register int len; +STRNCMP(register char *s1, register char *s2, register int len) { if (l_onecase) { do @@ -147,9 +145,9 @@ STRNCMP(s1, s2, len) static char *ccre; /* pointer to current position in converted exp*/ static char *ure; /* pointer current position in unconverted exp */ +/* re: unconverted irregular expression */ char * -convexp(re) - char *re; /* unconverted irregular expression */ +convexp(char *re) { register char *cre; /* pointer to converted regular expression */ @@ -344,11 +342,13 @@ expconv() * character matched. */ +/* + * s: string to check for a match in + * re: a converted irregular expression + * mstring: where to put whatever matches a \p + */ char * -expmatch (s, re, mstring) - register char *s; /* string to check for a match in */ - register char *re; /* a converted irregular expression */ - register char *mstring; /* where to put whatever matches a \p */ +expmatch (register char *s, register char *re, register char *mstring) { register char *cs; /* the current symbol */ register char *ptr,*s1; /* temporary pointer */ Modified: head/usr.bin/vgrind/vfontedpr.c ============================================================================== --- head/usr.bin/vgrind/vfontedpr.c Tue May 5 05:14:12 2015 (r282448) +++ head/usr.bin/vgrind/vfontedpr.c Tue May 5 07:33:38 2015 (r282449) @@ -542,11 +542,13 @@ skip: } while (*s); } +/* + * start: start of string to write + * end: end of string to write + * force: true if we should force nokeyw + */ 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; @@ -593,16 +595,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) - register char *s, *os; +width(register char *s, register char *os) { register int i = 0; @@ -690,8 +690,7 @@ putcp(c) * look for a process beginning on this line */ static boolean -isproc(s) - char *s; +isproc(char *s) { pname[0] = '\0'; if (!l_toplex || blklevel == 0) @@ -706,8 +705,7 @@ isproc(s) */ static int -iskw(s) - register char *s; +iskw(register char *s) { register char **ss = l_keywds; register int i = 1; Modified: head/usr.bin/vgrind/vgrindefs.c ============================================================================== --- head/usr.bin/vgrind/vgrindefs.c Tue May 5 05:14:12 2015 (r282448) +++ head/usr.bin/vgrind/vgrindefs.c Tue May 5 07:33:38 2015 (r282449) @@ -55,18 +55,19 @@ __FBSDID("$FreeBSD$"); static char *tbuf; static char *filename; static int hopcount; /* detect infinite loops in termcap, init 0 */ -char *tskip(); -char *tgetstr(); -char *tdecode(); -char *getenv(); + +static int tnchktc(void); +static int tnamatch(char *); +static char *tskip(register char *); +static char *tdecode(register char *, char **); /* * Get an entry for terminal name in buffer bp, * from the termcap file. Parse is very rudimentary; * we just notice escaped newlines. */ -tgetent(bp, name, file) - char *bp, *name, *file; +int +tgetent(char *bp, char *name, char *file) { register char *cp; register int c; @@ -125,7 +126,8 @@ 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() +static int +tnchktc(void) { register char *p, *q; char tcname[16]; /* name of similar terminal */ @@ -172,8 +174,8 @@ tnchktc() * against each such name. The normal : terminator after the last * name (before the first field) stops us. */ -tnamatch(np) - char *np; +static int +tnamatch(char *np) { register char *Np, *Bp; @@ -199,8 +201,7 @@ tnamatch(np) * into the termcap file in octal. */ static char * -tskip(bp) - register char *bp; +tskip(register char *bp) { while (*bp && *bp != ':') @@ -251,8 +252,8 @@ tgetnum(id) * of the buffer. Return 1 if we find the option, or 0 if it is * not given. */ -tgetflag(id) - char *id; +int +tgetflag(char *id) { register char *bp = tbuf; @@ -278,8 +279,7 @@ tgetflag(id) * No checking on area overflow. */ char * -tgetstr(id, area) - char *id, **area; +tgetstr(char *id, char **area) { register char *bp = tbuf; @@ -303,9 +303,7 @@ tgetstr(id, area) * string capability escapes. */ static char * -tdecode(str, area) - register char *str; - char **area; +tdecode(register char *str, char **area) { register char *cp; register int c;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505050733.t457Xdum008775>