aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-23 02:14:46 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-23 02:14:46 -0300
commitbc23b38c32d7a38940c50abb98c8f18b439ff93e (patch)
treec21dc4ae3ffcbd6c71c79790d1f29e141e67ace7 /src/main.c
parent8d2b09e474dd0e3fdd8d3c03a0b520a398a9e82a (diff)
downloadblogc-bc23b38c32d7a38940c50abb98c8f18b439ff93e.tar.gz
blogc-bc23b38c32d7a38940c50abb98c8f18b439ff93e.tar.bz2
blogc-bc23b38c32d7a38940c50abb98c8f18b439ff93e.zip
cli: added -v
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 1966b47..634999c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -43,6 +43,7 @@ blogc_print_help(void)
"\n"
"optional arguments:\n"
" -h show this help message and exit\n"
+ " -v show version and exit\n"
" -l build listing page, from multiple source files\n"
" -t TEMPLATE template file\n"
" -o OUTPUT output file\n");
@@ -52,7 +53,7 @@ blogc_print_help(void)
static void
blogc_print_usage(void)
{
- printf("usage: blogc [-h] [-l] -t TEMPLATE [-o OUTPUT] SOURCE [SOURCE ...]\n");
+ printf("usage: blogc [-h] [-v] [-l] -t TEMPLATE [-o OUTPUT] SOURCE [SOURCE ...]\n");
}
@@ -107,6 +108,9 @@ main(int argc, char **argv)
case 'h':
blogc_print_help();
goto cleanup;
+ case 'v':
+ printf("%s\n", PACKAGE_STRING);
+ goto cleanup;
case 'l':
listing = true;
break;