summaryrefslogtreecommitdiffstats
path: root/usr.bin/vgrind
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-05-05 07:33:38 +0000
committerbapt <bapt@FreeBSD.org>2015-05-05 07:33:38 +0000
commitef4463e2035eae3ffe51a6440a7e166692c49e0b (patch)
treee40e4a07dcc698aef602bb1ec4ccae1344bad35b /usr.bin/vgrind
parentec163c3dc9632edf4049ab47412e3409f70a751b (diff)
downloadFreeBSD-src-ef4463e2035eae3ffe51a6440a7e166692c49e0b.zip
FreeBSD-src-ef4463e2035eae3ffe51a6440a7e166692c49e0b.tar.gz
Ansify to allow to work on it later
Diffstat (limited to 'usr.bin/vgrind')
-rw-r--r--usr.bin/vgrind/regexp.c18
-rw-r--r--usr.bin/vgrind/vfontedpr.c22
-rw-r--r--usr.bin/vgrind/vgrindefs.c34
3 files changed, 35 insertions, 39 deletions
diff --git a/usr.bin/vgrind/regexp.c b/usr.bin/vgrind/regexp.c
index 2da447d..0f44d9f 100644
--- a/usr.bin/vgrind/regexp.c
+++ b/usr.bin/vgrind/regexp.c
@@ -66,9 +66,7 @@ boolean l_onecase; /* true if upper and lower equivalent */
*/
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 */
diff --git a/usr.bin/vgrind/vfontedpr.c b/usr.bin/vgrind/vfontedpr.c
index 5baaec0..b996f2f 100644
--- a/usr.bin/vgrind/vfontedpr.c
+++ b/usr.bin/vgrind/vfontedpr.c
@@ -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;
diff --git a/usr.bin/vgrind/vgrindefs.c b/usr.bin/vgrind/vgrindefs.c
index b811c2c..bd680a9 100644
--- a/usr.bin/vgrind/vgrindefs.c
+++ b/usr.bin/vgrind/vgrindefs.c
@@ -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;
OpenPOWER on IntegriCloud