From bd813113a218ec8c987437a6f8f6dc66c97c61bd Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 18 Feb 2006 15:05:35 +0000 Subject: [PATCH] more x86 OS X fixes svn: r2279 --- src/a-list/a-list-1.1.9/ALMouse.c | 4 ++-- src/mred/mredmac.cxx | 15 +++++++++++---- src/mred/mrmain.cxx | 13 ------------- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/a-list/a-list-1.1.9/ALMouse.c b/src/a-list/a-list-1.1.9/ALMouse.c index e096c41de4..d33724e537 100644 --- a/src/a-list/a-list-1.1.9/ALMouse.c +++ b/src/a-list/a-list-1.1.9/ALMouse.c @@ -28,8 +28,8 @@ #endif #ifdef __i386__ -# include "Endian.h" -# define wxNATIVE_LONG(x) EndianS32_BtoN(x) +# include +# define wxNATIVE_LONG(x) EndianS32_BtoN((x).bigEndianValue) #else # define wxNATIVE_LONG(x) x #endif diff --git a/src/mred/mredmac.cxx b/src/mred/mredmac.cxx index 8f68486e1f..85ecacdbdf 100644 --- a/src/mred/mredmac.cxx +++ b/src/mred/mredmac.cxx @@ -20,6 +20,13 @@ #include #include +#ifdef __i386__ +# include +# define wxNATIVE_LONG(x) EndianS32_BtoN((x).bigEndianValue) +#else +# define wxNATIVE_LONG(x) x +#endif + static int dispatched = 1; extern "C" { @@ -479,13 +486,13 @@ static int GetMods(void) int mods = 0; GetKeys(km); - if (km[1] & 32768) + if (wxNATIVE_LONG(km[1]) & 32768) mods |= cmdKey; - if (km[1] & 1) + if (wxNATIVE_LONG(km[1]) & 1) mods |= shiftKey; - if (km[1] & 4) + if (wxNATIVE_LONG(km[1]) & 4) mods |= optionKey; - if (km[1] & 8) + if (wxNATIVE_LONG(km[1]) & 8) mods |= controlKey; return mods; diff --git a/src/mred/mrmain.cxx b/src/mred/mrmain.cxx index faf05a2cbc..faaeb66fee 100644 --- a/src/mred/mrmain.cxx +++ b/src/mred/mrmain.cxx @@ -309,23 +309,10 @@ int main(int argc, char *argv[]) #ifdef wx_mac wxMacDisableMods = controlKey; - # ifndef OS_X scheme_creator_id = 'mReD'; wxMediaCreatorId = 'mReD'; # endif - -# if !defined(__powerc) && !defined(__ppc__) - long calcLimit, size; - THz zone; - - zone = GetZone(); - size = ((long)LMGetCurStackBase()-(*(long *)zone)-sizeof(Zone)); - calcLimit = size - 1048576; /* 1 MB stack */ - if (calcLimit % 2) - calcLimit++; - SetApplLimit((Ptr)((*(long *)zone)+sizeof(Zone)+calcLimit)); -# endif #endif #ifdef wx_mac