From 2226ad3d3035c4c18e4a5c94166ff6c691bf9065 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 25 Apr 2016 09:25:42 -0400 Subject: utility: integrated amgc_source_version(). --- src/apimagic.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') 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 #include #include -#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) -- cgit v1.2.3