From 5b8a539965b55c11fb93bbe2cc145cc792e80e33 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Fri, 18 May 2007 13:56:34 +0000 Subject: Add version-etc module --- src/main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') 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 #include #include +#include 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); -- cgit v1.2.1