summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-25 09:25:42 -0400
committermidipix <writeonce@midipix.org>2016-04-25 09:25:42 -0400
commit2226ad3d3035c4c18e4a5c94166ff6c691bf9065 (patch)
tree4f2e596e636f6567107ac6a8f86f83ee2f569cb8 /src
parentf836238670793d801b09c5a5423dc2ffec3dd4a7 (diff)
downloadapimagic-2226ad3d3035c4c18e4a5c94166ff6c691bf9065.tar.bz2
apimagic-2226ad3d3035c4c18e4a5c94166ff6c691bf9065.tar.xz
utility: integrated amgc_source_version().
Diffstat (limited to 'src')
-rw-r--r--src/apimagic.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/apimagic.c b/src/apimagic.c
index 670a6cc..f7fbf2f 100644
--- a/src/apimagic.c
+++ b/src/apimagic.c
@@ -7,7 +7,6 @@
#include <stdio.h>
#include <unistd.h>
#include <apimagic/apimagic.h>
-#include "apimagic_version.h"
#include "apimagic_driver_impl.h"
#ifndef AMGC_DRIVER_FLAGS
@@ -15,11 +14,19 @@
| AMGC_DRIVER_VERBOSITY_USAGE
#endif
-static const char vermsg[] = "%s (git://midipix.org/apimagic): commit %s.\n";
+static const char vermsg[] = "%s (git://midipix.org/apimagic): "
+ "version %d.%d.%d.\n"
+ "[commit reference: %s]\n";
static ssize_t apimagic_version(struct amgc_driver_ctx * dctx)
{
- return fprintf(stdout,vermsg,dctx->program,APIMAGIC_GIT_VERSION);
+ const struct amgc_source_version * verinfo;
+
+ verinfo = amgc_source_version();
+
+ return fprintf(stdout,vermsg,dctx->program,
+ verinfo->major,verinfo->minor,verinfo->revision,
+ verinfo->commit);
}
static void apimagic_perform_unit_actions(struct amgc_unit_ctx * uctx)