summaryrefslogtreecommitdiffstats
path: root/usr.bin/calendar/io.c
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2011-11-09 01:40:46 +0000
committergrog <grog@FreeBSD.org>2011-11-09 01:40:46 +0000
commitf6a5c05b52acccfb6c59d43c00c055a2100f5004 (patch)
treeb3b50b309e7dbbf99e1b2d7e0f5961eeab1f1f03 /usr.bin/calendar/io.c
parent91e70324c8742bc6ba8e92c469508daebe32f7da (diff)
downloadFreeBSD-src-f6a5c05b52acccfb6c59d43c00c055a2100f5004.zip
FreeBSD-src-f6a5c05b52acccfb6c59d43c00c055a2100f5004.tar.gz
Tidy up command line processing:
- Add ? option to optstring. - Sort options alphabetically. - Vertical space. Tidy up usage() function. Bring man page in sync with source. Ensure that debug code is only executed with the -d option. Submitted by: Christiane Yeardley
Diffstat (limited to 'usr.bin/calendar/io.c')
-rw-r--r--usr.bin/calendar/io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c
index eb37eac..e1ed21d 100644
--- a/usr.bin/calendar/io.c
+++ b/usr.bin/calendar/io.c
@@ -176,7 +176,8 @@ cal(void)
*pp = p;
if (count < 0) {
/* Show error status based on return value */
- fprintf(stderr, "Ignored: %s\n", buf);
+ if (debug)
+ fprintf(stderr, "Ignored: %s\n", buf);
if (count == -1)
continue;
count = -count + 1;
OpenPOWER on IntegriCloud