From 875cad8234a6fcbbe90686d10f135ad029ff8206 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 10 Nov 2013 22:17:05 +0100 Subject: stack: Add basic argp version and bug definitions. Signed-off-by: Mark Wielaard --- src/stack.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/stack.c') diff --git a/src/stack.c b/src/stack.c index 948325d4..f428ed08 100644 --- a/src/stack.c +++ b/src/stack.c @@ -27,6 +27,15 @@ #include #include ELFUTILS_HEADER(dwfl) +#include + +/* Name and version of program. */ +static void print_version (FILE *stream, struct argp_state *state); +ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; + +/* Bug report address. */ +ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; + static bool verbose = false; static int @@ -92,6 +101,12 @@ thread_callback (Dwfl_Thread *thread, void *thread_arg __attribute__ ((unused))) return DWARF_CB_OK; } +static void +print_version (FILE *stream, struct argp_state *state __attribute__ ((unused))) +{ + fprintf (stream, "stack (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION); +} + static error_t parse_opt (int key, char *arg __attribute__ ((unused)), struct argp_state *state) -- cgit v1.2.3