|
From: <and...@us...> - 2006-04-18 17:49:17
|
Revision: 1293 Author: andreradke Date: 2006-04-18 10:49:06 -0700 (Tue, 18 Apr 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1293&view=rev Log Message: ----------- In binarytodesc, conditionally byte-swap the (big-endian) binary type extracted from the binary UserTalk value before using it as the descriptor type. Modified Paths: -------------- Frontier/trunk/Common/source/langipc.c Modified: Frontier/trunk/Common/source/langipc.c =================================================================== --- Frontier/trunk/Common/source/langipc.c 2006-04-17 17:52:12 UTC (rev 1292) +++ Frontier/trunk/Common/source/langipc.c 2006-04-18 17:49:06 UTC (rev 1293) @@ -51,6 +51,7 @@ #include "meprograms.h" #include "process.h" #include "processinternal.h" +#include "byteorder.h" #ifdef flcomponent #include <uisharing.h> #include <uisinternal.h> @@ -2175,6 +2176,8 @@ 8/11/92 dmb: also special-case character values; they must go out as standard typeChar descriptors. + + 2006-04-17 aradke: Must byte-swap valtype id extracted from binary value on Intel Macs. */ register AEDesc *d = desc; @@ -2182,15 +2185,16 @@ #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ Handle hcopy; + DescType dtype; - newclearhandle (sizeof (DescType), &hcopy); + copyhandle (hbinary, &hcopy); - copyhandlecontents (hbinary, hcopy); + pullfromhandle (hcopy, 0L, sizeof (DescType), &dtype); - pullfromhandle (hcopy, 0L, sizeof (DescType), &(*d).descriptorType); - - newdescwithhandle (d, (*d).descriptorType, hcopy); + disktomemlong (dtype); + newdescwithhandle (d, dtype, hcopy); + disposehandle (hcopy); #else @@ -2198,6 +2202,8 @@ (*d).dataHandle = hbinary; pullfromhandle ((*d).dataHandle, 0L, sizeof (DescType), &(*d).descriptorType); + + disktomemlong ((*d).descriptorType); #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |