diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-03-05 09:10:55 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-03-05 09:10:55 +0000 |
commit | cc577ce8c5e051967fce0ae954f78874e400c2f8 (patch) | |
tree | 9b1d8e3144cb7f49ffe2c1eb1ec189b6c04ba174 /Build/source/libs/graphite2/graphite2-src/src/inc/Machine.h | |
parent | 0ab585a159d6f011c3eb364d7c0dc20424ef0738 (diff) |
graphite2-1.3.11
git-svn-id: svn://tug.org/texlive/trunk@46828 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/graphite2/graphite2-src/src/inc/Machine.h')
-rw-r--r-- | Build/source/libs/graphite2/graphite2-src/src/inc/Machine.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/Build/source/libs/graphite2/graphite2-src/src/inc/Machine.h b/Build/source/libs/graphite2/graphite2-src/src/inc/Machine.h index 1a01b7a43f7..b23819fb981 100644 --- a/Build/source/libs/graphite2/graphite2-src/src/inc/Machine.h +++ b/Build/source/libs/graphite2/graphite2-src/src/inc/Machine.h @@ -15,8 +15,8 @@ You should also have received a copy of the GNU Lesser General Public License along with this library in the file named "LICENSE". - If not, write to the Free Software Foundation, 51 Franklin Street, - Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the internet at http://www.fsf.org/licenses/lgpl.html. Alternatively, the contents of this file may be used under the terms of the @@ -27,11 +27,12 @@ of the License or (at your option) any later version. // This general interpreter interface. // Author: Tim Eves -// Build one of direct_machine.cpp or call_machine.cpp to implement this +// Build one of direct_machine.cpp or call_machine.cpp to implement this // interface. #pragma once #include <cstring> +#include <limits> #include <graphite2/Types.h> #include "inc/Main.h" @@ -56,6 +57,13 @@ of the License or (at your option) any later version. #define REGPARM(n) #endif +#if defined(__MINGW32__) +// MinGW's <limits> at some point includes winnt.h which #define's a +// DELETE macro, which conflicts with enum opcode below, so we undefine +// it here. +#undef DELETE +#endif + namespace graphite2 { // Forward declarations @@ -64,7 +72,7 @@ class Slot; class SlotMap; -namespace vm +namespace vm { @@ -112,12 +120,12 @@ enum opcode { PUT_GLYPH, PUSH_GLYPH_ATTR, PUSH_ATT_TO_GLYPH_ATTR, BITOR, BITAND, BITNOT, BITSET, SET_FEAT, - MAX_OPCODE, + MAX_OPCODE, // private opcodes for internal use only, comes after all other on disk opcodes TEMP_COPY = MAX_OPCODE }; -struct opcode_t +struct opcode_t { instr impl[2]; uint8 param_sz; @@ -186,6 +194,8 @@ inline Machine::status_t Machine::status() const throw() inline void Machine::check_final_stack(const stack_t * const sp) { + if (_status != finished) return; + stack_t const * const base = _stack + STACK_GUARD, * const limit = base + STACK_MAX; if (sp < base) _status = stack_underflow; // This should be impossible now. @@ -195,6 +205,3 @@ inline void Machine::check_final_stack(const stack_t * const sp) } // namespace vm } // namespace graphite2 - - - |