[Pkg-wmaker-commits] [wmfsm] 29/83: wmfsm: Impove version number handling.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Sun Aug 23 14:05:44 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmfsm.
commit 75fc2acf0f5ed4a330297b7eb08cff8fc8b37b2b
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Thu Jan 22 00:22:15 2015 -0600
wmfsm: Impove version number handling.
In particular,
- Add new --version command line option. (This was already documented in
the manpage.) Remove this information from the --help text. Also took
the opportunity to properly align the --fire line in the --help text.
- Remove WMFSM_VERSION macro in favor of PACKAGE_VERSION from autconf.
- Remove hard-coded version number at top of source file for
maintainability.
---
wmfsm/wmfsm.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/wmfsm/wmfsm.c b/wmfsm/wmfsm.c
index 9f57aae..1eb5185 100644
--- a/wmfsm/wmfsm.c
+++ b/wmfsm/wmfsm.c
@@ -1,6 +1,6 @@
/*
*
- * wmfsm-0.33 (C) 1999 Stefan Eilemann (Stefan.Eilemann at dlr.de)
+ * wmfsm (C) 1999 Stefan Eilemann (Stefan.Eilemann at dlr.de)
*
* - Shows file system usage ala mfsm
*
@@ -100,7 +100,6 @@
* coz irix has max of 100000L :(.
*/
#define DELAY_10 99999L
-#define WMFSM_VERSION "0.33"
#define LENMP 5 /*max 10, number char for mountpoint */
/*modes for drawing*/
@@ -418,10 +417,11 @@ ParseCMDLine(int argc, char *argv[])
{"delay", required_argument, 0, 'd'},
{"appearance", required_argument, 0, 'a'},
{"help", no_argument, 0, 'h'},
+ {"version", no_argument, 0, 'v'},
{0, 0, 0, 0}
};
while (1) {
- c = getopt_long(argc, argv, "a:bd:fhn", long_options, &option_index);
+ c = getopt_long(argc, argv, "a:bd:fhnv", long_options, &option_index);
if (c == -1)
break;
switch (c) {
@@ -445,6 +445,9 @@ ParseCMDLine(int argc, char *argv[])
case 'n':
mode = NORMAL;
break;
+ case 'v':
+ printf("wmfsm version: %s\n", PACKAGE_VERSION);
+ exit(0);
case '?':
break;
default:
@@ -459,10 +462,9 @@ void
print_usage()
{
- printf("\nwmfsm version: %s\n", WMFSM_VERSION);
- printf("\nusage: wmfsm \n");
+ printf("usage: wmfsm \n");
printf("\t--normal, -n\t\tDraw bars in normal mode.\n");
- printf("\t--fire, -f\t\t\tDraw bars in fire mode.\n");
+ printf("\t--fire, -f\t\tDraw bars in fire mode.\n");
printf("\t--[no]blink\t\tBlinks if a filesystem is 95 percent full.\n");
printf("\t-display <Display>\tUse alternate X display.\n");
printf("\t--delay <number>, -d\tUse a delay that is not the default.\n");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmfsm.git
More information about the Pkg-wmaker-commits
mailing list