summaryrefslogtreecommitdiff
path: root/bin/rcp
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-04 04:26:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-04 04:26:41 +0000
commitae43d200ad6728281488c9ec000422274ea4d8a3 (patch)
treef8e73c7af5328ad187c5c37a409d96ab040fbd06 /bin/rcp
parent14df51898fb77d30235fa80d84b66f49925f4bb2 (diff)
ansi
Diffstat (limited to 'bin/rcp')
-rw-r--r--bin/rcp/rcp.c33
-rw-r--r--bin/rcp/util.c24
2 files changed, 18 insertions, 39 deletions
diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c
index 87bfa63622c..b237e3311e5 100644
--- a/bin/rcp/rcp.c
+++ b/bin/rcp/rcp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcp.c,v 1.30 2002/06/09 05:30:08 todd Exp $ */
+/* $OpenBSD: rcp.c,v 1.31 2002/07/04 04:26:40 deraadt Exp $ */
/* $NetBSD: rcp.c,v 1.9 1995/03/21 08:19:06 cgd Exp $ */
/*
@@ -115,9 +115,7 @@ void toremote(char *, int, char *[]);
void usage(void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
struct servent *sp;
int ch, fflag, tflag;
@@ -235,9 +233,7 @@ main(argc, argv)
}
void
-toremote(targ, argc, argv)
- char *targ, *argv[];
- int argc;
+toremote(char *targ, int argc, char *argv[])
{
int i, len, tos;
char *bp, *host, *src, *suser, *thost, *tuser, *user;
@@ -329,9 +325,7 @@ toremote(targ, argc, argv)
}
void
-tolocal(argc, argv)
- int argc;
- char *argv[];
+tolocal(int argc, char *argv[])
{
int i, len, tos;
char *bp, *host, *src, *suser, *user;
@@ -396,9 +390,7 @@ tolocal(argc, argv)
}
void
-source(argc, argv)
- int argc;
- char *argv[];
+source(int argc, char *argv[])
{
struct stat stb;
static BUF buffer;
@@ -493,9 +485,7 @@ next: (void)close(fd);
}
void
-rsource(name, statp)
- char *name;
- struct stat *statp;
+rsource(char *name, struct stat *statp)
{
DIR *dirp;
struct dirent *dp;
@@ -546,9 +536,7 @@ rsource(name, statp)
}
void
-sink(argc, argv)
- int argc;
- char *argv[];
+sink(int argc, char *argv[])
{
static BUF buffer;
struct stat stb;
@@ -786,8 +774,7 @@ screwup:
#ifdef KERBEROS
int
-kerberos(host, bp, locuser, user)
- char **host, *bp, *locuser, *user;
+kerberos(char **host, char *bp, char *locuser, char *user)
{
struct servent *sp;
@@ -825,7 +812,7 @@ again:
#endif /* KERBEROS */
int
-response()
+response(void)
{
char ch, *cp, resp, rbuf[BUFSIZ];
@@ -858,7 +845,7 @@ response()
}
void
-usage()
+usage(void)
{
#ifdef KERBEROS
(void)fprintf(stderr, "usage: %s [-Kpx] [-k realm] f1 f2\n",
diff --git a/bin/rcp/util.c b/bin/rcp/util.c
index 6613730d14c..2e007c30b18 100644
--- a/bin/rcp/util.c
+++ b/bin/rcp/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.10 2001/08/29 20:44:03 markus Exp $ */
+/* $OpenBSD: util.c,v 1.11 2002/07/04 04:26:40 deraadt Exp $ */
/* $NetBSD: util.c,v 1.2 1995/03/21 08:19:08 cgd Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)util.c 8.2 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: util.c,v 1.10 2001/08/29 20:44:03 markus Exp $";
+static char rcsid[] = "$OpenBSD: util.c,v 1.11 2002/07/04 04:26:40 deraadt Exp $";
#endif
#endif /* not lint */
@@ -59,8 +59,7 @@ static char rcsid[] = "$OpenBSD: util.c,v 1.10 2001/08/29 20:44:03 markus Exp $"
#include "extern.h"
char *
-colon(cp)
- char *cp;
+colon(char *cp)
{
for (; *cp; ++cp) {
if (*cp == ':')
@@ -72,8 +71,7 @@ colon(cp)
}
void
-verifydir(cp)
- char *cp;
+verifydir(char *cp)
{
struct stat stb;
@@ -87,8 +85,7 @@ verifydir(cp)
}
int
-okname(cp0)
- char *cp0;
+okname(char *cp0)
{
int c;
char *cp;
@@ -108,9 +105,7 @@ bad: warnx("%s: invalid user name", cp0);
}
int
-susystem(s, userid)
- int userid;
- char *s;
+susystem(char *s, int userid)
{
sig_t istat, qstat;
int status;
@@ -137,9 +132,7 @@ susystem(s, userid)
}
BUF *
-allocbuf(bp, fd, blksize)
- BUF *bp;
- int fd, blksize;
+allocbuf(BUF *bp, int fd, int blksize)
{
struct stat stb;
size_t size;
@@ -169,8 +162,7 @@ allocbuf(bp, fd, blksize)
}
void
-lostconn(signo)
- int signo;
+lostconn(int signo)
{
extern char *__progname;
char buf[1024];