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 /src | |
parent | 44e8bcf8575dc76411b41f685ba3fcf3e2105e60 (diff) | |
download | cflow-5b8a539965b55c11fb93bbe2cc145cc792e80e33.tar.gz cflow-5b8a539965b55c11fb93bbe2cc145cc792e80e33.tar.bz2 |
Add version-etc module
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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); |