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/mkdir/mkdir.c | |
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/mkdir/mkdir.c')
-rw-r--r-- | bin/mkdir/mkdir.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/bin/mkdir/mkdir.c b/bin/mkdir/mkdir.c index a819f76..417f7a3 100644 --- a/bin/mkdir/mkdir.c +++ b/bin/mkdir/mkdir.c @@ -57,16 +57,13 @@ static const char rcsid[] = #include <sysexits.h> #include <unistd.h> -int build __P((char *, mode_t)); -int main __P((int, char *[])); -void usage __P((void)); +int build(char *, mode_t); +void usage(void); int vflag; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch, exitval, success, omode, pflag; mode_t *set = (mode_t *)NULL; @@ -136,9 +133,7 @@ main(argc, argv) } int -build(path, omode) - char *path; - mode_t omode; +build(char *path, mode_t omode) { struct stat sb; mode_t numask, oumask; @@ -206,7 +201,7 @@ build(path, omode) } void -usage() +usage(void) { (void)fprintf(stderr, "usage: mkdir [-pv] [-m mode] directory ...\n"); |