diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-05-18 13:56:34 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-05-18 13:56:34 +0000 |
commit | 5b8a539965b55c11fb93bbe2cc145cc792e80e33 (patch) | |
tree | 284e0bc4a48bdaaa484fd93f62d796bf1f046d99 | |
parent | 44e8bcf8575dc76411b41f685ba3fcf3e2105e60 (diff) | |
download | cflow-5b8a539965b55c11fb93bbe2cc145cc792e80e33.tar.gz cflow-5b8a539965b55c11fb93bbe2cc145cc792e80e33.tar.bz2 |
Add version-etc module
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | build-aux/gnulib.modules | 1 | ||||
-rw-r--r-- | doc/cflow.texi | 6 | ||||
-rw-r--r-- | lib/.cvsignore | 2 | ||||
-rw-r--r-- | src/main.c | 15 | ||||
-rw-r--r-- | tests/version.at | 6 |
6 files changed, 25 insertions, 9 deletions
@@ -1,5 +1,9 @@ | |||
1 | 2007-05-18 Sergey Poznyakoff <gray@gnu.org.ua> | 1 | 2007-05-18 Sergey Poznyakoff <gray@gnu.org.ua> |
2 | 2 | ||
3 | * build-aux/gnulib.modules: Add version-etc | ||
4 | * src/main.c, doc/cflow.texi: Remove --license option | ||
5 | * tests/version.at: Update | ||
6 | |||
3 | * bootstrap.conf: New file | 7 | * bootstrap.conf: New file |
4 | * build-aux/bootstrap: Replaced from the gnulib CVS | 8 | * build-aux/bootstrap: Replaced from the gnulib CVS |
5 | * configure.ac: Update | 9 | * 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 | |||
9 | hash | 9 | hash |
10 | gettext | 10 | gettext |
11 | snprintf | 11 | snprintf |
12 | 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: | |||
1192 | 1192 | ||
1193 | For more information, @xref{Symbols}. | 1193 | For more information, @xref{Symbols}. |
1194 | 1194 | ||
1195 | @cindex @option{-L} | ||
1196 | @cindex @option{--license} | ||
1197 | @item -L | ||
1198 | @itemx --license | ||
1199 | Print license and exit. | ||
1200 | |||
1201 | @cindex @option{-l} | 1195 | @cindex @option{-l} |
1202 | @item -l | 1196 | @item -l |
1203 | @xref{--print-level}. | 1197 | @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 | |||
74 | unistd_.h | 74 | unistd_.h |
75 | vasnprintf.c | 75 | vasnprintf.c |
76 | vasnprintf.h | 76 | vasnprintf.h |
77 | version-etc.c | ||
78 | version-etc.h | ||
77 | vsnprintf.c | 79 | vsnprintf.c |
78 | wchar.h | 80 | wchar.h |
79 | wchar_.h | 81 | wchar_.h |
@@ -20,6 +20,7 @@ | |||
20 | #include <argp.h> | 20 | #include <argp.h> |
21 | #include <stdarg.h> | 21 | #include <stdarg.h> |
22 | #include <parser.h> | 22 | #include <parser.h> |
23 | #include <version-etc.h> | ||
23 | 24 | ||
24 | const char *argp_program_version = "cflow (" PACKAGE_NAME ") " VERSION; | 25 | const char *argp_program_version = "cflow (" PACKAGE_NAME ") " VERSION; |
25 | const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; | 26 | const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; |
@@ -747,12 +748,26 @@ init() | |||
747 | init_parse(); | 748 | init_parse(); |
748 | } | 749 | } |
749 | 750 | ||
751 | const char version_etc_copyright[] = | ||
752 | /* Do *not* mark this string for translation. %s is a copyright | ||
753 | symbol suitable for this locale, and %d is the copyright | ||
754 | year. */ | ||
755 | "Copyright %s 2005, 2006, %d Sergey Poznyakoff"; | ||
756 | |||
757 | static void | ||
758 | cflow_version(FILE *stream, struct argp_state *state) | ||
759 | { | ||
760 | version_etc(stream, "cflow", PACKAGE_NAME, PACKAGE_VERSION, | ||
761 | "Sergey Poznyakoff", NULL); | ||
762 | } | ||
763 | |||
750 | int | 764 | int |
751 | main(int argc, char **argv) | 765 | main(int argc, char **argv) |
752 | { | 766 | { |
753 | int index; | 767 | int index; |
754 | 768 | ||
755 | program_name = argv[0]; /* Until gnulib provides a better way */ | 769 | program_name = argv[0]; /* Until gnulib provides a better way */ |
770 | argp_program_version_hook = cflow_version; | ||
756 | 771 | ||
757 | setlocale(LC_ALL, ""); | 772 | setlocale(LC_ALL, ""); |
758 | bindtextdomain(PACKAGE, LOCALEDIR); | 773 | 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 @@ | |||
1 | # This file is part of GNU cflow testsuite. -*- Autotest -*- | 1 | # This file is part of GNU cflow testsuite. -*- Autotest -*- |
2 | # Copyright (C) 2005 Sergey Poznyakoff | 2 | # Copyright (C) 2005, 2007 Sergey Poznyakoff |
3 | # | 3 | # |
4 | # This program is free software; you can redistribute it and/or | 4 | # This program is free software; you can redistribute it and/or |
5 | # modify it under the terms of the GNU General Public License as | 5 | # modify it under the terms of the GNU General Public License as |
@@ -19,9 +19,9 @@ | |||
19 | AT_SETUP([cflow version]) | 19 | AT_SETUP([cflow version]) |
20 | AT_KEYWORDS([version]) | 20 | AT_KEYWORDS([version]) |
21 | 21 | ||
22 | AT_CHECK([cflow --version], | 22 | AT_CHECK([cflow --version | sed 1q], |
23 | [0], | 23 | [0], |
24 | [cflow (AT_PACKAGE_NAME) AT_PACKAGE_VERSION | 24 | [AT_PACKAGE_TARNAME (AT_PACKAGE_NAME) AT_PACKAGE_VERSION |
25 | ], | 25 | ], |
26 | [], | 26 | [], |
27 | [ | 27 | [ |