From 7e44c673b0d1e32e4724b725413b6f34ef015853 Mon Sep 17 00:00:00 2001 From: Jason Hiser <jdhiser@gmail.com> Date: Tue, 12 Feb 2019 19:50:54 -0500 Subject: [PATCH] minor tweaks in formattinng. --- README => README.md | 0 include/private-include/memory_space.h | 36 +++++----- include/private-include/zipr_plugin.h | 92 +++++++++----------------- include/zipr-sdk | 41 ++---------- sleds.zipr_sdk.patch | 59 ----------------- 5 files changed, 52 insertions(+), 176 deletions(-) rename README => README.md (100%) delete mode 100644 sleds.zipr_sdk.patch diff --git a/README b/README.md similarity index 100% rename from README rename to README.md diff --git a/include/private-include/memory_space.h b/include/private-include/memory_space.h index e7cb315..b20d184 100644 --- a/include/private-include/memory_space.h +++ b/include/private-include/memory_space.h @@ -12,33 +12,33 @@ namespace Zipr_SDK public: // range operatations - virtual void splitFreeRange(RangeAddress_t addr)=0; - virtual void splitFreeRange(Range_t range)=0; - virtual void mergeFreeRange(RangeAddress_t addr)=0; - virtual void mergeFreeRange(Range_t range)=0; + virtual void splitFreeRange(RangeAddress_t addr) = 0; + virtual void splitFreeRange(Range_t range) = 0; + virtual void mergeFreeRange(RangeAddress_t addr) = 0; + virtual void mergeFreeRange(Range_t range) = 0; virtual RangeSet_t::iterator - findFreeRange(RangeAddress_t addr)=0; - virtual Range_t getFreeRange(int size)=0; - virtual Range_t getInfiniteFreeRange()=0; - virtual list<Range_t> getFreeRanges(size_t size = 0) = 0; + findFreeRange(RangeAddress_t addr) = 0; + virtual Range_t getFreeRange(int size) = 0; + virtual Range_t getInfiniteFreeRange() = 0; + virtual list<Range_t> getFreeRanges(size_t size = 0) = 0; virtual RangeSetBounds_t getNearbyFreeRanges(const RangeAddress_t hint, size_t count = 0) = 0; - virtual void addFreeRange(Range_t newRange)=0; - virtual void removeFreeRange(Range_t newRange)=0; - virtual Range_t getLargeRange(void)=0; + virtual void addFreeRange(Range_t newRange) = 0; + virtual void removeFreeRange(Range_t newRange) = 0; + virtual Range_t getLargeRange(void) = 0; // queries about free areas. virtual bool areBytesFree(RangeAddress_t addr, int num_bytes)=0; - virtual bool isByteFree(RangeAddress_t addr)=0; - virtual bool isValidRange(RangeSet_t::iterator it)=0; - virtual int getRangeCount()=0; - virtual void printMemorySpace(ostream &out)=0; + virtual bool isByteFree(RangeAddress_t addr) = 0; + virtual bool isValidRange(RangeSet_t::iterator it) = 0; + virtual int getRangeCount() = 0; + virtual void printMemorySpace(ostream &out) = 0; virtual void plopBytes(RangeAddress_t addr, const char the_byte[], int num)=0; virtual void plopByte(RangeAddress_t addr, char the_byte)=0; - virtual void plopJump(RangeAddress_t addr)=0; - virtual RangeAddress_t getMinPlopped() const =0; - virtual RangeAddress_t getMaxPlopped() const =0; + virtual void plopJump(RangeAddress_t addr) = 0; + virtual RangeAddress_t getMinPlopped() const = 0; + virtual RangeAddress_t getMaxPlopped() const = 0; }; diff --git a/include/private-include/zipr_plugin.h b/include/private-include/zipr_plugin.h index 0c87c76..01d67aa 100644 --- a/include/private-include/zipr_plugin.h +++ b/include/private-include/zipr_plugin.h @@ -15,39 +15,22 @@ namespace Zipr_SDK class ZiprPluginInterface_t { public: - virtual void doPinningBegin() - { - } - virtual void doPinningEnd() - { - } - virtual void doDollopBegin() - { - } - virtual void doDollopEnd() - { - } - virtual void doCallbackLinkingBegin() - { - } - virtual void doCallbackLinkingEnd() - { - } + virtual void doPinningBegin() { } + virtual void doPinningEnd() { } + virtual void doDollopBegin() { } + virtual void doDollopEnd() { } + virtual void doCallbackLinkingBegin() { } + virtual void doCallbackLinkingEnd() { } virtual ZiprPreference addressDollop(const Dollop_t *dollop, const RangeAddress_t &source, Range_t &place, bool &coalesce, bool &fallthrough_ok) - { - return None; - } - - virtual bool willPluginPlop(Instruction_t*) - { - return false; - } - - virtual size_t getInsnSize(Instruction_t*, bool) - { - return 0; - } + { return None; } + + virtual bool willPluginPlop(Instruction_t*) + { return false; } + + virtual size_t getInsnSize(Instruction_t*, bool) + { return 0; } + /* * DollopEntryOpeningSize() * DollopEntryClosingSize() @@ -57,14 +40,8 @@ namespace Zipr_SDK * should return the size of that padding in * these functions. */ - virtual size_t getDollopEntryOpeningSize(DollopEntry_t*) - { - return 0; - } - virtual size_t getDollopEntryClosingSize(DollopEntry_t*) - { - return 0; - } + virtual size_t getDollopEntryOpeningSize(DollopEntry_t*) { return 0; } + virtual size_t getDollopEntryClosingSize(DollopEntry_t*) { return 0; } /* * PlopDollopEntry() @@ -102,35 +79,26 @@ namespace Zipr_SDK RangeAddress_t &instruction_address, RangeAddress_t &target_address, size_t instruction_size, - bool &placed_instruction) - { - return 0; - } - virtual string toString() - { - return "NamelessPlugin"; - } + bool &placed_instruction) + { return 0; } + + virtual string toString() + { return "NamelessPlugin"; } + virtual ZiprOptionsNamespace_t *registerOptions(ZiprOptionsNamespace_t *) - { - return new ZiprOptionsNamespace_t(""); - } + { return new ZiprOptionsNamespace_t(""); } virtual ZiprPreference retargetPin(const RangeAddress_t &, const Dollop_t *, RangeAddress_t &) - { - return None; - } + { return None; } + virtual ZiprPreference retargetCallback(const RangeAddress_t &, const DollopEntry_t *, RangeAddress_t &) - { - return None; - } + { return None; } + virtual RangeAddress_t doPlaceScoopsBegin(const RangeAddress_t max_addr) - { - return max_addr; - } + { return max_addr; } + virtual RangeAddress_t doPlaceScoopsEnd(const RangeAddress_t max_addr) - { - return max_addr; - } + { return max_addr; } }; diff --git a/include/zipr-sdk b/include/zipr-sdk index dacfa41..b1176fc 100644 --- a/include/zipr-sdk +++ b/include/zipr-sdk @@ -1,44 +1,10 @@ -/*************************************************************************** - * Copyright (c) 2014 Zephyr Software LLC. All rights reserved. - * - * This software is furnished under a license and/or other restrictive - * terms and may be used and copied only in accordance with such terms - * and the inclusion of the above copyright notice. This software or - * any other copies thereof may not be provided or otherwise made - * available to any other person without the express written consent - * of an authorized representative of Zephyr Software LCC. Title to, - * ownership of, and all rights in the software is retained by - * Zephyr Software LCC. - * - * Zephyr Software LLC. Proprietary Information - * - * Unless otherwise specified, the information contained in this - * directory, following this legend, and/or referenced herein is - * Zephyr Software LLC. (Zephyr) Proprietary Information. - * - * CONTACT - * - * For technical assistance, contact Zephyr Software LCC. at: - * - * - * Zephyr Software, LLC - * 2040 Tremont Rd - * Charlottesville, VA 22911 - * - * E-mail: jwd@zephyr-software.com - **************************************************************************/ - - - #ifndef ZIPR_SDK_H #define ZIPR_SDK_H - // std:: includes. #include <stdint.h> #include <set> - // IRDB includes #include <irdb-core> @@ -55,8 +21,9 @@ #include <private-include/zipr_plugin.h> #include <private-include/zipr.h> -extern "C" -Zipr_SDK::ZiprPluginInterface_t* GetPluginInterface(Zipr_SDK::Zipr_t* zipr_main_object); - +// +// You must build a shared library that implements this method: +// +// extern "C" Zipr_SDK::ZiprPluginInterface_t* getPluginInterface(Zipr_SDK::Zipr_t* p_zipr_main_object); #endif diff --git a/sleds.zipr_sdk.patch b/sleds.zipr_sdk.patch deleted file mode 100644 index 535faee..0000000 --- a/sleds.zipr_sdk.patch +++ /dev/null @@ -1,59 +0,0 @@ -Index: include/memory_space.h -=================================================================== ---- include/memory_space.h (revision 21014) -+++ include/memory_space.h (working copy) -@@ -46,6 +46,7 @@ - virtual void SplitFreeRange(RangeAddress_t addr)=0; - virtual void SplitFreeRange(Range_t range)=0; - virtual void MergeFreeRange(RangeAddress_t addr)=0; -+ virtual void MergeFreeRange(Range_t range)=0; - virtual RangeSet_t::iterator FindFreeRange(RangeAddress_t addr)=0; - virtual Range_t GetFreeRange(int size)=0; - virtual std::list<Range_t> GetFreeRanges(size_t size = 0) = 0; -Index: include/zipr_constants.h -=================================================================== ---- include/zipr_constants.h (revision 0) -+++ include/zipr_constants.h (working copy) -@@ -0,0 +1,42 @@ -+/*************************************************************************** -+ * Copyright (c) 2014 Zephyr Software LLC. All rights reserved. -+ * -+ * This software is furnished under a license and/or other restrictive -+ * terms and may be used and copied only in accordance with such terms -+ * and the inclusion of the above copyright notice. This software or -+ * any other copies thereof may not be provided or otherwise made -+ * available to any other person without the express written consent -+ * of an authorized representative of Zephyr Software LCC. Title to, -+ * ownership of, and all rights in the software is retained by -+ * Zephyr Software LCC. -+ * -+ * Zephyr Software LLC. Proprietary Information -+ * -+ * Unless otherwise specified, the information contained in this -+ * directory, following this legend, and/or referenced herein is -+ * Zephyr Software LLC. (Zephyr) Proprietary Information. -+ * -+ * CONTACT -+ * -+ * For technical assistance, contact Zephyr Software LCC. at: -+ * -+ * -+ * Zephyr Software, LLC -+ * 2040 Tremont Rd -+ * Charlottesville, VA 22911 -+ * -+ * E-mail: jwd@zephyr-software.com -+ **************************************************************************/ -+ -+ -+ -+#ifndef ZIPR_CONSTANTS_H -+#define ZIPR_CONSTANTS_H -+ -+namespace Zipr_SDK { -+ enum { -+ DEFAULT_TRAMPOLINE_SIZE=5 -+ }; -+}; -+ -+#endif -- GitLab