diff options
author | midipix <writeonce@midipix.org> | 2015-12-06 08:28:32 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-10 23:35:31 -0500 |
commit | 76aabf2c240c67ede7734f544be94f64da2c55c5 (patch) | |
tree | 460af7b94992a3635b380e5cef0a5663c61a69a3 /src/perk.c | |
parent | d7ed3e2faf8e3bc1aeb1e7fed27cd8a1ff4b2290 (diff) | |
download | perk-76aabf2c240c67ede7734f544be94f64da2c55c5.tar.bz2 perk-76aabf2c240c67ede7734f544be94f64da2c55c5.tar.xz |
API redesign 6/10: pe_common_ctx: protect i/o members against direct modification.
Diffstat (limited to 'src/perk.c')
-rw-r--r-- | src/perk.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |