From 9ac87e4b580e02b3a3dfcc2bdfd9641631106037 Mon Sep 17 00:00:00 2001 From: des Date: Mon, 27 Jul 1998 16:54:05 +0000 Subject: Behave like GNU time. More cleanup. Reword man page. Pointed out by: Bruce Evans --- usr.bin/time/time.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'usr.bin/time/time.c') diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index 6aa698f..67f5e70 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)time.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: time.c,v 1.7 1998/07/24 07:19:29 phk Exp $"; + "$Id: time.c,v 1.8 1998/07/27 16:08:58 des Exp $"; #endif /* not lint */ #include @@ -78,17 +78,12 @@ main(argc, argv) char *ofn = NULL; lflag = 0; - while ((ch = getopt(argc, argv, "a:o:l")) != -1) + while ((ch = getopt(argc, argv, "lao:")) != -1) switch((char)ch) { case 'a': - if (ofn) - usage(); - ofn = optarg; aflag = 1; break; case 'o': - if (ofn) - usage(); ofn = optarg; break; case 'l': @@ -187,7 +182,7 @@ main(argc, argv) static void usage() { - fprintf(stderr, "usage: time [-l] [-{o|a} file] command\n"); + fprintf(stderr, "usage: time [-l] [-a] [-o file] command\n"); exit(EX_USAGE); } -- cgit v1.1