summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-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
@@ -1,5 +1,9 @@
2007-05-18 Sergey Poznyakoff <gray@gnu.org.ua>
+ * build-aux/gnulib.modules: Add version-etc
+ * src/main.c, doc/cflow.texi: Remove --license option
+ * tests/version.at: Update
+
* bootstrap.conf: New file
* build-aux/bootstrap: Replaced from the gnulib CVS
* configure.ac: Update
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
@@ -9,3 +9,4 @@ error
hash
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
@@ -1192,12 +1192,6 @@ include in the output. Valid @var{spec} symbols are:
For more information, @xref{Symbols}.
-@cindex @option{-L}
-@cindex @option{--license}
-@item -L
-@itemx --license
- Print license and exit.
-
@cindex @option{-l}
@item -l
@xref{--print-level}.
diff --git a/lib/.cvsignore b/lib/.cvsignore
index 410c714..d63cbed 100644
--- a/lib/.cvsignore
+++ b/lib/.cvsignore
@@ -74,6 +74,8 @@ unistd.h
unistd_.h
vasnprintf.c
vasnprintf.h
+version-etc.c
+version-etc.h
vsnprintf.c
wchar.h
wchar_.h
diff --git a/src/main.c b/src/main.c
index 78f615d..96d6aad 100644
--- a/src/main.c
+++ b/src/main.c
@@ -20,6 +20,7 @@
#include <argp.h>
#include <stdarg.h>
#include <parser.h>
+#include <version-etc.h>
const char *argp_program_version = "cflow (" PACKAGE_NAME ") " VERSION;
const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">";
@@ -747,12 +748,26 @@ init()
init_parse();
}
+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
main(int argc, char **argv)
{
int index;
program_name = argv[0]; /* Until gnulib provides a better way */
+ argp_program_version_hook = cflow_version;
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
diff --git a/tests/version.at b/tests/version.at
index 4910be5..f75923f 100644
--- a/tests/version.at
+++ b/tests/version.at
@@ -1,5 +1,5 @@
# This file is part of GNU cflow testsuite. -*- Autotest -*-
-# Copyright (C) 2005 Sergey Poznyakoff
+# Copyright (C) 2005, 2007 Sergey Poznyakoff
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -19,9 +19,9 @@
AT_SETUP([cflow version])
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.