From bd5676e7016bede788b6b1ea174cce06c1a71cce Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 25 Nov 2015 10:06:38 -0500 Subject: internal header rename: perk_output.h --> perk_output_impl.h. --- project/headers.mk | 2 +- src/internal/perk_output.h | 31 ------------------------------- src/internal/perk_output_impl.h | 31 +++++++++++++++++++++++++++++++ src/output/pe_output_export_symbols.c | 2 +- 4 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 src/internal/perk_output.h create mode 100644 src/internal/perk_output_impl.h diff --git a/project/headers.mk b/project/headers.mk index b961045..3f25fc3 100644 --- a/project/headers.mk +++ b/project/headers.mk @@ -9,6 +9,6 @@ API_HEADERS = \ INTERNAL_HEADERS = \ $(PROJECT_DIR)/src/internal/argv/argv.h \ $(PROJECT_DIR)/src/internal/$(PACKAGE)_impl.h \ - $(PROJECT_DIR)/src/internal/$(PACKAGE)_output.h + $(PROJECT_DIR)/src/internal/$(PACKAGE)_output_impl.h ALL_HEADERS = $(API_HEADERS) $(INTERNAL_HEADERS) diff --git a/src/internal/perk_output.h b/src/internal/perk_output.h deleted file mode 100644 index d60d78d..0000000 --- a/src/internal/perk_output.h +++ /dev/null @@ -1,31 +0,0 @@ -#include - -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->fdout < 0) - return stdout; - - if ((fdout = dup(cctx->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; -} diff --git a/src/internal/perk_output_impl.h b/src/internal/perk_output_impl.h new file mode 100644 index 0000000..d60d78d --- /dev/null +++ b/src/internal/perk_output_impl.h @@ -0,0 +1,31 @@ +#include + +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->fdout < 0) + return stdout; + + if ((fdout = dup(cctx->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; +} diff --git a/src/output/pe_output_export_symbols.c b/src/output/pe_output_export_symbols.c index 529cb9e..420cf31 100644 --- a/src/output/pe_output_export_symbols.c +++ b/src/output/pe_output_export_symbols.c @@ -5,7 +5,7 @@ #include #include -#include "perk_output.h" +#include "perk_output_impl.h" int pe_output_export_symbols (const struct pe_image_meta * m, const struct pe_common_ctx * cctx, FILE * fout) { -- cgit v1.2.3