diff options
author | imp <imp@FreeBSD.org> | 2002-02-02 06:15:22 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-02-02 06:15:22 +0000 |
commit | 41e5cc1a95a5bfa252a69404fcb3cd5e9eaec898 (patch) | |
tree | 6322786c2b91ab96c1f709f394e8db65851d90b8 /bin/cp/utils.c | |
parent | ef44ec93a71d6f956cf008bf3f58ad2fc4623a4f (diff) | |
download | FreeBSD-src-41e5cc1a95a5bfa252a69404fcb3cd5e9eaec898.zip FreeBSD-src-41e5cc1a95a5bfa252a69404fcb3cd5e9eaec898.tar.gz |
Modernization effort for bin/c*:
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
Approved by: arch@, new style(9)
Diffstat (limited to 'bin/cp/utils.c')
-rw-r--r-- | bin/cp/utils.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c index adc04a7..d6eb0b1 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -59,9 +59,7 @@ static const char rcsid[] = #include "extern.h" int -copy_file(entp, dne) - FTSENT *entp; - int dne; +copy_file(FTSENT *entp, int dne) { static char buf[MAXBSIZE]; struct stat *fs; @@ -190,9 +188,7 @@ copy_file(entp, dne) } int -copy_link(p, exists) - FTSENT *p; - int exists; +copy_link(FTSENT *p, int exists) { int len; char link[PATH_MAX]; @@ -214,9 +210,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); @@ -230,9 +224,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); @@ -249,9 +241,7 @@ copy_special(from_stat, exists) (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) int -setfile(fs, fd) - register struct stat *fs; - int fd; +setfile(struct stat *fs, int fd) { static struct timeval tv[2]; struct stat ts; @@ -308,7 +298,7 @@ setfile(fs, fd) } void -usage() +usage(void) { (void)fprintf(stderr, "%s\n%s\n", |