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/rm | |
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/rm')
-rw-r--r-- | bin/rm/rm.c | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/bin/rm/rm.c b/bin/rm/rm.c index 997d41a..eee4135 100644 --- a/bin/rm/rm.c +++ b/bin/rm/rm.c @@ -63,13 +63,12 @@ static const char rcsid[] = int dflag, eval, fflag, iflag, Pflag, vflag, Wflag, stdin_ok; uid_t uid; -int check __P((char *, char *, struct stat *)); -void checkdot __P((char **)); -void rm_file __P((char **)); -void rm_overwrite __P((char *, struct stat *)); -void rm_tree __P((char **)); -void usage __P((void)); -int main __P((int argc, char *argv[])); +int check(char *, char *, struct stat *); +void checkdot(char **); +void rm_file(char **); +void rm_overwrite(char *, struct stat *); +void rm_tree(char **); +void usage(void); /* * rm -- @@ -79,9 +78,7 @@ int main __P((int argc, char *argv[])); * file removal. */ int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch, rflag; char *p; @@ -158,8 +155,7 @@ main(argc, argv) } void -rm_tree(argv) - char **argv; +rm_tree(char **argv) { FTS *fts; FTSENT *p; @@ -290,8 +286,7 @@ err: } void -rm_file(argv) - char **argv; +rm_file(char **argv) { struct stat sb; int rval; @@ -363,9 +358,7 @@ rm_file(argv) * kernel support. */ void -rm_overwrite(file, sbp) - char *file; - struct stat *sbp; +rm_overwrite(char *file, struct stat *sbp) { struct stat sb; struct statfs fsb; @@ -417,9 +410,7 @@ err: eval = 1; int -check(path, name, sp) - char *path, *name; - struct stat *sp; +check(char *path, char *name, struct stat *sp) { int ch, first; char modep[15], *flagsp; @@ -460,8 +451,7 @@ check(path, name, sp) #define ISDOT(a) ((a)[0] == '.' && (!(a)[1] || ((a)[1] == '.' && !(a)[2]))) void -checkdot(argv) - char **argv; +checkdot(char **argv) { char *p, **save, **t; int complained; @@ -485,7 +475,7 @@ checkdot(argv) } void -usage() +usage(void) { (void)fprintf(stderr, "%s\n%s\n", |