diff options
author | imp <imp@FreeBSD.org> | 2002-02-02 06:48:10 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-02-02 06:48:10 +0000 |
commit | 50014e35418ca00d25ea852fc4f94acf80be4df3 (patch) | |
tree | f26db6e85c29b2244f601bdb366caa7f26a96c24 /bin/mv | |
parent | 3fc8df52e3856eeac730574d5ae122806dd1e1ef (diff) | |
download | FreeBSD-src-50014e35418ca00d25ea852fc4f94acf80be4df3.zip FreeBSD-src-50014e35418ca00d25ea852fc4f94acf80be4df3.tar.gz |
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.
Diffstat (limited to 'bin/mv')
-rw-r--r-- | bin/mv/mv.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c index 3c4695e..8b2ef92 100644 --- a/bin/mv/mv.c +++ b/bin/mv/mv.c @@ -68,16 +68,13 @@ static const char rcsid[] = int fflg, iflg, vflg; -int copy __P((char *, char *)); -int do_move __P((char *, char *)); -int fastcopy __P((char *, char *, struct stat *)); -int main __P((int, char *[])); -void usage __P((void)); +int copy(char *, char *); +int do_move(char *, char *); +int fastcopy(char *, char *, struct stat *); +void usage(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { register int baselen, len, rval; register char *p, *endp; @@ -151,8 +148,7 @@ main(argc, argv) } int -do_move(from, to) - char *from, *to; +do_move(char *from, char *to) { struct stat sb; int ask, ch, first; @@ -232,9 +228,7 @@ do_move(from, to) } int -fastcopy(from, to, sbp) - char *from, *to; - struct stat *sbp; +fastcopy(char *from, char *to, struct stat *sbp) { struct timeval tval[2]; static u_int blen; @@ -325,8 +319,7 @@ err: if (unlink(to)) } int -copy(from, to) - char *from, *to; +copy(char *from, char *to) { int pid, status; @@ -371,7 +364,7 @@ copy(from, to) } void -usage() +usage(void) { (void)fprintf(stderr, "%s\n%s\n", |