From 3d61ea5d1b10bcfcf3704de0f5251d6dbb17a4f4 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 15 Sep 1996 09:28:14 +0000 Subject: [PATCH] print debugging flags in usage(); idea from freebsd --- usr.sbin/cron/cron.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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); } -- 2.20.1