From 76aabf2c240c67ede7734f544be94f64da2c55c5 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 6 Dec 2015 08:28:32 -0500 Subject: API redesign 6/10: pe_common_ctx: protect i/o members against direct modification. --- src/perk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/perk.c') diff --git a/src/perk.c b/src/perk.c index 85a601f..993478c 100644 --- a/src/perk.c +++ b/src/perk.c @@ -15,9 +15,9 @@ static ssize_t perk_version(struct pe_driver_ctx * dctx) char buf[512]; size_t len; - if (dctx->cctx->fdout >= 0) { + if (dctx->cctx->ioctx->fdout >= 0) { len = sprintf(buf,vermsg,dctx->program,PERK_GIT_VERSION); - return write(dctx->cctx->fdout,buf,len); + return write(dctx->cctx->ioctx->fdout,buf,len); } else return fprintf(stdout,vermsg,dctx->program,PERK_GIT_VERSION); } @@ -27,8 +27,8 @@ static ssize_t perk_paragraph_break(struct pe_unit_ctx * uctx, int * fpara) if (*fpara) { *fpara = 0; - if (uctx->cctx->fdout >= 0) - return write(uctx->cctx->fdout,"\n",1); + if (uctx->cctx->ioctx->fdout >= 0) + return write(uctx->cctx->ioctx->fdout,"\n",1); else return fputc('\n',stdout); } else -- cgit v1.2.3