From c135b3a247af3b4494dfd20675b080a4292fd46b Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Sun, 14 Jun 2015 17:04:44 -0500 Subject: [PATCH] wmsun: Add support for wmgeneral -geometry command line option. Also take the opportunity to fit -td option's help text on one line. --- wmsun/wmSun.1 | 6 ++++-- wmsun/wmSun.c | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/wmsun/wmSun.1 b/wmsun/wmSun.1 index 1256f8a..95b5ba5 100644 --- a/wmsun/wmSun.1 +++ b/wmsun/wmSun.1 @@ -2,8 +2,7 @@ .SH NAME WMSUN \- Dockable WindowMaker SunRise/SunSet App .SH SYNOPSIS -.B wmSun -[-h] [-display ] [-lat ] [-lon ] [-td ] [-date ] +.B wmSun [OPTIONS] .SH DESCRIPTION .PP wmSun displays the current day's Sun Rise and Set Times. You must enter your @@ -16,6 +15,9 @@ Display list of command-line options. .B \-display Use an alternate X Display. .TP +.B \-geometry +Set window geometry. +.TP .B \-lat Set latitude of observer. .TP diff --git a/wmsun/wmSun.c b/wmsun/wmSun.c index 5e5c185..249eb3c 100644 --- a/wmsun/wmSun.c +++ b/wmsun/wmSun.c @@ -325,6 +325,10 @@ void ParseCMDLine(int argc, char *argv[]) { ++i; + } else if (!strcmp(argv[i], "-geometry")){ + + ++i; + } else if (!strcmp(argv[i], "-lat")){ Glat = atof(argv[++i]); @@ -347,9 +351,10 @@ void ParseCMDLine(int argc, char *argv[]) { printf("\nwmSun version: %s\n", WMSUN_VERSION); printf("\nusage: wmSun [-display ] [-lat ] [-lon ] [-h]\n\n"); printf("\t-display \tUse alternate X display.\n"); + printf("\t-geometry \tSet window geometry.\n"); printf("\t-lat \t\tObservers Latitude. Positive to the west.\n"); printf("\t-lon \tObservers Longitude.\n"); - printf("\t-td \tUser defined difference between UT an LT (hours).\n"); + printf("\t-td \tUser defined difference between UT an LT (hrs).\n"); printf("\t-h\t\t\tDisplay help screen.\n\n"); exit(1); }