summaryrefslogtreecommitdiffabout
path: root/src/main.c
authorSergey Poznyakoff <gray@gnu.org.ua>2009-06-28 11:44:29 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2009-06-28 11:44:29 (GMT)
commit4b66e93d434d2a4fe8fd3f277e222de768475605 (patch) (side-by-side diff)
treed8e7eba5366ea9356aa1f4ba19f0cf8df5dfc349 /src/main.c
parentd80d146b2c78a9ea114748129cde0fae017bbfbc (diff)
downloadcflow-4b66e93d434d2a4fe8fd3f277e222de768475605.tar.gz
cflow-4b66e93d434d2a4fe8fd3f277e222de768475605.tar.bz2
Minor changes.
* Makefile.am: Improve ChangeLog rule * configure.ac: Remove AH_BOTTOM * gnulib.modules: Add argp-version-etc, progname. Remove version-etc. * src/main.c: Use argp-version-etc
Diffstat (limited to 'src/main.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/main.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/main.c b/src/main.c
index 5ad565a..cbb472e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -18,15 +18,20 @@
#include <cflow.h>
#include <argp.h>
+#include <argp-version-etc.h>
+#include <progname.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.");
+const char *program_authors[] = {
+ "Sergey Poznyakoff",
+ NULL
+};
enum option_code {
OPT_DEFINES = 256,
@@ -732,20 +737,13 @@ const char version_etc_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;
+ set_program_name(argv[0]);
+ argp_version_setup("cflow", program_authors);
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);

Return to:

Send suggestions and report system problems to the System administrator.