summaryrefslogtreecommitdiff
path: root/bin/cp
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/cp
parent14df51898fb77d30235fa80d84b66f49925f4bb2 (diff)
ansi
Diffstat (limited to 'bin/cp')
-rw-r--r--bin/cp/cp.c20
-rw-r--r--bin/cp/utils.c29
2 files changed, 15 insertions, 34 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c
index cbe40e293a0..daafd581640 100644
--- a/bin/cp/cp.c
+++ b/bin/cp/cp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cp.c,v 1.19 2002/06/09 05:47:26 todd Exp $ */
+/* $OpenBSD: cp.c,v 1.20 2002/07/04 04:26:39 deraadt Exp $ */
/* $NetBSD: cp.c,v 1.14 1995/09/07 06:14:51 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)cp.c 8.5 (Berkeley) 4/29/95";
#else
-static char rcsid[] = "$OpenBSD: cp.c,v 1.19 2002/06/09 05:47:26 todd Exp $";
+static char rcsid[] = "$OpenBSD: cp.c,v 1.20 2002/07/04 04:26:39 deraadt Exp $";
#endif
#endif /* not lint */
@@ -102,9 +102,7 @@ int mastercmp(const FTSENT **, const FTSENT **);
char *find_last_component(char *);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
struct stat to_stat, tmp_stat;
enum op type;
@@ -251,9 +249,7 @@ main(argc, argv)
}
char *
-find_last_component(path)
- char *path;
-
+find_last_component(char *path)
{
char *p;
@@ -278,10 +274,7 @@ find_last_component(path)
}
int
-copy(argv, type, fts_options)
- char *argv[];
- enum op type;
- int fts_options;
+copy(char *argv[], enum op type, int fts_options)
{
struct stat to_stat;
FTS *ftsp;
@@ -482,8 +475,7 @@ copy(argv, type, fts_options)
* files first reduces seeking.
*/
int
-mastercmp(a, b)
- const FTSENT **a, **b;
+mastercmp(const FTSENT **a, const FTSENT **b)
{
int a_info, b_info;
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index 6b0c2736e51..e39286932b5 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.c,v 1.19 2002/05/30 06:20:27 deraadt Exp $ */
+/* $OpenBSD: utils.c,v 1.20 2002/07/04 04:26:39 deraadt Exp $ */
/* $NetBSD: utils.c,v 1.6 1997/02/26 14:40:51 cgd Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)utils.c 8.3 (Berkeley) 4/1/94";
#else
-static char rcsid[] = "$OpenBSD: utils.c,v 1.19 2002/05/30 06:20:27 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: utils.c,v 1.20 2002/07/04 04:26:39 deraadt Exp $";
#endif
#endif /* not lint */
@@ -59,9 +59,7 @@ static char rcsid[] = "$OpenBSD: utils.c,v 1.19 2002/05/30 06:20:27 deraadt Exp
#include "extern.h"
int
-copy_file(entp, dne)
- FTSENT *entp;
- int dne;
+copy_file(FTSENT *entp, int dne)
{
static char buf[MAXBSIZE];
struct stat to_stat, *fs;
@@ -188,9 +186,7 @@ copy_file(entp, dne)
}
int
-copy_link(p, exists)
- FTSENT *p;
- int exists;
+copy_link(FTSENT *p, int exists)
{
int len;
char link[MAXPATHLEN];
@@ -212,9 +208,7 @@ copy_link(p, exists)
}
int
-copy_fifo(from_stat, exists)
- struct stat *from_stat;
- int exists;
+copy_fifo(struct stat *from_stat, int exists)
{
if (exists && unlink(to.p_path)) {
warn("unlink: %s", to.p_path);
@@ -228,9 +222,7 @@ copy_fifo(from_stat, exists)
}
int
-copy_special(from_stat, exists)
- struct stat *from_stat;
- int exists;
+copy_special(struct stat *from_stat, int exists)
{
if (exists && unlink(to.p_path)) {
warn("unlink: %s", to.p_path);
@@ -245,9 +237,7 @@ copy_special(from_stat, exists)
int
-setfile(fs, fd)
- struct stat *fs;
- int fd;
+setfile(struct stat *fs, int fd)
{
static struct timeval tv[2];
int rval;
@@ -298,8 +288,7 @@ setfile(fs, fd)
int
-setlink(fs)
- struct stat *fs;
+setlink(struct stat *fs)
{
if (lchown(to.p_path, fs->st_uid, fs->st_gid)) {
@@ -313,7 +302,7 @@ setlink(fs)
void
-usage()
+usage(void)
{
(void)fprintf(stderr,
"usage: %s [-R [-H | -L | -P]] [-fip] src target\n", __progname);