From 4f1f1158aeb4498425b9345555a4b057329c092c Mon Sep 17 00:00:00 2001 From: Richard Gowers Date: Thu, 27 Dec 2018 12:37:55 -0600 Subject: [PATCH] added version string cli (#22) * added version string * fixed version string printing --- tightbind/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tightbind/main.c b/tightbind/main.c index 3e2c6d0e..e44c3d72 100644 --- a/tightbind/main.c +++ b/tightbind/main.c @@ -105,6 +105,11 @@ char test_string[80]; // argc = ccommand(&argv); #endif + if( argc == 2 && strcmp(argv[1], "-v") == 0){ + fprintf(stdout, "version: %s\n", VERSION_STRING); + exit(0); + } + /* make sure the program was called with the right arguments */ if( argc < 2){ fprintf(stderr,"Usage: bind [paramfile]\n");