diff options
author | midipix <writeonce@midipix.org> | 2016-11-14 14:35:37 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-14 14:39:32 -0500 |
commit | f11c1faa5ab033f3b2ba1f6b3cd5f5db454c48ec (patch) | |
tree | 87b8df2c2068e5e4f0fea4d125f787caf4ae934e /src/internal | |
parent | 5a5fa5cd283d214bedb92130f2807abe64643f16 (diff) | |
download | perk-f11c1faa5ab033f3b2ba1f6b3cd5f5db454c48ec.tar.bz2 perk-f11c1faa5ab033f3b2ba1f6b3cd5f5db454c48ec.tar.xz |
libary api: pre-alpha: code maintenance: removed struct pe_io_ctx.
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/perk_driver_impl.h | 2 | ||||
-rw-r--r-- | src/internal/perk_output_impl.h | 46 |
2 files changed, 0 insertions, 48 deletions
diff --git a/src/internal/perk_driver_impl.h b/src/internal/perk_driver_impl.h index 3c0d15d..9581210 100644 --- a/src/internal/perk_driver_impl.h +++ b/src/internal/perk_driver_impl.h @@ -23,7 +23,6 @@ enum app_tags { }; struct pe_driver_ctx_impl { - struct pe_io_ctx ioctx; struct pe_common_ctx cctx; struct pe_driver_ctx ctx; const struct pe_unit_ctx * euctx; @@ -38,7 +37,6 @@ struct pe_unit_ctx_impl { const char * path; struct pe_raw_image map; struct pe_image_meta * meta; - struct pe_io_ctx ioctx; struct pe_unit_ctx uctx; }; diff --git a/src/internal/perk_output_impl.h b/src/internal/perk_output_impl.h deleted file mode 100644 index cb8b304..0000000 --- a/src/internal/perk_output_impl.h +++ /dev/null @@ -1,46 +0,0 @@ -/***************************************************************/ -/* perk: PE Resource Kit */ -/* Copyright (C) 2015--2016 Z. Gilboa */ -/* Released under GPLv2 and GPLv3; see COPYING.PERK. */ -/***************************************************************/ - -#ifndef PE_OUTPUT_IMPL_H -#define PE_OUTPUT_IMPL_H - -#include <unistd.h> -#include <perk/perk.h> - -static inline FILE * pe_output_prolog( - const struct pe_common_ctx * cctx, - FILE * fout, - FILE ** ftmp) -{ - int fdout; - - *ftmp = (FILE *)0; - - if (fout) - return fout; - else if (!cctx) - return 0; - else if (cctx->ioctx->fdout < 0) - return stdout; - - if ((fdout = dup(cctx->ioctx->fdout)) < 0) - return 0; - - if ((*ftmp = fdopen(fdout,"a"))) - return *ftmp; - - close(fdout); - return 0; -} - -static inline int pe_output_epilog(int ret, FILE * f) -{ - if (f) - fclose(f); - return ret; -} - -#endif |