|
From: Andre R. <and...@us...> - 2004-12-01 19:45:12
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9186/Common/source Modified Files: Tag: New_Tables_Experiment-branch CallMachOFrameWork.c langdll.c langstartup.c langverbs.c ops.c shell.c shellsysverbs.c wpengine.c Log Message: merged trunk, from merged-Root-of-New_Tables_Experiment to HEAD (conflicts resovled) Index: shell.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shell.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** shell.c 1 Nov 2004 11:50:16 -0000 1.4 --- shell.c 1 Dec 2004 19:44:45 -0000 1.4.2.1 *************** *** 77,80 **** --- 77,81 ---- #include "services.h" #include "WinSockNetEvents.h" + #include "langdll.h" /*2004-11-29 aradke: for dllinitverbs*/ #ifdef flcomponent *************** *** 1322,1325 **** --- 1323,1328 ---- #endif + dllinitverbs (); /*2004-11-29 aradke: langdll.c*/ + if (keyboardescape ()) /*check again before landinit; after this, must do shellquit*/ exittooperatingsystem (); Index: ops.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/ops.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** ops.c 26 Oct 2004 10:24:57 -0000 1.3 --- ops.c 1 Dec 2004 19:44:45 -0000 1.3.2.1 *************** *** 39,44 **** - - static tydirection directions [ctdirections] = { --- 39,42 ---- *************** *** 865,869 **** gestalt (gestaltSystemVersion, &x); ! numbertostring (x >> 8, bs); /*high byte is major rev.*/ pushchar ('.', bs); --- 863,867 ---- gestalt (gestaltSystemVersion, &x); ! numbertostring (bcdtolong (x >> 8), bs); /* high byte is major rev., 2004-11-16 creedon - convert from bcd for correct display on Mac OS X */ pushchar ('.', bs); *************** *** 955,958 **** --- 953,974 ---- + unsigned long bcdtolong (unsigned long bcd) { /* 2004-11-23 creedon, aradke */ + + /* + convert a long value from BCD notation + */ + + unsigned long ret = 0; + unsigned long m = 1; + + do { + ret += m * (bcd & 0x0000000f); + m *= 10; + bcd >>= 4; + + } while (bcd != 0); + + return (ret); + } /* bcdtolong */ \ No newline at end of file Index: wpengine.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/wpengine.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** wpengine.c 31 Oct 2004 20:41:10 -0000 1.4 --- wpengine.c 1 Dec 2004 19:44:45 -0000 1.4.2.1 *************** *** 1846,1851 **** #endif ! if (updatergn == nil) pgErasePageArea (wpbuffer, MEM_NULL); --- 1846,1856 ---- #endif + + #ifdef gray3Dlook + pushbackcolor (&whitecolor); ! eraserect (rcontent); ! #endif ! if (updatergn == nil) pgErasePageArea (wpbuffer, MEM_NULL); *************** *** 1861,1865 **** #ifdef gray3Dlook ! popbackcolor (); #endif --- 1866,1870 ---- #ifdef gray3Dlook ! popbackcolor (); #endif Index: langstartup.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langstartup.c,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** langstartup.c 21 Nov 2004 20:15:26 -0000 1.3.2.1 --- langstartup.c 1 Dec 2004 19:44:45 -0000 1.3.2.2 *************** *** 24,27 **** --- 24,28 ---- ******************************************************************************/ + #include "frontier.h" #include "standard.h" *************** *** 40,58 **** #include "resources.h" #include "WinSockNetEvents.h" ! #define str_isPike "\x06" "isPike" ! #define str_isRadio "\x07" "isRadio" ! #define str_isMac "\x05" "isMac" ! #define str_isWindows "\x09" "isWindows" ! #define str_osFlavor "\x08" "osFlavor" #define str_osMajorVersion "\x0e" "osMajorVersion" #define str_osMinorVersion "\x0e" "osMinorVersion" #define str_osBuildNumber "\x0d" "osBuildNumber" #define str_osVersionString "\x0f" "osVersionString" #define str_osFullNameForDisplay "\x14" "osFullNameForDisplay" #define str_winServicePackNumber "\x14" "winServicePackNumber" ! #define str_isCarbon "\x08" "isCarbon" ! #define str_maxTcpConnections "\x11" "maxTcpConnections" --- 41,65 ---- #include "resources.h" #include "WinSockNetEvents.h" + #if TARGET_API_MAC_CARBON == 1 + #include "CallMachOFrameWork.h" /* 2004-11-19 creedon */ + #endif ! #define str_isPike "\x06" "isPike" ! #define str_isRadio "\x07" "isRadio" ! #define str_isMac "\x05" "isMac" ! #define str_isMacOsClassic "\x0e" "isMacOsClassic" /* 2004-11-19 creedon */ ! #define str_isServer "\x08" "isServer" /* 2004-11-19 creedon */ ! #define str_isWindows "\x09" "isWindows" ! #define str_osFlavor "\x08" "osFlavor" #define str_osMajorVersion "\x0e" "osMajorVersion" #define str_osMinorVersion "\x0e" "osMinorVersion" + #define str_osPointVersion "\x0e" "osPointVersion" /* 2004-11-19 creedon */ #define str_osBuildNumber "\x0d" "osBuildNumber" #define str_osVersionString "\x0f" "osVersionString" #define str_osFullNameForDisplay "\x14" "osFullNameForDisplay" #define str_winServicePackNumber "\x14" "winServicePackNumber" ! #define str_isCarbon "\x08" "isCarbon" ! #define str_maxTcpConnections "\x11" "maxTcpConnections" *************** *** 214,220 **** #ifdef MACVERSION ! bigstring bsversion; unsigned long x; gestalt (gestaltSystemVersion, &x); --- 221,238 ---- #ifdef MACVERSION ! bigstring bsversion, bsos; /* 2004-11-19 creedon - added bsos*/ ! boolean isMacOsClassic, isServer; /* 2004-11-19 creedon */ unsigned long x; + #if TARGET_API_MAC_CARBON == 1 /*PBS 7.028: system.environment.isCarbon*/ + + /* 2004-11-19 creedon - added hcommand, hreturn, bs, response */ + Handle hcommand, hreturn; + bigstring bs; + UInt32 response; + OSErr err; + + #endif + gestalt (gestaltSystemVersion, &x); *************** *** 225,249 **** //langassignstringvalue (ht, str_osFlavor, zerostring); ! langassignlongvalue (ht, str_osMajorVersion, x >> 8); langassignlongvalue (ht, str_osMinorVersion, (x & 0x00f0) >> 4); ! getsystemversionstring (bsversion, nil); langassignstringvalue (ht, str_osVersionString, bsversion); - - langassignstringvalue (ht, str_osFullNameForDisplay, "\x09" "Macintosh"); #if TARGET_API_MAC_CARBON == 1 /*PBS 7.028: system.environment.isCarbon*/ ! langassignbooleanvalue (ht, str_isCarbon, true); #else langassignbooleanvalue (ht, str_isCarbon, false); #endif #endif --- 243,329 ---- //langassignstringvalue (ht, str_osFlavor, zerostring); ! langassignlongvalue (ht, str_osMajorVersion, bcdtolong (x >> 8)); /* 2004-11-19 creedon - convert from bcd for correct display on Mac OS X */ langassignlongvalue (ht, str_osMinorVersion, (x & 0x00f0) >> 4); ! ! langassignlongvalue (ht, str_osPointVersion, x & 0x0f); /* 2004-11-19 creedon */ getsystemversionstring (bsversion, nil); langassignstringvalue (ht, str_osVersionString, bsversion); + /* langassignstringvalue (ht, str_osFullNameForDisplay, "\x09" "Macintosh"); 2004-11-19 creedon - moved to later in code*/ #if TARGET_API_MAC_CARBON == 1 /*PBS 7.028: system.environment.isCarbon*/ ! langassignbooleanvalue (ht, str_isCarbon, true); + /* 2004-11-19 creedon - get mac os build number, full display name, is server*/ + + /* get mac os build number */ + + newtexthandle ("\psw_vers -buildVersion", &hcommand); + + newemptyhandle (&hreturn); + + unixshellcall (hcommand, hreturn); + + texthandletostring (hreturn, bs); + + sethandlesize (hreturn, 0); + + setstringlength (bs, stringlength (bs) - 1); + + langassignstringvalue (ht, str_osBuildNumber, bs); /* get mac os build number */ + + /* get os full display name */ + + copystring ("sw_vers -productName", bs); + + sethandlecontents (bs, stringsize (bs), hcommand); + + unixshellcall (hcommand, hreturn); + + texthandletostring (hreturn, bsos); + + setstringlength (bsos, stringlength (bsos) - 1); /* get os full display name */ + + disposehandle (hcommand); + disposehandle (hreturn); /* get mac os build number and full display name*/ + + /* 2004-11-19 creedon - is mac os classic */ + /* This needs to be checked on Mac OS Classic as well as Mac OS 9 proper. */ + + err = gestalt (gestaltMacOSCompatibilityBoxAttr, &response); + + if ((err == noErr) && ((response & (1 << gestaltMacOSCompatibilityBoxPresent)) != 0)) + isMacOsClassic = true; + else + isMacOsClassic = false; + + /* 2004-11-19 creedon - is server */ + + if (equalstrings (bsos, "\pMac OS X Server")) + isServer = true; + else + isServer = false; /* is server */ + #else langassignbooleanvalue (ht, str_isCarbon, false); + + copystring ("\x06" "Mac OS", bsos); /* 2004-11-19 creedon - Mac OS, used to be Macintosh*/ + + isMacOsClassic = true; /* 2004-11-19 creedon */ + + isServer = false; /* 2004-11-19 creedon */ #endif + langassignbooleanvalue (ht, str_isMacOsClassic, isMacOsClassic); /* 2004-11-19 creedon */ + + langassignstringvalue (ht, str_osFullNameForDisplay, bsos); /* 2004-11-19 creedon - changed "\x06" "Mac OS" to bsos. a calculated value */ + + langassignbooleanvalue (ht, str_isServer, isServer); /* 2004-11-19 creedon */ + #endif *************** *** 251,254 **** --- 331,335 ---- bigstring bsversion, bsservicepack, bsos; + boolean isServer; /* 2004-11-19 creedon */ byte bsflavor [4]; OSVERSIONINFO osinfo; *************** *** 264,269 **** langassignbooleanvalue (ht, str_isWindows, true); ! if (osinfo.dwPlatformId == VER_PLATFORM_WIN32_NT) copystring ("\x02" "NT", bsflavor); else { --- 345,353 ---- langassignbooleanvalue (ht, str_isWindows, true); ! if (osinfo.dwPlatformId == VER_PLATFORM_WIN32_NT) { copystring ("\x02" "NT", bsflavor); + + isServer = true; /* 2004-11-19 creedon */ + } else { *************** *** 272,275 **** --- 356,361 ---- else copystring ("\x02" "98", bsflavor); + + isServer = false; /* 2004-11-19 creedon */ } *************** *** 293,296 **** --- 379,384 ---- langassignbooleanvalue (ht, str_isCarbon, false); /*7.0b28: isCarbon is false on Windows.*/ + + langassignbooleanvalue (ht, str_isServer, isServer); /* 2004-11-19 creedon */ #endif Index: CallMachOFrameWork.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/CallMachOFrameWork.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** CallMachOFrameWork.c 31 Oct 2004 20:41:10 -0000 1.4 --- CallMachOFrameWork.c 1 Dec 2004 19:44:45 -0000 1.4.2.1 *************** *** 178,180 **** return err; ! } \ No newline at end of file --- 178,249 ---- return err; ! } /*LoadFrameworkBundle*/ ! ! ! static UInt32 gluetemplate[6] = {0x3D800000, 0x618C0000, 0x800C0000, 0x804C0004, 0x7C0903A6, 0x4E800420}; ! ! void *convertcfmtomachofuncptr (void *cfmfp) { ! ! /* ! 2004-11-28 aradke: adapted from Apple's CFM_MachO_CFM sample: ! ! http://developer.apple.com/samplecode/CFM_MachO_CFM/CFM_MachO_CFM.html ! ! allocate a block of cfm glue code with instructions for calling the CFM function. ! the caller is responsible for disposal via disposemachofuncptr ! */ ! ! UInt32 *mfp = (UInt32*) NewPtr (sizeof(gluetemplate)); ! ! mfp[0] = gluetemplate[0] | ((UInt32) cfmfp >> 16); ! mfp[1] = gluetemplate[1] | ((UInt32) cfmfp & 0xFFFF); ! mfp[2] = gluetemplate[2]; ! mfp[3] = gluetemplate[3]; ! mfp[4] = gluetemplate[4]; ! mfp[5] = gluetemplate[5]; ! ! MakeDataExecutable (mfp, sizeof(gluetemplate)); ! ! return ((void *) mfp); ! } /*convertcfmtomachofuncptr*/ ! ! ! void disposemachofuncptr (void *mfp) { ! ! if (mfp != nil) ! DisposePtr (mfp); ! } /*disposemachofuncptr*/ ! ! ! typedef struct tvectorstruct { ! ProcPtr procaddr; ! UInt32 toc; ! } tvectorstruct, *tvectorptr; ! ! ! void *convertmachotocfmfuncptr (void *mfp) { ! ! /* ! 2004-11-28 aradke: allocate a fake TVector and set its procptr entry ! to the mach procptr handed to us by the caller. the toc entry can ! safely be set to nil since it's ignored in this context. ! */ ! ! tvectorptr cfmfp = (tvectorptr) NewPtr (sizeof(tvectorstruct)); ! ! if (MemError() == noErr && cfmfp != nil) { ! ! cfmfp->procaddr = (ProcPtr) mfp; ! cfmfp->toc = 0; /*ignored*/ ! } ! ! return ((void *) cfmfp); ! } /*convertmachotocfmfuncptr*/ ! ! ! void disposecfmfuncptr (void *cfmfp) { ! ! if (cfmfp != nil) ! DisposePtr (cfmfp); ! } /*disposecfmfuncptr*/ ! Index: langverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langverbs.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** langverbs.c 9 Nov 2004 20:33:06 -0000 1.5 --- langverbs.c 1 Dec 2004 19:44:45 -0000 1.5.2.1 *************** *** 3142,3151 **** return (callscriptverb (hparam1, v)); - #if defined(WIN95VERSION) || (defined(MACVERSION) && !TARGET_RT_MAC_MACHO) - /* - 2004-11-09 aradke: calling DLLs through the Code Fragment Manager (CFM) - doesn't work yet on Carbon/Mach-O. throw an error instead of crashing. - */ - case dllcallfunc: case calldllfunc: /* this is remaining for historical usage per Dave. rab: 5.0b4 1/6/98 */ --- 3142,3145 ---- *************** *** 3160,3165 **** case dllisloadedfunc: return (dllisloadedverb (hparam1, v)); ! #endif ! case packwindowfunc: return (langpackwindowverb (hparam1, v)); --- 3154,3158 ---- case dllisloadedfunc: return (dllisloadedverb (hparam1, v)); ! case packwindowfunc: return (langpackwindowverb (hparam1, v)); *************** *** 3717,3722 **** } ! case pythondoscriptfunc: ! return (langrunpythonscript (hparam1, v)); --- 3710,3715 ---- } ! //case pythondoscriptfunc: ! // return (langrunpythonscript (hparam1, v)); Index: langdll.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langdll.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** langdll.c 30 Oct 2004 23:15:04 -0000 1.3 --- langdll.c 1 Dec 2004 19:44:45 -0000 1.3.2.1 *************** *** 68,71 **** --- 68,74 ---- #include "langdll.h" + #if defined(MACVERSION) && TARGET_RT_MAC_MACHO + #include "CallMachOFramework.h" + #endif #define NEW_DLL_INTERFACE 1 /* 2002-11-03 AR: defined to enable new DLL interface */ *************** *** 136,185 **** static tydllinfohandle loadeddlls; /* linked list of currently loaded stay-resident DLLs */ - /* - static const XDLLProcTable dllcallbacks = { /+ we create a copy of this struct on the stack for every call +/ - extfrontierAlloc, - extfrontierReAlloc, - extfrontierLock, - extfrontierUnlock, - extfrontierFree, - extfrontierSize, - - extOdbGetCurrentRoot, - extOdbNewFile, - extOdbOpenFile, - extOdbSaveFile, - extOdbCloseFile, - extOdbDefined, - extOdbDelete, - extOdbGetType, - extOdbCountItems, - extOdbGetNthItem, - extOdbGetValue, - extOdbSetValue, - extOdbNewTable, - extOdbGetModDate, - extOdbDisposeValue, - extOdbGetError, - - extDoScript, - extDoScriptText, - - extOdbNewListValue, - extOdbGetListCount, - extOdbDeleteListValue, - extOdbSetListValue, - extOdbGetListValue, - extOdbAddListValue, ! extInvoke, ! extCoerce, - extCallScript, - extCallScriptText, - - extThreadYield, - extThreadSleep - }; - */ #else --- 139,145 ---- static tydllinfohandle loadeddlls; /* linked list of currently loaded stay-resident DLLs */ ! static XDLLProcTable *dllcallbacks; /* global pointer to array of callback functions */ #else *************** *** 1074,1077 **** --- 1034,1041 ---- hnext = (**h).hashlink; + + #if defined(MACVERSION) && TARGET_RT_MAC_MACHO + disposemachofuncptr ((void *) (**h).procaddress); + #endif disposehandle ((Handle) h); *************** *** 1723,1726 **** --- 1687,1694 ---- (**hprocinfo).moduleUPP = (UniversalProcPtr) &(**hprocinfo).moduledesc; } + #elif TARGET_RT_MAC_MACHO + if (err == noErr) { + (**hprocinfo).procaddress = convertcfmtomachofuncptr ((**hprocinfo).procaddress); + } #endif #endif *************** *** 1744,1752 **** */ - XDLLProcTable calltable; boolean fl = false; - fillcalltable (&calltable); - lockhandle ((Handle) hprocinfo); /* just to be sure our data doesn't move around */ --- 1712,1717 ---- *************** *** 1770,1779 **** #if MACVERSION && !TARGET_API_MAC_CARBON #if GENERATINGCFM ! fl = CallUniversalProc ((**hprocinfo).moduleUPP, uppdllcallProcInfo, params, &calltable); #else ! fl = (*(tyDLLEXTROUTINE) ((**hprocinfo).moduleUPP)) (params, &calltable); #endif #else ! fl = (*(**hprocinfo).procaddress) (params, &calltable); #endif --- 1735,1744 ---- #if MACVERSION && !TARGET_API_MAC_CARBON #if GENERATINGCFM ! fl = CallUniversalProc ((**hprocinfo).moduleUPP, uppdllcallProcInfo, params, dllcallbacks); #else ! fl = (*(tyDLLEXTROUTINE) ((**hprocinfo).moduleUPP)) (params, dllcallbacks); #endif #else ! fl = (*(**hprocinfo).procaddress) (params, dllcallbacks); #endif *************** *** 1913,1916 **** --- 1878,1885 ---- /* Dispose proc info here because we didn't ask for the hash table to be built */ + #if defined(MACVERSION) && TARGET_RT_MAC_MACHO + disposemachofuncptr ((void*) (**hprocinfo).procaddress); + #endif + disposehandle ((Handle) hprocinfo); *************** *** 2375,2394 **** call the dll. */ - XDLLProcTable calltable; boolean fl = false; - /*Need to initialize the callback table*/ - fillcalltable (&calltable); - //#endif - - - // dllcall.frontiercallback = ??? - - // - releasethreadglobals (); #ifdef WIN95VERSION ! fl = (*(dllinfo->procAddress)) (dllcall, &calltable); #endif --- 2344,2353 ---- call the dll. */ boolean fl = false; releasethreadglobals (); #ifdef WIN95VERSION ! fl = (*(dllinfo->procAddress)) (dllcall, dllcallbacks); #endif *************** *** 2397,2407 **** //Code change by Timothy Paustian Friday, June 16, 2000 1:13:28 PM //Changed to Opaque call for Carbon - we don't need UPPs in Carbon. ! //fl = (*(tyDLLEXTROUTINE) (dllinfo->moduleUPP)) (dllcall, &calltable); // call it ! fl = (*(dllinfo->procAddress)) (dllcall, &calltable); // call it #else #if GENERATINGCFM ! fl = CallUniversalProc (dllinfo->moduleUPP, uppdllcallProcInfo, dllcall, &calltable); #else ! fl = (*(tyDLLEXTROUTINE) (dllinfo->moduleUPP)) (dllcall, &calltable); // call it #endif #endif --- 2356,2366 ---- //Code change by Timothy Paustian Friday, June 16, 2000 1:13:28 PM //Changed to Opaque call for Carbon - we don't need UPPs in Carbon. ! //fl = (*(tyDLLEXTROUTINE) (dllinfo->moduleUPP)) (dllcall, dllcallbacks); // call it ! fl = (*(dllinfo->procAddress)) (dllcall, dllcallbacks); // call it #else #if GENERATINGCFM ! fl = CallUniversalProc (dllinfo->moduleUPP, uppdllcallProcInfo, dllcall, dllcallbacks); #else ! fl = (*(tyDLLEXTROUTINE) (dllinfo->moduleUPP)) (dllcall, dllcallbacks); // call it #endif #endif *************** *** 2415,2485 **** } /*langcalldll*/ - #endif /* NEW_DLL_INTERFACE */ - - void fillcalltable (XDLLProcTable * calltable) { ! /* ! 2003-06-16 AR: We got some crash reports on Mac OS Classic ! implicating the new DLL interface where the stdlogs did not ! include a proper stack backtrace. Therefore, let's abandon ! the idea of using a global dllcallbacks table and switch ! back to building it on the fly for every call. ! */ ! /* ! #ifdef NEW_DLL_INTERFACE ! *calltable = dllcallbacks; ! ! #else ! */ ! calltable->xMemAlloc = extfrontierAlloc; ! calltable->xMemResize = extfrontierReAlloc; ! calltable->xMemLock = extfrontierLock; ! calltable->xMemUnlock = extfrontierUnlock; ! calltable->xMemFree = extfrontierFree; ! calltable->xMemGetSize = extfrontierSize; ! calltable->xOdbGetCurrentRoot = extOdbGetCurrentRoot; ! calltable->xOdbNewFile = extOdbNewFile; ! calltable->xOdbOpenFile = extOdbOpenFile; ! calltable->xOdbSaveFile = extOdbSaveFile; ! calltable->xOdbCloseFile = extOdbCloseFile; ! calltable->xOdbDefined = extOdbDefined; ! calltable->xOdbDelete = extOdbDelete; ! calltable->xOdbGetType = extOdbGetType; ! calltable->xOdbCountItems = extOdbCountItems; ! calltable->xOdbGetNthItem = extOdbGetNthItem; ! calltable->xOdbGetValue = extOdbGetValue; ! calltable->xOdbSetValue = extOdbSetValue; ! calltable->xOdbNewTable = extOdbNewTable; ! calltable->xOdbGetModDate = extOdbGetModDate; ! calltable->xOdbDisposeValue = extOdbDisposeValue; ! calltable->xOdbGetError = extOdbGetError; ! calltable->xDoScript = extDoScript; ! calltable->xDoScriptText = extDoScriptText; ! calltable->xOdbNewListValue = extOdbNewListValue; ! calltable->xOdbGetListCount = extOdbGetListCount; ! calltable->xOdbDeleteListValue = extOdbDeleteListValue; ! calltable->xOdbSetListValue = extOdbSetListValue; ! calltable->xOdbGetListValue = extOdbGetListValue; ! calltable->xOdbAddListValue = extOdbAddListValue; ! calltable->xInvoke = extInvoke; ! calltable->xCoerce = extCoerce; ! ! calltable->xCallScript = extCallScript; ! calltable->xCallScriptText = extCallScriptText; ! calltable->xThreadYield = extThreadYield; ! calltable->xThreadSleep = extThreadSleep; ! /* #endif - */ - } /*fillcalltable*/ --- 2374,2531 ---- } /*langcalldll*/ #endif /* NEW_DLL_INTERFACE */ ! void fillcalltable (XDLLProcTable *pt) { ! #if defined(MACVERSION) && TARGET_RT_MAC_MACHO ! pt->xMemAlloc = convertmachotocfmfuncptr (&extfrontierAlloc); ! pt->xMemResize = convertmachotocfmfuncptr (&extfrontierReAlloc); ! pt->xMemLock = convertmachotocfmfuncptr (&extfrontierLock); ! pt->xMemUnlock = convertmachotocfmfuncptr (&extfrontierUnlock); ! pt->xMemFree = convertmachotocfmfuncptr (&extfrontierFree); ! pt->xMemGetSize = convertmachotocfmfuncptr (&extfrontierSize); ! pt->xOdbGetCurrentRoot = convertmachotocfmfuncptr (&extOdbGetCurrentRoot); ! pt->xOdbNewFile = convertmachotocfmfuncptr (&extOdbNewFile); ! pt->xOdbOpenFile = convertmachotocfmfuncptr (&extOdbOpenFile); ! pt->xOdbSaveFile = convertmachotocfmfuncptr (&extOdbSaveFile); ! pt->xOdbCloseFile = convertmachotocfmfuncptr (&extOdbCloseFile); ! pt->xOdbDefined = convertmachotocfmfuncptr (&extOdbDefined); ! pt->xOdbDelete = convertmachotocfmfuncptr (&extOdbDelete); ! pt->xOdbGetType = convertmachotocfmfuncptr (&extOdbGetType); ! pt->xOdbCountItems = convertmachotocfmfuncptr (&extOdbCountItems); ! pt->xOdbGetNthItem = convertmachotocfmfuncptr (&extOdbGetNthItem); ! pt->xOdbGetValue = convertmachotocfmfuncptr (&extOdbGetValue); ! pt->xOdbSetValue = convertmachotocfmfuncptr (&extOdbSetValue); ! pt->xOdbNewTable = convertmachotocfmfuncptr (&extOdbNewTable); ! pt->xOdbGetModDate = convertmachotocfmfuncptr (&extOdbGetModDate); ! pt->xOdbDisposeValue = convertmachotocfmfuncptr (&extOdbDisposeValue); ! pt->xOdbGetError = convertmachotocfmfuncptr (&extOdbGetError); ! pt->xDoScript = convertmachotocfmfuncptr (&extDoScript); ! pt->xDoScriptText = convertmachotocfmfuncptr (&extDoScriptText); ! pt->xOdbNewListValue = convertmachotocfmfuncptr (&extOdbNewListValue); ! pt->xOdbGetListCount = convertmachotocfmfuncptr (&extOdbGetListCount); ! pt->xOdbDeleteListValue = convertmachotocfmfuncptr (&extOdbDeleteListValue); ! pt->xOdbSetListValue = convertmachotocfmfuncptr (&extOdbSetListValue); ! pt->xOdbGetListValue = convertmachotocfmfuncptr (&extOdbGetListValue); ! pt->xOdbAddListValue = convertmachotocfmfuncptr (&extOdbAddListValue); ! pt->xInvoke = convertmachotocfmfuncptr (&extInvoke); ! pt->xCoerce = convertmachotocfmfuncptr (&extCoerce); ! ! pt->xCallScript = convertmachotocfmfuncptr (&extCallScript); ! pt->xCallScriptText = convertmachotocfmfuncptr (&extCallScriptText); ! ! pt->xThreadYield = convertmachotocfmfuncptr (&extThreadYield); ! pt->xThreadSleep = convertmachotocfmfuncptr (&extThreadSleep); ! ! #else ! ! pt->xMemAlloc = &extfrontierAlloc; ! pt->xMemResize = &extfrontierReAlloc; ! pt->xMemLock = &extfrontierLock; ! pt->xMemUnlock = &extfrontierUnlock; ! pt->xMemFree = &extfrontierFree; ! pt->xMemGetSize = &extfrontierSize; ! ! pt->xOdbGetCurrentRoot = &extOdbGetCurrentRoot; ! pt->xOdbNewFile = &extOdbNewFile; ! pt->xOdbOpenFile = &extOdbOpenFile; ! pt->xOdbSaveFile = &extOdbSaveFile; ! pt->xOdbCloseFile = &extOdbCloseFile; ! pt->xOdbDefined = &extOdbDefined; ! pt->xOdbDelete = &extOdbDelete; ! pt->xOdbGetType = &extOdbGetType; ! pt->xOdbCountItems = &extOdbCountItems; ! pt->xOdbGetNthItem = &extOdbGetNthItem; ! pt->xOdbGetValue = &extOdbGetValue; ! pt->xOdbSetValue = &extOdbSetValue; ! pt->xOdbNewTable = &extOdbNewTable; ! pt->xOdbGetModDate = &extOdbGetModDate; ! pt->xOdbDisposeValue = &extOdbDisposeValue; ! pt->xOdbGetError = &extOdbGetError; ! ! pt->xDoScript = &extDoScript; ! pt->xDoScriptText = &extDoScriptText; ! ! pt->xOdbNewListValue = &extOdbNewListValue; ! pt->xOdbGetListCount = &extOdbGetListCount; ! pt->xOdbDeleteListValue = &extOdbDeleteListValue; ! pt->xOdbSetListValue = &extOdbSetListValue; ! pt->xOdbGetListValue = &extOdbGetListValue; ! pt->xOdbAddListValue = &extOdbAddListValue; ! ! pt->xInvoke = &extInvoke; ! pt->xCoerce = &extCoerce; ! ! pt->xCallScript = &extCallScript; ! pt->xCallScriptText = &extCallScriptText; ! ! pt->xThreadYield = &extThreadYield; ! pt->xThreadSleep = &extThreadSleep; ! ! #endif ! ! } /*fillcalltable*/ ! ! ! #if 0 ! ! void smashcalltable (XDLLProcTable *pt) { ! ! #if defined(MACVERSION) && TARGET_RT_MAC_MACHO ! ! disposecfmfuncptr (pt->xMemAlloc); ! disposecfmfuncptr (pt->xMemResize); ! disposecfmfuncptr (pt->xMemLock); ! disposecfmfuncptr (pt->xMemUnlock); ! disposecfmfuncptr (pt->xMemFree); ! disposecfmfuncptr (pt->xMemGetSize); ! ! disposecfmfuncptr (pt->xOdbGetCurrentRoot); ! disposecfmfuncptr (pt->xOdbNewFile); ! disposecfmfuncptr (pt->xOdbOpenFile); ! disposecfmfuncptr (pt->xOdbSaveFile); ! disposecfmfuncptr (pt->xOdbCloseFile); ! disposecfmfuncptr (pt->xOdbDefined); ! disposecfmfuncptr (pt->xOdbDelete); ! disposecfmfuncptr (pt->xOdbGetType); ! disposecfmfuncptr (pt->xOdbCountItems); ! disposecfmfuncptr (pt->xOdbGetNthItem); ! disposecfmfuncptr (pt->xOdbGetValue); ! disposecfmfuncptr (pt->xOdbSetValue); ! disposecfmfuncptr (pt->xOdbNewTable); ! disposecfmfuncptr (pt->xOdbGetModDate); ! disposecfmfuncptr (pt->xOdbDisposeValue); ! disposecfmfuncptr (pt->xOdbGetError); ! ! disposecfmfuncptr (pt->xDoScript); ! disposecfmfuncptr (pt->xDoScriptText); ! ! disposecfmfuncptr (pt->xOdbNewListValue); ! disposecfmfuncptr (pt->xOdbGetListCount); ! disposecfmfuncptr (pt->xOdbDeleteListValue); ! disposecfmfuncptr (pt->xOdbSetListValue); ! disposecfmfuncptr (pt->xOdbGetListValue); ! disposecfmfuncptr (pt->xOdbAddListValue); ! ! disposecfmfuncptr (pt->xInvoke); ! disposecfmfuncptr (pt->xCoerce); ! ! disposecfmfuncptr (pt->xCallScript); ! disposecfmfuncptr (pt->xCallScriptText); ! ! disposecfmfuncptr (pt->xThreadYield); ! disposecfmfuncptr (pt->xThreadSleep); ! ! #endif ! } /*smashcalltable*/ ! #endif *************** *** 2738,2739 **** --- 2784,2796 ---- } /*calldllverb*/ + + void dllinitverbs (void) { + + if (dllcallbacks == nil) { + + dllcallbacks = (XDLLProcTable *) malloc (sizeof (XDLLProcTable)); + + if (dllcallbacks != nil) + fillcalltable (dllcallbacks); + } + } /*initdllverbs*/ Index: shellsysverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellsysverbs.c,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** shellsysverbs.c 20 Nov 2004 19:08:52 -0000 1.3.2.1 --- shellsysverbs.c 1 Dec 2004 19:44:45 -0000 1.3.2.2 *************** *** 161,164 **** --- 161,166 ---- isvalidserialnumberfunc, + + showapplicationfunc, hashtablestatsfunc, *************** *** 990,993 **** --- 992,1010 ---- } + case showapplicationfunc: { /*2004-11-28 aradke: re-emerge from system tray*/ + + #ifdef WIN95VERSION + + releasethreadglobals (); + + ShowWindow (shellframewindow, SW_SHOW); + + grabthreadglobals (); + + #endif + + return (setbooleanvalue (true, v)); + } + case hashtablestatsfunc: { |