changes designed so that ESIS and ARP may use routing table
[unix-history] / usr / src / usr.sbin / accton / accton.c
index a72dab1..8e20242 100644 (file)
@@ -1,13 +1,31 @@
-static char *sccsid = "@(#)accton.c    4.1 (Berkeley) %G%";
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
+ */
+
+#ifndef lint
+char copyright[] =
+"@(#) Copyright (c) 1988 Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif /* not lint */
+
+#ifndef lint
+static char sccsid[] = "@(#)accton.c   4.3 (Berkeley) %G%";
+#endif /* not lint */
+
+#include <stdio.h>
+
 main(argc, argv)
 main(argc, argv)
-char **argv;
+       int argc;
+       char **argv;
 {
 {
-       extern errno;
-       if (argc > 1)
-               acct(argv[1]);
-       else
-               acct((char *)0);
-       if (errno) {
+       if (argc > 2) {
+               fputs("usage: accton [file]\n", stderr);
+               exit(1);
+       }
+       if (acct(argc == 2 ? argv[1] : (char *)NULL)) {
                perror("accton");
                exit(1);
        }
                perror("accton");
                exit(1);
        }