summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-03-08 11:34:47 -0500
committermidipix <writeonce@midipix.org>2016-03-10 08:32:39 -0500
commita288c4f46e5e7d9c3e643a13572cda4c601d76dd (patch)
tree3a0509a568c9abbc5f0dfc61f7fc0c2f985ef2c6 /src
parent595190b44d92930a703d0fcb3afba6a179e80c2b (diff)
downloadslibtool-a288c4f46e5e7d9c3e643a13572cda4c601d76dd.tar.bz2
slibtool-a288c4f46e5e7d9c3e643a13572cda4c601d76dd.tar.xz
interface: add the split argument vectors to struct slbt_common_ctx.
Diffstat (limited to 'src')
-rw-r--r--src/driver/slbt_driver_ctx.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 8d4e861..74fbd9a 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -187,9 +187,13 @@ static int slbt_split_argv(
if (argv[i][0] != '-')
*cargv++ = argv[i];
- else if (argv[i][1] == 'o')
+ else if (argv[i][1] == 'o') {
*targv++ = argv[i];
+ if (argv[i][2] == '\0')
+ *targv++ = argv[++i];
+ }
+
else if ((argv[i][1] == 'W') && (argv[i][2] == 'c'))
*cargv++ = argv[i];
@@ -353,6 +357,9 @@ int slbt_get_driver_ctx(
ctx->targv = sargv.targv;
ctx->cargv = sargv.cargv;
+ ctx->cctx.targv = sargv.targv;
+ ctx->cctx.cargv = sargv.cargv;
+
*pctx = &ctx->ctx;
return SLBT_OK;
}