summaryrefslogtreecommitdiffhomepage
path: root/src/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/pe_amain.c10
-rw-r--r--src/driver/pe_unit_ctx.c4
2 files changed, 5 insertions, 9 deletions
diff --git a/src/driver/pe_amain.c b/src/driver/pe_amain.c
index e90cede..9ac0a9e 100644
--- a/src/driver/pe_amain.c
+++ b/src/driver/pe_amain.c
@@ -46,13 +46,13 @@ static ssize_t pe_version(struct pe_driver_ctx * dctx)
verclr[4],verinfo->commit,verclr[5]);
}
-static ssize_t pe_paragraph_break(struct pe_unit_ctx * uctx, int * fpara)
+static ssize_t pe_paragraph_break(const struct pe_driver_ctx * dctx, int * fpara)
{
if (*fpara) {
*fpara = 0;
- if (uctx->cctx->ioctx->fdout >= 0)
- return write(uctx->cctx->ioctx->fdout,"\n",1);
+ if (dctx->cctx->ioctx->fdout >= 0)
+ return write(dctx->cctx->ioctx->fdout,"\n",1);
else
return fputc('\n',stdout);
} else
@@ -64,7 +64,7 @@ static void pe_perform_unit_actions(
struct pe_unit_ctx * uctx)
{
int fpara = 0;
- uint64_t flags = uctx->cctx->fmtflags;
+ uint64_t flags = dctx->cctx->fmtflags;
if (flags & PERK_OUTPUT_EXPORT_SYMS) {
uctx->status = pe_output_export_symbols(dctx,uctx->meta,0);
@@ -73,7 +73,7 @@ static void pe_perform_unit_actions(
}
if ((flags & PERK_OUTPUT_IMPORT_LIBS) || (flags & PERK_OUTPUT_IMPORT_SYMS)) {
- pe_paragraph_break(uctx,&fpara);
+ pe_paragraph_break(dctx,&fpara);
uctx->status = pe_output_import_libraries(dctx,uctx->meta,0);
uctx->nerrors += !!uctx->status;
fpara += (uctx->meta->summary.nimplibs > 0);
diff --git a/src/driver/pe_unit_ctx.c b/src/driver/pe_unit_ctx.c
index 5330659..06a53f9 100644
--- a/src/driver/pe_unit_ctx.c
+++ b/src/driver/pe_unit_ctx.c
@@ -51,16 +51,12 @@ int pe_get_unit_ctx(
return pe_free_unit_ctx_impl(ctx,
PERK_NESTED_ERROR(dctx));
- memcpy(&ctx->cctx,dctx->cctx,
- sizeof(ctx->cctx));
-
ctx->path = path;
ctx->ioctx.prot = prot;
ctx->uctx.path = &ctx->path;
ctx->uctx.map = &ctx->map;
ctx->uctx.meta = ctx->meta;
- ctx->uctx.cctx = &ctx->cctx;
*pctx = &ctx->uctx;
return 0;