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,14 +1,18 @@
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
will be exported directly from TP.
* lib/Makefile.am: New file
* lib/Makefile.tmpl: Removed
* README-hacking: New file
2006-09-11 Sergey Poznyakoff <gray@gnu.org.ua>
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
@@ -1,11 +1,12 @@
# List of gnulib modules needed for GNU mailutils.
# A module name per line. Empty lines and comments are ignored.
argp
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
@@ -1183,30 +1183,24 @@ include in the output. Valid @var{spec} symbols are:
@item s
Static symbols.
@item t
Typedefs (for cross-references only, @pxref{Cross-References}).
@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}
Use @var{string} when indenting to each new level. @xref{ASCII Tree}.
@cindex @option{-m}
@cindex @option{--main}
@item -m @var{name}
@item --main=@var{name}
diff --git a/lib/.cvsignore b/lib/.cvsignore
index 410c714..d63cbed 100644
--- a/lib/.cvsignore
+++ b/lib/.cvsignore
@@ -65,21 +65,23 @@ string_.h
stripslash.c
strncasecmp.c
strndup.c
strnlen.c
sys_stat.h
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
xsize.h
xstrndup.c
xstrndup.h
diff --git a/src/main.c b/src/main.c
index 78f615d..96d6aad 100644
--- a/src/main.c
+++ b/src/main.c
@@ -11,24 +11,25 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with GNU cflow; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
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.");
enum option_code {
OPT_DEFINES = 256,
OPT_LEVEL_INDENT,
OPT_DEBUG,
OPT_PREPROCESS,
@@ -738,30 +739,44 @@ init()
level_indent[0] = " "; /* 4 spaces */
if (level_indent[1] == NULL)
level_indent[1] = level_indent[0];
if (level_end[0] == NULL)
level_end[0] = "";
if (level_end[1] == NULL)
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);
register_output("posix", posix_output_handler, NULL);
symbol_map = SM_FUNCTIONS|SM_STATIC|SM_UNDEFINED;
if (getenv("POSIXLY_CORRECT")) {
if (select_output_driver("posix"))
diff --git a/tests/version.at b/tests/version.at
index 4910be5..f75923f 100644
--- a/tests/version.at
+++ b/tests/version.at
@@ -1,33 +1,33 @@
# 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.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# 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 '=============================================================='
])
AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.