aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2007-05-18 13:56:34 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2007-05-18 13:56:34 +0000
commit5b8a539965b55c11fb93bbe2cc145cc792e80e33 (patch)
tree284e0bc4a48bdaaa484fd93f62d796bf1f046d99
parent44e8bcf8575dc76411b41f685ba3fcf3e2105e60 (diff)
downloadcflow-5b8a539965b55c11fb93bbe2cc145cc792e80e33.tar.gz
cflow-5b8a539965b55c11fb93bbe2cc145cc792e80e33.tar.bz2
Add version-etc module
-rw-r--r--ChangeLog4
-rw-r--r--build-aux/gnulib.modules1
-rw-r--r--doc/cflow.texi6
-rw-r--r--lib/.cvsignore2
-rw-r--r--src/main.c15
-rw-r--r--tests/version.at6
6 files changed, 25 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index a0a5ca1..b1701af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,2 +2,6 @@
+ * build-aux/gnulib.modules: Add version-etc
+ * src/main.c, doc/cflow.texi: Remove --license option
+ * tests/version.at: Update
+
* bootstrap.conf: New file
diff --git a/build-aux/gnulib.modules b/build-aux/gnulib.modules
index 3a844de..f23e251 100644
--- a/build-aux/gnulib.modules
+++ b/build-aux/gnulib.modules
@@ -11 +11,2 @@ gettext
snprintf
+version-etc \ No newline at end of file
diff --git a/doc/cflow.texi b/doc/cflow.texi
index 0acf1d2..a62fecf 100644
--- a/doc/cflow.texi
+++ b/doc/cflow.texi
@@ -1194,8 +1194,2 @@ For more information, @xref{Symbols}.
-@cindex @option{-L}
-@cindex @option{--license}
-@item -L
-@itemx --license
- Print license and exit.
-
@cindex @option{-l}
diff --git a/lib/.cvsignore b/lib/.cvsignore
index 410c714..d63cbed 100644
--- a/lib/.cvsignore
+++ b/lib/.cvsignore
@@ -76,2 +76,4 @@ vasnprintf.c
vasnprintf.h
+version-etc.c
+version-etc.h
vsnprintf.c
diff --git a/src/main.c b/src/main.c
index 78f615d..96d6aad 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,2 +22,3 @@
#include <parser.h>
+#include <version-etc.h>
@@ -749,2 +750,15 @@ init()
+const char version_etc_copyright[] =
+ /* Do *not* mark this string for translation. %s is a copyright
+ symbol suitable for this locale, and %d is the copyright
+ year. */
+ "Copyright %s 2005, 2006, %d Sergey Poznyakoff";
+
+static void
+cflow_version(FILE *stream, struct argp_state *state)
+{
+ version_etc(stream, "cflow", PACKAGE_NAME, PACKAGE_VERSION,
+ "Sergey Poznyakoff", NULL);
+}
+
int
@@ -755,2 +769,3 @@ main(int argc, char **argv)
program_name = argv[0]; /* Until gnulib provides a better way */
+ argp_program_version_hook = cflow_version;
diff --git a/tests/version.at b/tests/version.at
index 4910be5..f75923f 100644
--- a/tests/version.at
+++ b/tests/version.at
@@ -1,3 +1,3 @@
# This file is part of GNU cflow testsuite. -*- Autotest -*-
-# Copyright (C) 2005 Sergey Poznyakoff
+# Copyright (C) 2005, 2007 Sergey Poznyakoff
#
@@ -21,5 +21,5 @@ AT_KEYWORDS([version])
-AT_CHECK([cflow --version],
+AT_CHECK([cflow --version | sed 1q],
[0],
- [cflow (AT_PACKAGE_NAME) AT_PACKAGE_VERSION
+ [AT_PACKAGE_TARNAME (AT_PACKAGE_NAME) AT_PACKAGE_VERSION
],

Return to:

Send suggestions and report system problems to the System administrator.