commit fdb43a4c0e347c20c0f13c3145165393c6c10883 from: Omar Polo date: Tue Jun 29 10:56:07 2021 UTC 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. commit - 0233b0f6b9fcbbca701d245e82fbddca20862eeb commit + fdb43a4c0e347c20c0f13c3145165393c6c10883 blob - 41abbeea09f7d1ed9497f580e41a235cc40fc1e5 blob + 3bc105546a508f125639d1e55b09aa6bf6995991 --- gmid.c +++ gmid.c @@ -383,7 +383,7 @@ usage(void) fprintf(stderr, "usage: %s [-fn] [-c config] [-P pidfile] | [-6h] [-d certs-dir] [-H host]\n" " [-p port] [-x cgi] [dir]\n" - "version: gmid 1.7\n", + "version: " GMID_STRING "\n", getprogname()); } @@ -579,7 +579,7 @@ main(int argc, char **argv) break; case 'V': - puts("Version: 1.7"); + puts("Version: " GMID_STRING); return 0; case 'v': blob - 731a4fd130ecb00aadb03dcd3a394ca40801ef27 blob + 34b210d3cff25aecc2c30aa64de95cb054f1143c --- gmid.h +++ gmid.h @@ -38,6 +38,7 @@ #include +#define GMID_STRING "gmid 1.7" #define GMID_VERSION "gmid/1.7" #define GEMINI_URL_LEN (1024+3) /* URL max len + \r\n + \0 */