summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-09 20:55:21 +0000
committermidipix <writeonce@midipix.org>2024-02-09 21:01:39 +0000
commitef2baa69376b8d2bbb016f2f8661c6147e89d420 (patch)
treeae734ac615a495eae4fff4da91e9af08560a6687
parent6b24134383e78124e81ac94b1c9e21383fcc1308 (diff)
downloadslibtool-ef2baa69376b8d2bbb016f2f8661c6147e89d420.tar.bz2
slibtool-ef2baa69376b8d2bbb016f2f8661c6147e89d420.tar.xz
ar mode: invoke the argv interfaces via the driver-provided wrappers.
-rw-r--r--src/logic/slbt_exec_ar.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/logic/slbt_exec_ar.c b/src/logic/slbt_exec_ar.c
index 17ad439..e3613fd 100644
--- a/src/logic/slbt_exec_ar.c
+++ b/src/logic/slbt_exec_ar.c
@@ -4,8 +4,6 @@
/* Released under the Standard MIT License; see COPYING.SLIBTOOL. */
/*******************************************************************/
-#define ARGV_DRIVER
-
#include <slibtool/slibtool.h>
#include <slibtool/slibtool_output.h>
#include "slibtool_driver_impl.h"
@@ -48,18 +46,18 @@ static int slbt_ar_usage(
switch (noclr) {
case 0:
- argv_usage(fdout,header,optv,arg);
+ slbt_argv_usage(fdout,header,optv,arg);
break;
default:
- argv_usage_plain(fdout,header,optv,arg);
+ slbt_argv_usage_plain(fdout,header,optv,arg);
break;
}
if (ectx)
slbt_free_exec_ctx(ectx);
- argv_free(meta);
+ slbt_argv_free(meta);
return SLBT_USAGE;
}
@@ -69,7 +67,7 @@ static int slbt_exec_ar_fail(
struct argv_meta * meta,
int ret)
{
- argv_free(meta);
+ slbt_argv_free(meta);
slbt_free_exec_ctx(actx);
return ret;
}
@@ -134,7 +132,7 @@ int slbt_exec_ar(
fderr = slbt_driver_fderr(dctx);
/* missing arguments? */
- argv_optv_init(slbt_ar_options,optv);
+ slbt_optv_init(slbt_ar_options,optv);
if (!iargv[1] && (dctx->cctx->drvflags & SLBT_DRIVER_VERBOSITY_USAGE))
return slbt_ar_usage(
@@ -144,7 +142,7 @@ int slbt_exec_ar(
dctx->cctx->drvflags & SLBT_DRIVER_ANNOTATE_NEVER);
/* <ar> argv meta */
- if (!(meta = argv_get(
+ if (!(meta = slbt_argv_get(
iargv,optv,
dctx->cctx->drvflags & SLBT_DRIVER_VERBOSITY_ERRORS
? ARGV_VERBOSITY_ERRORS
@@ -173,7 +171,7 @@ int slbt_exec_ar(
ictx->cctx.drvflags |= SLBT_DRIVER_VERSION;
ictx->cctx.drvflags ^= SLBT_DRIVER_VERSION;
- argv_free(meta);
+ slbt_argv_free(meta);
return SLBT_OK;
@@ -240,7 +238,7 @@ int slbt_exec_ar(
/* defer --version printing to slbt_main() as needed */
if (cctx->drvflags & SLBT_DRIVER_VERSION) {
- argv_free(meta);
+ slbt_argv_free(meta);
slbt_free_exec_ctx(actx);
return SLBT_OK;
}
@@ -321,7 +319,7 @@ int slbt_exec_ar(
free(unitv);
free(arctxv);
- argv_free(meta);
+ slbt_argv_free(meta);
slbt_free_exec_ctx(actx);
return ret;