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/ln/ln.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/ln/ln.c')
-rw-r--r-- | bin/ln/ln.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/bin/ln/ln.c b/bin/ln/ln.c index 4e514d7..c3ce1d0 100644 --- a/bin/ln/ln.c +++ b/bin/ln/ln.c @@ -62,17 +62,14 @@ int iflag; /* Interactive mode. */ int sflag; /* Symbolic, not hard, link. */ int vflag; /* Verbose output. */ /* System link call. */ -int (*linkf) __P((const char *, const char *)); +int (*linkf)(const char *, const char *); char linkch; -int linkit __P((const char *, const char *, int)); -int main __P((int, char *[])); -void usage __P((void)); +int linkit(const char *, const char *, int); +void usage(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct stat sb; char *p, *sourcedir; @@ -155,9 +152,7 @@ main(argc, argv) } int -linkit(target, source, isdir) - const char *target, *source; - int isdir; +linkit(const char *target, const char *source, int isdir) { struct stat sb; const char *p; @@ -232,7 +227,7 @@ linkit(target, source, isdir) } void -usage() +usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n", "usage: ln [-fhinsv] file1 file2", |