File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -2320,6 +2320,9 @@ static void usage(const char *me) {
23202320 " -v\n"
23212321 " be verbose on stderr\n"
23222322 "\n"
2323+ " --version\n"
2324+ " print version\n"
2325+ "\n"
23232326 " --help\n"
23242327 " -h\n"
23252328 " print this message\n"
@@ -2358,6 +2361,19 @@ static void usage(const char *me) {
23582361 exit (1 );
23592362}
23602363
2364+
2365+ /* ----------------------------------------------------------------------------
2366+ * version()
2367+ *
2368+ * print version for the user
2369+ *
2370+ */
2371+
2372+ static void version () {
2373+ fprintf (stdout , "%s\n" , VERSION );
2374+ exit (1 );
2375+ }
2376+
23612377#define MODE_COMBINE 1
23622378#define MODE_COMPARE 2
23632379#define MODE_COMPARE_FIRST 3
@@ -2521,6 +2537,9 @@ int main(int argc, char **argv) {
25212537 strncpy(histogram_dir, argv[++i], FILENAME_MAX);
25222538 }
25232539*/
2540+ else if (!strcmp (argv [i ], "--version" )) {
2541+ version ();
2542+ }
25242543 else if (!strcmp (argv [i ], "--help" )
25252544 || !strcmp (argv [i ], "-h" )) {
25262545 usage (argv [0 ]);
You can’t perform that action at this time.
0 commit comments