summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-12-08 20:01:30 -0500
committermidipix <writeonce@midipix.org>2016-11-10 23:35:32 -0500
commiteb4c04e1978f8f217e24d46a3baeecf54ac23096 (patch)
treedc4d1e39fb7b8039fc81b6853a54ce713491b017
parent61bf9cc5fe5153f40214c5c057487e31eac3a502 (diff)
downloadperk-eb4c04e1978f8f217e24d46a3baeecf54ac23096.tar.bz2
perk-eb4c04e1978f8f217e24d46a3baeecf54ac23096.tar.xz
internal headers: consolidate perk_impl.h and perk_driver_impl.h.
-rw-r--r--src/driver/pe_driver_ctx.c1
-rw-r--r--src/driver/pe_unit_ctx.c2
-rw-r--r--src/internal/perk_driver_impl.h26
-rw-r--r--src/internal/perk_impl.h30
4 files changed, 27 insertions, 32 deletions
diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c
index 85e1f9c..d5b8331 100644
--- a/src/driver/pe_driver_ctx.c
+++ b/src/driver/pe_driver_ctx.c
@@ -7,7 +7,6 @@
#include <perk/perk.h>
#include <perk/perk_output.h>
#include "perk_driver_impl.h"
-#include "perk_impl.h"
#include "argv/argv.h"
extern const struct argv_option pe_default_options[];
diff --git a/src/driver/pe_unit_ctx.c b/src/driver/pe_unit_ctx.c
index 40e88ab..77b74bc 100644
--- a/src/driver/pe_unit_ctx.c
+++ b/src/driver/pe_unit_ctx.c
@@ -5,7 +5,7 @@
#include <sys/mman.h>
#include <perk/perk.h>
-#include "perk_impl.h"
+#include "perk_driver_impl.h"
static int pe_free_unit_ctx_impl(struct pe_unit_ctx_impl * ctx, int status)
{
diff --git a/src/internal/perk_driver_impl.h b/src/internal/perk_driver_impl.h
index 016a369..681cd3c 100644
--- a/src/internal/perk_driver_impl.h
+++ b/src/internal/perk_driver_impl.h
@@ -1,6 +1,13 @@
#ifndef PE_DRIVER_IMPL_H
#define PE_DRIVER_IMPL_H
+#include <stdint.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#include <perk/perk.h>
+#include <perk/perk_meta.h>
+
enum app_tags {
TAG_HELP,
TAG_VERSION,
@@ -11,4 +18,23 @@ enum app_tags {
TAG_IMPSYMS,
};
+struct pe_driver_ctx_impl {
+ struct pe_symbol_ctx symctx;
+ struct pe_output_ctx outctx;
+ struct pe_linker_ctx lnkctx;
+ struct pe_server_ctx srvctx;
+ struct pe_io_ctx ioctx;
+ struct pe_common_ctx cctx;
+ struct pe_driver_ctx ctx;
+};
+
+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_common_ctx cctx;
+ struct pe_unit_ctx uctx;
+};
+
#endif
diff --git a/src/internal/perk_impl.h b/src/internal/perk_impl.h
deleted file mode 100644
index 8d8ecc3..0000000
--- a/src/internal/perk_impl.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef PERK_IMPL_H
-#define PERK_IMPL_H
-
-#include <stdint.h>
-#include <stdio.h>
-#include <sys/types.h>
-
-#include <perk/perk.h>
-#include <perk/perk_meta.h>
-
-struct pe_driver_ctx_impl {
- struct pe_symbol_ctx symctx;
- struct pe_output_ctx outctx;
- struct pe_linker_ctx lnkctx;
- struct pe_server_ctx srvctx;
- struct pe_io_ctx ioctx;
- struct pe_common_ctx cctx;
- struct pe_driver_ctx ctx;
-};
-
-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_common_ctx cctx;
- struct pe_unit_ctx uctx;
-};
-
-#endif