Mercurial > hg > quicktun
diff src/common.c @ 61:66d9d80215f0
Fixed -h and -v return status, fixed source file permissions (thanks github.com/rotty)
author | Ivo Smits <Ivo@UFO-Net.nl> |
---|---|
date | Wed, 04 Jan 2017 21:42:38 +0100 |
parents | 2f4d333f7500 |
children | fa4983c5f7ea |
line wrap: on
line diff
--- a/src/common.c Mon Jul 04 11:59:12 2016 +0200 +++ b/src/common.c Wed Jan 04 21:42:38 2017 +0100 @@ -115,7 +115,7 @@ } void print_header() { - fprintf(stderr, "UCIS QuickTun "QT_VERSION" (c) 2010-2013 Ivo Smits <Ivo@UCIS.nl>\n"); + fprintf(stderr, "UCIS QuickTun "QT_VERSION" (c) 2010-2017 Ivo Smits <Ivo@UCIS.nl>\n"); fprintf(stderr, "More information: http://wiki.ucis.nl/QuickTun\n"); } @@ -421,9 +421,11 @@ for (i = 1; i < argc; i++) { char* a = argv[i]; if (!strcmp(a, "-h") || !strcmp(a, "--help")) { - return errorexit("Please read the documentation at http://wiki.ucis.nl/QuickTun"); + printf("Please read the documentation at http://wiki.ucis.nl/QuickTun\n"); + return 0; } else if (!strcmp(a, "-v") || !strcmp(a, "--version")) { - return errorexit("UCIS QuickTun "QT_VERSION); + printf("UCIS QuickTun "QT_VERSION"\n"); + return 0; } else if (!strcmp(a, "-c")) { gargc = argc; gargv = argv; @@ -433,7 +435,7 @@ return errorexit("Unexpected command line argument"); } } - return 0; + return 1; } #endif