summaryrefslogtreecommitdiffabout
path: root/src/main.c
Unidiff
Diffstat (limited to 'src/main.c') (more/less context) (show whitespace changes)
-rw-r--r--src/main.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 78f615d..96d6aad 100644
--- a/src/main.c
+++ b/src/main.c
@@ -17,12 +17,13 @@
17 MA 02110-1301 USA */ 17 MA 02110-1301 USA */
18 18
19#include <cflow.h> 19#include <cflow.h>
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
24const char *argp_program_version = "cflow (" PACKAGE_NAME ") " VERSION; 25const char *argp_program_version = "cflow (" PACKAGE_NAME ") " VERSION;
25const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; 26const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">";
26static char doc[] = N_("generate a program flowgraph") 27static char doc[] = N_("generate a program flowgraph")
27"\v" 28"\v"
28N_("* 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."); 29N_("* 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()
744 level_end[1] = ""; 745 level_end[1] = "";
745 746
746 init_lex(debug > 1); 747 init_lex(debug > 1);
747 init_parse(); 748 init_parse();
748} 749}
749 750
751const 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
757static void
758cflow_version(FILE *stream, struct argp_state *state)
759{
760 version_etc(stream, "cflow", PACKAGE_NAME, PACKAGE_VERSION,
761 "Sergey Poznyakoff", NULL);
762}
763
750int 764int
751main(int argc, char **argv) 765main(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);
759 textdomain(PACKAGE); 774 textdomain(PACKAGE);
760 775
761 register_output("gnu", gnu_output_handler, NULL); 776 register_output("gnu", gnu_output_handler, NULL);

Return to:

Send suggestions and report system problems to the System administrator.