From: deraadt Date: Sun, 15 Sep 1996 09:28:14 +0000 (+0000) Subject: print debugging flags in usage(); idea from freebsd X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3d61ea5d1b10bcfcf3704de0f5251d6dbb17a4f4;p=openbsd print debugging flags in usage(); idea from freebsd --- diff --git a/usr.sbin/cron/cron.c b/usr.sbin/cron/cron.c index 0b9aac8c1ae..0a9d67616c4 100644 --- a/usr.sbin/cron/cron.c +++ b/usr.sbin/cron/cron.c @@ -16,7 +16,7 @@ */ #if !defined(lint) && !defined(LINT) -static char rcsid[] = "$Id: cron.c,v 1.1.1.1 1995/10/18 08:47:30 deraadt Exp $"; +static char rcsid[] = "$Id: cron.c,v 1.2 1996/09/15 09:28:14 deraadt Exp $"; #endif @@ -46,7 +46,12 @@ static void usage __P((void)), static void usage() { - fprintf(stderr, "usage: %s [-x debugflag[,...]]\n", ProgramName); + char **dflags; + + fprintf(stderr, "usage: %s [-x [", ProgramName); + for(dflags = DebugFlagNames; *dflags; dflags++) + fprintf(stderr, "%s%s", *dflags, dflags[1] ? "," : "]"); + fprintf(stderr, "]\n"); exit(ERROR_EXIT); }