Skip to content

Commit

Permalink
-V outputs version only
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed May 8, 2011
1 parent 0c33562 commit 66c2b6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions src/parser.c
Expand Up @@ -1014,9 +1014,9 @@ void makeTrailer(char *text)
trailer= strdup(text);
}

static void version(char *name)
{
printf("%s version %s\n", name, CDESCENT_VERSION);
static void
version() {
printf("%s\n", CDESCENT_VERSION);
}

static void
Expand All @@ -1027,10 +1027,10 @@ usage(char *name) {
"\n"
" options:\n"
"\n"
" -h, --help output help information\n"
" -o, --out <file> output to <file>\n"
" -v, --verbose enable verbose output\n"
" -V, --version output version number\n"
" -h output help information\n"
" -o <file> output to <file>\n"
" -v enable verbose output\n"
" -V output version number\n"
"\n"
" examples:\n"
"\n"
Expand All @@ -1056,7 +1056,7 @@ main(int argc, char **argv) {
switch (c)
{
case 'V':
version(basename(argv[0]));
version();
exit(0);

case 'h':
Expand Down
8 changes: 4 additions & 4 deletions src/parser.leg
Expand Up @@ -183,9 +183,9 @@ void makeTrailer(char *text)
trailer= strdup(text);
}

static void version(char *name)
{
printf("%s version %s\n", name, CDESCENT_VERSION);
static void
version() {
printf("%s\n", CDESCENT_VERSION);
}

static void
Expand Down Expand Up @@ -225,7 +225,7 @@ main(int argc, char **argv) {
switch (c)
{
case 'V':
version(basename(argv[0]));
version();
exit(0);

case 'h':
Expand Down

0 comments on commit 66c2b6d

Please sign in to comment.