wmsun: Add support for wmgeneral -geometry command line option.

Also take the opportunity to fit -td option's help text on one line.
This commit is contained in:
Doug Torrance 2015-06-14 17:04:44 -05:00 committed by Carlos R. Mafra
parent f886377b0f
commit c135b3a247
2 changed files with 10 additions and 3 deletions

View file

@ -2,8 +2,7 @@
.SH NAME .SH NAME
WMSUN \- Dockable WindowMaker SunRise/SunSet App WMSUN \- Dockable WindowMaker SunRise/SunSet App
.SH SYNOPSIS .SH SYNOPSIS
.B wmSun .B wmSun [OPTIONS]
[-h] [-display <Display>] [-lat <Latitude>] [-lon <Longitude>] [-td <TimeDiff>] [-date <yyyymmdd>]
.SH DESCRIPTION .SH DESCRIPTION
.PP .PP
wmSun displays the current day's Sun Rise and Set Times. You must enter your 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 <display> .B \-display <display>
Use an alternate X Display. Use an alternate X Display.
.TP .TP
.B \-geometry <geometry>
Set window geometry.
.TP
.B \-lat <Latitude> .B \-lat <Latitude>
Set latitude of observer. Set latitude of observer.
.TP .TP

View file

@ -325,6 +325,10 @@ void ParseCMDLine(int argc, char *argv[]) {
++i; ++i;
} else if (!strcmp(argv[i], "-geometry")){
++i;
} else if (!strcmp(argv[i], "-lat")){ } else if (!strcmp(argv[i], "-lat")){
Glat = atof(argv[++i]); Glat = atof(argv[++i]);
@ -347,9 +351,10 @@ void ParseCMDLine(int argc, char *argv[]) {
printf("\nwmSun version: %s\n", WMSUN_VERSION); printf("\nwmSun version: %s\n", WMSUN_VERSION);
printf("\nusage: wmSun [-display <Display>] [-lat <Latitude>] [-lon <Longitude>] [-h]\n\n"); printf("\nusage: wmSun [-display <Display>] [-lat <Latitude>] [-lon <Longitude>] [-h]\n\n");
printf("\t-display <Display>\tUse alternate X display.\n"); printf("\t-display <Display>\tUse alternate X display.\n");
printf("\t-geometry <Geometry>\tSet window geometry.\n");
printf("\t-lat <Latitude>\t\tObservers Latitude. Positive to the west.\n"); printf("\t-lat <Latitude>\t\tObservers Latitude. Positive to the west.\n");
printf("\t-lon <Longitude>\tObservers Longitude.\n"); printf("\t-lon <Longitude>\tObservers Longitude.\n");
printf("\t-td <Delta Time>\tUser defined difference between UT an LT (hours).\n"); printf("\t-td <Delta Time>\tUser defined difference between UT an LT (hrs).\n");
printf("\t-h\t\t\tDisplay help screen.\n\n"); printf("\t-h\t\t\tDisplay help screen.\n\n");
exit(1); exit(1);
} }