aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,8 +1,12 @@
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
* po/Makevars: Remove automatically generated file
* src/main.c: Remove #include <strndup.h>
* po/da.po, po/pl.po, po/uk.po, po/vi.po: Removed. Translations
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
@@ -6,6 +6,7 @@ obstack
lstat
malloc
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
@@ -1189,18 +1189,12 @@ include in the output. Valid @var{spec} symbols are:
@item x
All data symbols, both external and static.
@end table
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}.
@cindex @option{--level-indent}
@item --level-indent=@var{string}
diff --git a/lib/.cvsignore b/lib/.cvsignore
index 410c714..d63cbed 100644
--- a/lib/.cvsignore
+++ b/lib/.cvsignore
@@ -71,12 +71,14 @@ sys_stat_.h
sysexits.h
sysexits_.h
unistd.h
unistd_.h
vasnprintf.c
vasnprintf.h
+version-etc.c
+version-etc.h
vsnprintf.c
wchar.h
wchar_.h
xalloc-die.c
xalloc.h
xmalloc.c
diff --git a/src/main.c b/src/main.c
index 78f615d..96d6aad 100644
--- a/src/main.c
+++ b/src/main.c
@@ -17,12 +17,13 @@
MA 02110-1301 USA */
#include <cflow.h>
#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 ">";
static char doc[] = N_("generate a program flowgraph")
"\v"
N_("* The effect of each option marked with an asterisk is reversed if the option's long name is prefixed with `no-'. For example, --no-cpp cancels --cpp.");
@@ -744,18 +745,32 @@ init()
level_end[1] = "";
init_lex(debug > 1);
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);
textdomain(PACKAGE);
register_output("gnu", gnu_output_handler, NULL);
diff --git a/tests/version.at b/tests/version.at
index 4910be5..f75923f 100644
--- a/tests/version.at
+++ b/tests/version.at
@@ -1,8 +1,8 @@
# 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
# published by the Free Software Foundation; either version 2, or (at
# your option) any later version.
#
@@ -16,15 +16,15 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
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
],
[],
[
echo '=============================================================='
echo 'WARNING: Not using the proper version, *all* checks dubious...'
echo '=============================================================='

Return to:

Send suggestions and report system problems to the System administrator.