summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2011-07-31 17:09:34 +0000
committerAdrian Thurston <thurston@complang.org>2011-07-31 17:09:34 +0000
commit2d9de231642e804fec715c26b95e5c88a0981477 (patch)
tree299b51a018cfaacdcd5bebde39de0ddb624d4dc1
parent7c0b3deac8a3459b9cf49c01c8427f24cff2cf82 (diff)
downloadcolm-2d9de231642e804fec715c26b95e5c88a0981477.tar.gz
The -v option now prints the version and exits.
refs #309
-rw-r--r--colm/main.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/colm/main.cc b/colm/main.cc
index e2fe0faf..6b5e347b 100644
--- a/colm/main.cc
+++ b/colm/main.cc
@@ -152,10 +152,10 @@ void usage()
"usage: colm [options] file\n"
"general:\n"
" -h, -H, -?, --help print this usage and exit\n"
-" --version print version information and exit\n"
+" -v --version print version information and exit\n"
" -o <file> write output to <file>\n"
" -i show conflict information\n"
-" -v make colm verbose\n"
+" -d make colm verbose\n"
" -l compile logging into the output executable\n"
;
}
@@ -366,6 +366,10 @@ void process_args( int argc, const char **argv )
includePaths.append( pc.parameterArg );
break;
case 'v':
+ version();
+ exit(0);
+ break;
+ case 'd':
verbose = true;
break;
case 'l':