summaryrefslogtreecommitdiff
path: root/usr.bin/rs
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-10 22:20:55 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-10 22:20:55 +0000
commitb8aaa8bec8414f8e55cf9b61fe0873d242c773b8 (patch)
tree5e43016c4fae834239fd38972fd58355ed6b54b5 /usr.bin/rs
parentf18f6607440f6d2da08fac3522d88a65c77a5f3e (diff)
mostly ansi cleanup; pval ok
Diffstat (limited to 'usr.bin/rs')
-rw-r--r--usr.bin/rs/rs.c38
1 files changed, 14 insertions, 24 deletions
diff --git a/usr.bin/rs/rs.c b/usr.bin/rs/rs.c
index b207de5c398..9dabaf515f9 100644
--- a/usr.bin/rs/rs.c
+++ b/usr.bin/rs/rs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rs.c,v 1.8 2003/06/03 02:56:15 millert Exp $ */
+/* $OpenBSD: rs.c,v 1.9 2003/06/10 22:20:50 deraadt Exp $ */
/*-
* Copyright (c) 1993
@@ -105,9 +105,7 @@ void putfile(void);
} while(0)
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
getargs(argc, argv);
getfile();
@@ -121,7 +119,7 @@ main(argc, argv)
}
void
-getfile()
+getfile(void)
{
char *p;
char *endp;
@@ -187,7 +185,7 @@ getfile()
}
void
-putfile()
+putfile(void)
{
char **ep;
int i, j, n;
@@ -212,9 +210,7 @@ putfile()
}
void
-prints(s, col)
- char *s;
- int col;
+prints(char *s, int col)
{
int n;
char *p = s;
@@ -232,8 +228,7 @@ prints(s, col)
}
void
-usage(msg, s)
- char *msg, *s;
+usage(char *msg, char *s)
{
warnx(msg, s);
fprintf(stderr,
@@ -242,7 +237,7 @@ usage(msg, s)
}
void
-prepfile()
+prepfile(void)
{
char **ep;
int i;
@@ -335,7 +330,7 @@ prepfile()
char ibuf[BSIZE]; /* two screenfuls should do */
int
-getline() /* get line; maintain curline, curlen; manage storage */
+getline(void) /* get line; maintain curline, curlen; manage storage */
{
static int putlength;
static char *endblock = ibuf + BSIZE;
@@ -368,8 +363,7 @@ getline() /* get line; maintain curline, curlen; manage storage */
}
char **
-getptrs(sp)
- char **sp;
+getptrs(char **sp)
{
char **p;
@@ -384,9 +378,7 @@ getptrs(sp)
}
void
-getargs(ac, av)
- int ac;
- char *av[];
+getargs(int ac, char *av[])
{
char *p;
@@ -495,9 +487,7 @@ getargs(ac, av)
}
char *
-getlist(list, p)
- short **list;
- char *p;
+getlist(short **list, char *p)
{
int count = 1;
char *t;
@@ -527,10 +517,10 @@ getlist(list, p)
return(t - 1);
}
+/* num = number p points to; if (strict) complain */
+/* returns pointer to end of num */
char *
-getnum(num, p, strict) /* num = number p points to; if (strict) complain */
- int *num, strict; /* returns pointer to end of num */
- char *p;
+getnum(int *num, char *p, int strict)
{
char *t = p;