From b87f7032b8573966b0537698544c65fbb3f2c143 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 22 Jan 2024 01:42:49 +0000 Subject: ar mode: added --version support. --- src/logic/slbt_exec_ar.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/logic/slbt_exec_ar.c') diff --git a/src/logic/slbt_exec_ar.c b/src/logic/slbt_exec_ar.c index 3e1c0f2..18ee97e 100644 --- a/src/logic/slbt_exec_ar.c +++ b/src/logic/slbt_exec_ar.c @@ -142,6 +142,10 @@ int slbt_exec_ar( & SLBT_DRIVER_ANNOTATE_NEVER); return 0; + case TAG_AR_VERSION: + ictx->cctx.drvflags |= SLBT_DRIVER_VERSION; + break; + case TAG_AR_CHECK: ictx->cctx.drvflags |= SLBT_DRIVER_MODE_AR_CHECK; break; @@ -155,6 +159,13 @@ int slbt_exec_ar( }; } + /* defer --version printing to slbt_main() as needed */ + if (cctx->drvflags & SLBT_DRIVER_VERSION) { + argv_free(meta); + slbt_free_exec_ctx(actx); + return SLBT_OK; + } + /* at least one action must be specified */ if (!(cctx->drvflags & SLBT_DRIVER_MODE_AR_ACTIONS)) { if (cctx->drvflags & SLBT_DRIVER_VERBOSITY_ERRORS) -- cgit v1.2.3