From: Keith Bostic Date: Fri, 1 Jul 1988 02:46:58 +0000 (-0800) Subject: rewritten from manual page; add Berkeley specific header X-Git-Tag: BSD-4_3_Net_1-Snapshot-Development~1393 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/0186c796cae37a384e363e98c02dc55934c514df rewritten from manual page; add Berkeley specific header SCCS-vsn: usr.sbin/accton/accton.c 4.2 --- diff --git a/usr/src/usr.sbin/accton/accton.c b/usr/src/usr.sbin/accton/accton.c index a72dab1599..ec5e3f8699 100644 --- a/usr/src/usr.sbin/accton/accton.c +++ b/usr/src/usr.sbin/accton/accton.c @@ -1,13 +1,41 @@ -static char *sccsid = "@(#)accton.c 4.1 (Berkeley) %G%"; +/* + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#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.2 (Berkeley) %G%"; +#endif /* not lint */ + +#include + 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); }