aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormutantturkey <mutantturke@gmail.com>2013-03-05 09:27:12 -0500
committermutantturkey <mutantturke@gmail.com>2013-03-05 09:27:12 -0500
commit810f378ff8ce79ef220da92dad9bc837a8ecb925 (patch)
tree0bacea1861ed43438a623dc4a66c0af6fce28257
parent63118697eed48dfebe1ec100610976cbff52d21c (diff)
Add appropriate version option
svte now should follow unix conventions a bit more appropriately. It will now take --version or -v and prints a \n after printing the version number.
-rw-r--r--svte.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/svte.c b/svte.c
index 44827f6..263a59d 100644
--- a/svte.c
+++ b/svte.c
@@ -92,7 +92,7 @@ static GOptionEntry options[] = {
"Path to configuration file to use.", NULL },
{ "execute", 'e', 0, G_OPTION_ARG_STRING, &start_program,
"execute this command.", NULL },
- { "version", 0, 0, G_OPTION_ARG_NONE, &show_version,
+ { "version", 'v', 0, G_OPTION_ARG_NONE, &show_version,
"Print version information and exit", NULL },
{ NULL }
};
@@ -598,7 +598,7 @@ int main(int argc, char* argv[]) {
}
if (show_version) {
- printf(VERSION);
+ printf("%s \n", VERSION);
return 0;
}