diff options
author | Warner Losh <imp@FreeBSD.org> | 2002-02-02 06:15:22 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2002-02-02 06:15:22 +0000 |
commit | 5dce647c1b3b206238c72385c0b16f62e508ec30 (patch) | |
tree | 6322786c2b91ab96c1f709f394e8db65851d90b8 /bin/chmod/chmod.c | |
parent | 78a3801de3d58c7b3b78f98bf3e3014c10eab0a6 (diff) | |
download | src-5dce647c1b3b206238c72385c0b16f62e508ec30.tar.gz src-5dce647c1b3b206238c72385c0b16f62e508ec30.zip |
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)
Notes
Notes:
svn path=/head/; revision=90107
Diffstat (limited to 'bin/chmod/chmod.c')
-rw-r--r-- | bin/chmod/chmod.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c index 83a31c7d92fc..295e21040610 100644 --- a/bin/chmod/chmod.c +++ b/bin/chmod/chmod.c @@ -57,13 +57,11 @@ static const char rcsid[] = #include <string.h> #include <unistd.h> -int main __P((int, char *[])); -void usage __P((void)); +int main(int, char *[]); +void usage(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { FTS *ftsp; FTSENT *p; @@ -74,7 +72,7 @@ main(argc, argv) int vflag; char *ep, *mode; int newmode; - int (*change_mode) __P((const char *, mode_t)); + int (*change_mode)(const char *, mode_t); set = NULL; omode = 0; @@ -222,7 +220,7 @@ done: argv += optind; } void -usage() +usage(void) { (void)fprintf(stderr, "usage: chmod [-fhv] [-R [-H | -L | -P]] mode file ...\n"); |