[Pkg-wmaker-commits] [wmforecast] 07/10: wmforecast.c: Print -help text when invalid command line option given.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 17 11:20:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch upstream
in repository wmforecast.
commit b7648f13d47924e3d8e6581c83a8f2868d96c07c
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Wed Oct 29 12:53:54 2014 -0500
wmforecast.c: Print -help text when invalid command line option given.
---
wmforecast.c | 50 +++++++++++++++++++++++---------------------------
1 file changed, 23 insertions(+), 27 deletions(-)
diff --git a/wmforecast.c b/wmforecast.c
index 4331665..c43caf0 100755
--- a/wmforecast.c
+++ b/wmforecast.c
@@ -617,31 +617,6 @@ Preferences *setPreferences(int argc, char **argv)
, PACKAGE_STRING);
exit(0);
- case 'h':
- printf("a weather dockapp for Window Maker using the Yahoo Weather API\n\n"
- "Usage: wmforecast [OPTIONS]\n\n"
- "Options:\n"
- " -v, --version print the version number\n"
- " -h, --help print this help screen\n"
- " -i, --interval <min> number of minutes between refreshes (default 60)\n"
- " -u, --units <c|f> whether to use Celsius or Fahrenheit (default f)\n"
- " -w, --woeid <woeid> Where on Earth ID (default is 2502265 for\n"
- " Sunnyvale, CA -- to find your WOEID, search\n"
- " for your city at http://weather.yahoo.com and\n"
- " look in the URL.)\n"
- " -z, --zip <zip> ZIP code or Location ID (Yahoo has deprecated this\n"
- " option and it is not guaranteed to work)\n"
- "Notes:\n"
- "* double click the icon at any time to refresh data\n\n"
- "* right click the icon to edit your preferences in a GUI\n\n"
- "* preferences may be manually configured in\n"
- " XDG_CONFIG_DIR/wmforecast/wmforecastrc\n\n"
- "Report bugs to %s\n",
- PACKAGE_BUGREPORT
- );
-
- exit(0);
-
case 'w':
prefs->woeid_or_zip = "w";
prefs->woeid = optarg;
@@ -665,8 +640,29 @@ Preferences *setPreferences(int argc, char **argv)
break;
case '?':
- /* getopt_long already printed an error message. */
- break;
+ case 'h':
+ printf("a weather dockapp for Window Maker using the Yahoo Weather API\n\n"
+ "Usage: wmforecast [OPTIONS]\n\n"
+ "Options:\n"
+ " -v, --version print the version number\n"
+ " -h, --help print this help screen\n"
+ " -i, --interval <min> number of minutes between refreshes (default 60)\n"
+ " -u, --units <c|f> whether to use Celsius or Fahrenheit (default f)\n"
+ " -w, --woeid <woeid> Where on Earth ID (default is 2502265 for\n"
+ " Sunnyvale, CA -- to find your WOEID, search\n"
+ " for your city at http://weather.yahoo.com and\n"
+ " look in the URL.)\n"
+ " -z, --zip <zip> ZIP code or Location ID (Yahoo has deprecated this\n"
+ " option and it is not guaranteed to work)\n"
+ "Notes:\n"
+ "* double click the icon at any time to refresh data\n\n"
+ "* right click the icon to edit your preferences in a GUI\n\n"
+ "* preferences may be manually configured in\n"
+ " XDG_CONFIG_DIR/wmforecast/wmforecastrc\n\n"
+ "Report bugs to %s\n",
+ PACKAGE_BUGREPORT
+ );
+ exit(0);
default:
abort ();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmforecast.git
More information about the Pkg-wmaker-commits
mailing list