diff options
author | Squibid <me@zacharyscheiman.com> | 2024-12-19 11:46:19 -0600 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2024-12-19 11:47:40 -0600 |
commit | ec2591c92659cb5e3257195bbe7a9c41ac65d29a (patch) | |
tree | e8519b8aec64536b8559ed7df79b79248fcbc7da /XD.c | |
parent | 8ac77308f47057773ac544ad45c7729dd2908908 (diff) | |
download | XD-ec2591c92659cb5e3257195bbe7a9c41ac65d29a.tar.gz XD-ec2591c92659cb5e3257195bbe7a9c41ac65d29a.tar.bz2 XD-ec2591c92659cb5e3257195bbe7a9c41ac65d29a.zip |
bump version info and add compile info to versionv1.1
Diffstat (limited to 'XD.c')
-rw-r--r-- | XD.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1,8 +1,8 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #ifdef ERR #include <stdarg.h> -#include <string.h> #endif #ifdef GIT @@ -155,9 +155,17 @@ has_staged(git_repository *repo) int main(int argc, char *argv[]) { - int code = -1; + int i, code = -1; char face[] = { ':', 0, '|' }; + /* print version information */ + for (i = 1; i < argc; i++) { + if (strcmp(argv[i], "-v") == 0) { + printf("XD v%s\n", VERSION); + return 0; + } + } + #ifdef GIT git_repository *repo; int git_ok = 0; |