mirror of https://github.com/omar-polo/gmid.git
define GMID_STRING and reuse-it
GMID_VERSION follows the CGI/FastCGI style, i.e. project_name/version. Define GMID_STRING with a more "human" variant "project_name version", and reuse that in the --help and --version codepath.
This commit is contained in:
parent
0233b0f6b9
commit
fdb43a4c0e
4
gmid.c
4
gmid.c
|
@ -383,7 +383,7 @@ usage(void)
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage: %s [-fn] [-c config] [-P pidfile] | [-6h] [-d certs-dir] [-H host]\n"
|
"usage: %s [-fn] [-c config] [-P pidfile] | [-6h] [-d certs-dir] [-H host]\n"
|
||||||
" [-p port] [-x cgi] [dir]\n"
|
" [-p port] [-x cgi] [dir]\n"
|
||||||
"version: gmid 1.7\n",
|
"version: " GMID_STRING "\n",
|
||||||
getprogname());
|
getprogname());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -579,7 +579,7 @@ main(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'V':
|
case 'V':
|
||||||
puts("Version: 1.7");
|
puts("Version: " GMID_STRING);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
|
|
1
gmid.h
1
gmid.h
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
|
|
||||||
|
#define GMID_STRING "gmid 1.7"
|
||||||
#define GMID_VERSION "gmid/1.7"
|
#define GMID_VERSION "gmid/1.7"
|
||||||
|
|
||||||
#define GEMINI_URL_LEN (1024+3) /* URL max len + \r\n + \0 */
|
#define GEMINI_URL_LEN (1024+3) /* URL max len + \r\n + \0 */
|
||||||
|
|
Loading…
Reference in New Issue