summaryrefslogtreecommitdiffstats
path: root/bin/cp/cp.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-02-02 06:15:22 +0000
committerimp <imp@FreeBSD.org>2002-02-02 06:15:22 +0000
commit41e5cc1a95a5bfa252a69404fcb3cd5e9eaec898 (patch)
tree6322786c2b91ab96c1f709f394e8db65851d90b8 /bin/cp/cp.c
parentef44ec93a71d6f956cf008bf3f58ad2fc4623a4f (diff)
downloadFreeBSD-src-41e5cc1a95a5bfa252a69404fcb3cd5e9eaec898.zip
FreeBSD-src-41e5cc1a95a5bfa252a69404fcb3cd5e9eaec898.tar.gz
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)
Diffstat (limited to 'bin/cp/cp.c')
-rw-r--r--bin/cp/cp.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c
index 19faa28..0aede8b 100644
--- a/bin/cp/cp.c
+++ b/bin/cp/cp.c
@@ -88,13 +88,11 @@ int Rflag, iflag, pflag, rflag, fflag, vflag;
enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE };
-int copy __P((char *[], enum op, int));
-int mastercmp __P((const FTSENT **, const FTSENT **));
+int copy(char *[], enum op, int);
+int mastercmp(const FTSENT **, const FTSENT **);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
struct stat to_stat, tmp_stat;
enum op type;
@@ -238,10 +236,7 @@ main(argc, argv)
}
int
-copy(argv, type, fts_options)
- char *argv[];
- enum op type;
- int fts_options;
+copy(char *argv[], enum op type, int fts_options)
{
struct stat to_stat;
FTS *ftsp;
@@ -460,8 +455,7 @@ copy(argv, type, fts_options)
* files first reduces seeking.
*/
int
-mastercmp(a, b)
- const FTSENT **a, **b;
+mastercmp(const FTSENT **a, const FTSENT **b)
{
int a_info, b_info;
OpenPOWER on IntegriCloud