Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24232 Modified Files: Tag: pre_int64_branch about.c fileloop.c langhtml.c langipc.c langops.c langsystypes.c langvalue.c langverbs.c launch.c memory.c osacomponent.c quickdraw.c timedate.c uisharing.c Log Message: sint64 next changes Index: uisharing.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/uisharing.c,v retrieving revision 1.5 retrieving revision 1.5.6.1 diff -C2 -d -r1.5 -r1.5.6.1 *** uisharing.c 11 Jan 2005 22:48:12 -0000 1.5 --- uisharing.c 14 Feb 2006 11:43:57 -0000 1.5.6.1 *************** *** 1183,1195 **** return (false); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&result, hbinary); ! ! #else ! ! *hbinary = result.dataHandle; ! #endif *binarytype = result.descriptorType; --- 1183,1198 ---- return (false); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&result, hbinary); ! #if AEDISPOSAL == 1 ! // possible memleak here ! #endif ! #else ! ! *hbinary = result.dataHandle; ! ! #endif *binarytype = result.descriptorType; *************** *** 1210,1222 **** return (false); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&result, &htext); ! ! #else ! ! htext = result.dataHandle; ! ! #endif lenstring = GetHandleSize (htext); --- 1213,1228 ---- return (false); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&result, &htext); ! #if AEDISPOSAL == 1 ! // possible memleak here ! #endif ! ! #else ! ! htext = result.dataHandle; ! ! #endif lenstring = GetHandleSize (htext); *************** *** 1240,1248 **** *errcode = AEGetParamPtr ( ! ! event, (AEKeyword) keyword, typeLongInteger, ! ! &actualtype, (Ptr) val, sizeof (long), &actualsize); ! if (*errcode != noErr) return (false); --- 1246,1257 ---- *errcode = AEGetParamPtr ( ! event, ! (AEKeyword) keyword, ! typeLongInteger, ! &actualtype, ! (Ptr) val, ! sizeof (long), ! &actualsize); ! if (*errcode != noErr) return (false); Index: quickdraw.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/quickdraw.c,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -C2 -d -r1.4 -r1.4.6.1 *** quickdraw.c 11 Jan 2005 22:48:10 -0000 1.4 --- quickdraw.c 14 Feb 2006 11:43:57 -0000 1.4.6.1 *************** *** 250,309 **** return (GetMBarHeight ()); /*call Script Manager routine*/ #endif ! #ifdef WIN95VERSION return (GetSystemMetrics (SM_CYMENUSIZE)); #endif ! } /*getmenubarheight*/ - GrafPtr getport (void) { ! #ifdef MACVERSION ! //Code change by Timothy Paustian Friday, June 9, 2000 9:57:48 PM ! //Changed to Opaque call for Carbon ! //This is weird, Shouldn't this be calling GetPort()? ! #if TARGET_API_MAC_CARBON == 1 ! return GetQDGlobalsThePort(); ! #else ! return (quickdrawglobal (thePort)); ! #endif ! #endif ! #ifdef WIN95VERSION ! return (currentport); ! #endif ! } /*getport*/ void setport (GrafPtr port) { ! #ifdef MACVERSION ! SetPort (port); ! #endif ! #ifdef WIN95VERSION ! if (winportpushed) ! return; ! if (port != currentport) { ! ! if (currentport != NULL) { ! ! ReleaseDC (currentport, currentportDC); ! ! currentport = NULL; ! ! currentportDC = NULL; ! } ! ! if (port != NULL) { ! ! currentport = port; ! ! currentportDC = GetDC (port); ! } ! } ! #endif ! } /*setport*/ --- 250,363 ---- return (GetMBarHeight ()); /*call Script Manager routine*/ #endif ! #ifdef WIN95VERSION return (GetSystemMetrics (SM_CYMENUSIZE)); #endif ! } /*getmenubarheight*/ + CGrafPtr + getmacwindowport(WindowPtr theWindow) + { + #if TARGET_API_MAC_CARBON == 1 + return(GetWindowPort(theWindow)); + #else + return((CGrafPtr)theWindow); + #endif + } ! CGrafPtr ! getmacqdglobaltheport(void) ! { ! #if TARGET_API_MAC_CARBON == 1 ! return(GetQDGlobalsThePort()); ! #else ! return(qd.thePort); ! #endif ! } ! Rect ! getwindowportrect(WindowPtr theWindow) ! { ! #ifdef MACVERSION ! ! # if ACCESSOR_CALLS_ARE_FUNCTIONS == 1 ! Rect r; ! ! CGrafPtr thePort = GetWindowPort(theWindow); ! ! GetPortBounds(thePort, &r); ! ! return(r); ! ! # else ! ! return ((*theWindow).portRect); ! ! # endif ! #endif ! ! #ifdef WIN95VERSION ! RECT winrect; ! ! GetClientRect (theWindow, &winrect); ! winrecttorect (&winrect, &r); ! ! return(r); ! #endif ! } ! ! void ! invalmacwindowrect(WindowPtr aWindow, Rect aRect) ! { ! # if TARGET_API_MAC_CARBON == 1 ! InvalWindowRect (aWindow, &aRect); ! #else ! InvalRect (&(*aWindow).portRect); ! #endif ! } ! ! ! GrafPtr getport (void) { ! #ifdef MACVERSION ! return(getmacqdglobaltheport()); ! #endif ! ! #ifdef WIN95VERSION ! return (currentport); ! #endif ! } /*getport*/ void setport (GrafPtr port) { ! #ifdef MACVERSION ! SetPort (port); ! #endif ! #ifdef WIN95VERSION ! if (winportpushed) ! return; ! if (port != currentport) { ! ! if (currentport != NULL) { ! ! ReleaseDC (currentport, currentportDC); ! ! currentport = NULL; ! ! currentportDC = NULL; ! } ! ! if (port != NULL) { ! ! currentport = port; ! ! currentportDC = GetDC (port); ! } ! } ! #endif ! } /*setport*/ Index: launch.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/launch.c,v retrieving revision 1.7 retrieving revision 1.7.6.1 diff -C2 -d -r1.7 -r1.7.6.1 *** launch.c 11 Jan 2005 22:48:08 -0000 1.7 --- launch.c 14 Feb 2006 11:43:57 -0000 1.7.6.1 *************** *** 937,951 **** ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! newdescnull (&addrdesc, typeNull); ! ! #else ! ! addrdesc.descriptorType = typeNull; ! ! addrdesc.dataHandle = nil; ! ! #endif AECreateAppleEvent (eventclass, eventid, &addrdesc, kAutoGenerateReturnID, kAnyTransactionID, &event); --- 937,951 ---- ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! newdescnull (&addrdesc, typeNull); ! ! #else ! ! addrdesc.descriptorType = typeNull; ! ! addrdesc.dataHandle = nil; ! ! #endif AECreateAppleEvent (eventclass, eventid, &addrdesc, kAutoGenerateReturnID, kAnyTransactionID, &event); *************** *** 954,972 **** AECreateList (nil, 0, false, &doclist); /*create list for the fsspec*/ ! //AEPutPtr (&doclist, 0, typeFSS, (Ptr) &fs, sizeof (fs)); /* put filespec on the list%/ ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! newdescwithhandle (&docdesc, typeAlias, (Handle) halias); ! ! #else ! ! docdesc.descriptorType = typeAlias; ! ! docdesc.dataHandle = (Handle) halias; ! ! #endif ! AEPutDesc (&doclist, 0, &docdesc); /*put alias on the list*/ --- 954,972 ---- AECreateList (nil, 0, false, &doclist); /*create list for the fsspec*/ ! //AEPutPtr (&doclist, 0, typeFSS, (Ptr) &fs, sizeof (fs)); /* put filespec on the list%/ ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! newdescwithhandle (&docdesc, typeAlias, (Handle) halias); ! ! #else ! ! docdesc.descriptorType = typeAlias; ! ! docdesc.dataHandle = (Handle) halias; ! ! #endif ! AEPutDesc (&doclist, 0, &docdesc); /*put alias on the list*/ *************** *** 984,998 **** if (errcode != noErr) /*shouldn't fail, but...*/ return (errcode); - - #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ - - copydatahandle (&launchdesc, (Handle*) appparams); ! #else ! ! *appparams = (AppParametersHandle) launchdesc.dataHandle; ! ! #endif return (noErr); } /*getlaunchappparams*/ --- 984,1001 ---- if (errcode != noErr) /*shouldn't fail, but...*/ return (errcode); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&launchdesc, (Handle*) appparams); ! #if AEDISPOSAL == 1 ! // possible memleak here ! #endif + #else + + *appparams = (AppParametersHandle) launchdesc.dataHandle; + + #endif + return (noErr); } /*getlaunchappparams*/ Index: langverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langverbs.c,v retrieving revision 1.12.2.2 retrieving revision 1.12.2.3 diff -C2 -d -r1.12.2.2 -r1.12.2.3 *** langverbs.c 2 Feb 2006 18:39:59 -0000 1.12.2.2 --- langverbs.c 14 Feb 2006 11:43:57 -0000 1.12.2.3 *************** *** 931,939 **** return (false); ! #if !flruntime langunsettarget (htable, bs); /*make sure it's not still the target*/ ! #endif (*vreturned).data.flvalue = hashtabledelete (htable, bs); --- 931,939 ---- return (false); ! #if !flruntime langunsettarget (htable, bs); /*make sure it's not still the target*/ ! #endif (*vreturned).data.flvalue = hashtabledelete (htable, bs); *************** *** 1869,1873 **** boolean langreleasesemaphores (hdlprocessrecord xxxhp) { ! pushhashtable (semaphoretable); // for visit's hashdelete --- 1869,1873 ---- boolean langreleasesemaphores (hdlprocessrecord xxxhp) { ! #pragma unused (xxxhp) pushhashtable (semaphoretable); // for visit's hashdelete Index: langops.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langops.c,v retrieving revision 1.4.6.2 retrieving revision 1.4.6.3 diff -C2 -d -r1.4.6.2 -r1.4.6.3 *** langops.c 2 Feb 2006 18:39:59 -0000 1.4.6.2 --- langops.c 14 Feb 2006 11:43:57 -0000 1.4.6.3 *************** *** 917,920 **** --- 917,924 ---- case rgbvaluetype: case objspecvaluetype: + #if LONGINT_LONGDATE == 1 + case longlongintvaluetype: + case longdatetimevaluetype: + #endif case aliasvaluetype: x = gethandlesize (v.data.binaryvalue); Index: about.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/about.c,v retrieving revision 1.6.8.1 retrieving revision 1.6.8.2 diff -C2 -d -r1.6.8.1 -r1.6.8.2 *** about.c 2 Feb 2006 18:39:59 -0000 1.6.8.1 --- about.c 14 Feb 2006 11:43:57 -0000 1.6.8.2 *************** *** 889,895 **** // return (false); ! #ifdef WIN95VERSION if (grabcount > 0) ! #endif if (aboutport != nil && flhavemiscrect) { //Code change by Timothy Paustian Monday, August 21, 2000 4:17:36 PM --- 889,895 ---- // return (false); ! #ifdef WIN95VERSION if (grabcount > 0) ! #endif if (aboutport != nil && flhavemiscrect) { //Code change by Timothy Paustian Monday, August 21, 2000 4:17:36 PM *************** *** 897,905 **** //an implicit cast. This will not work on OS X CGrafPtr thePort; ! #if TARGET_API_MAC_CARBON == 1 thePort = GetWindowPort((WindowRef) aboutport); ! #else thePort = (CGrafPtr)aboutport; ! #endif pushport(thePort); --- 897,905 ---- //an implicit cast. This will not work on OS X CGrafPtr thePort; ! #if TARGET_API_MAC_CARBON == 1 thePort = GetWindowPort((WindowRef) aboutport); ! #else thePort = (CGrafPtr)aboutport; ! #endif pushport(thePort); Index: langipc.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langipc.c,v retrieving revision 1.6.6.1 retrieving revision 1.6.6.2 diff -C2 -d -r1.6.6.1 -r1.6.6.2 *** langipc.c 2 Feb 2006 18:39:59 -0000 1.6.6.1 --- langipc.c 14 Feb 2006 11:43:57 -0000 1.6.6.2 *************** *** 342,370 **** break; ! ! #ifdef oplanglists case listvaluetype: case recordvaluetype: if (!langipcconvertoplist (v, &aelist)) return (false); ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&aelist, &hval); ! ! #else ! ! hval = aelist.dataHandle; ! ! #endif ! disposevaluerecord (*v, false); /*override exempt, below*/ ! setnilvalue (v); /*clear out value*/ ! break; ! ! #endif ! case addressvaluetype: /*addresses need to be sent as strings for safety*/ getaddresspath (*v, bsval); --- 342,372 ---- break; ! ! #ifdef oplanglists case listvaluetype: case recordvaluetype: if (!langipcconvertoplist (v, &aelist)) return (false); ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&aelist, &hval); ! #if AEDISPOSAL == 1 ! // possible memleak here ! #endif ! #else ! ! hval = aelist.dataHandle; ! ! #endif ! disposevaluerecord (*v, false); /*override exempt, below*/ ! setnilvalue (v); /*clear out value*/ ! break; ! ! #endif ! case addressvaluetype: /*addresses need to be sent as strings for safety*/ getaddresspath (*v, bsval); *************** *** 1641,1667 **** if (landgetverbattr (hverb, 'subj', typeFSS, &subject) == noErr) { /*4.1b7 dmb*/ ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! FSSpec fs; ! ! Handle h; ! ! copydatahandle (&subject, &h); ! ! fs = **(FSSpec **) h; ! ! disposehandle (h); ! ! #else ! ! FSSpec fs = **(FSSpec **) subject.dataHandle; ! ! #endif ! wroot = shellfindfilewindow (&fs); ! if (wroot == nil) { ! // landreturnerror } --- 1643,1669 ---- if (landgetverbattr (hverb, 'subj', typeFSS, &subject) == noErr) { /*4.1b7 dmb*/ ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! FSSpec fs; ! ! Handle h; ! ! copydatahandle (&subject, &h); ! ! fs = **(FSSpec **) h; ! ! disposehandle (h); ! ! #else ! ! FSSpec fs = **(FSSpec **) subject.dataHandle; ! ! #endif ! wroot = shellfindfilewindow (&fs); ! if (wroot == nil) { ! // landreturnerror } *************** *** 2268,2300 **** case listvaluetype: case recordvaluetype: ! #ifdef version5orgreater ! return (langipcconvertoplist (&val, listdesc)); ! #else ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! { ! Handle hcopy; ! ! copydatahandle (listdesc, &hcopy); ! ! if (!stealbinaryhandle (&val, &hcopy)) ! return (false); ! ! disposehandle (hcopy); ! } ! ! #else ! ! if (!stealbinaryhandle (&val, &(*listdesc).dataHandle)) ! return (false); ! ! #endif ! ! (*listdesc).descriptorType = typeAERecord; ! ! return (true); ! #endif ! case novaluetype: case longvaluetype: --- 2270,2295 ---- case listvaluetype: case recordvaluetype: ! #ifdef version5orgreater ! return (langipcconvertoplist (&val, listdesc)); ! #else ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! { ! Handle hcopy; ! ! copydatahandle (listdesc, &hcopy); ! ! if (!stealbinaryhandle (&val, &hcopy)) ! return (false); ! ! disposehandle (hcopy); ! } ! #else ! if (!stealbinaryhandle (&val, &(*listdesc).dataHandle)) ! return (false); ! #endif ! (*listdesc).descriptorType = typeAERecord; ! ! return (true); ! #endif case novaluetype: case longvaluetype: *************** *** 2402,2408 **** /*don't dispose itemdesc handle -- it's in the temp stack*/ ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! { Handle hcopy; boolean fl = false; --- 2397,2402 ---- /*don't dispose itemdesc handle -- it's in the temp stack*/ ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! { Handle hcopy; boolean fl = false; *************** *** 2411,2414 **** --- 2405,2411 ---- fl = setbinarysymbolval (htable, bsname, hcopy, listdesc.descriptorType); + #if AEDISPOSAL == 1 + // possible memleak here + #endif //disposehandle (hcopy); *************** *** 2416,2427 **** if (!fl) return (false); ! } ! ! #else ! ! if (!setbinarysymbolval (htable, bsname, listdesc.dataHandle, listdesc.descriptorType)) ! return (false); ! ! #endif (*vreturned).data.flvalue = true; --- 2413,2424 ---- if (!fl) return (false); ! } ! ! #else ! ! if (!setbinarysymbolval (htable, bsname, listdesc.dataHandle, listdesc.descriptorType)) ! return (false); ! ! #endif (*vreturned).data.flvalue = true; *************** *** 4265,4280 **** AEDisposeDesc (&desc); ! exit: ! langipcunhookfasterrors (); ! landpopfastcontext (&savecontext); ! ! #if flcomponent ! ! RestoreA5 (curA5); ! ! #endif ! return (err); } /*langipcfastgetobject*/ --- 4262,4277 ---- AEDisposeDesc (&desc); ! exit: ! langipcunhookfasterrors (); ! landpopfastcontext (&savecontext); ! ! #if flcomponent ! ! RestoreA5 (curA5); ! ! #endif ! return (err); } /*langipcfastgetobject*/ *************** *** 4324,4327 **** --- 4321,4327 ---- if (!setpackedobject (hcopy1, hcopy2)) goto exit; + #if AEDISPOSAL == 1 + // possible memleak here + #endif } *************** *** 4400,4419 **** setemptystring (bs); ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! { Handle h; ! copydatahandle (&script, &h); fl = langrunhandle (h, bs); ! } ! ! #else ! ! fl = langrunhandle (script.dataHandle, bs); /*consumes dataHandle*/ ! ! #endif flscriptrunning = flscriptwasrunning; --- 4400,4422 ---- setemptystring (bs); ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! { Handle h; ! copydatahandle (&script, &h); + #if AEDISPOSAL == 1 + // possible memleak here + #endif fl = langrunhandle (h, bs); ! } ! ! #else ! ! fl = langrunhandle (script.dataHandle, bs); /*consumes dataHandle*/ ! ! #endif flscriptrunning = flscriptwasrunning; *************** *** 4434,4444 **** landpopfastcontext (&savecontext); ! #else /*this code assumes that the component manger is present*/ ! comp = OpenComponent (osacomponent); ! if (comp == nil) err = memFullErr; - else { --- 4437,4446 ---- landpopfastcontext (&savecontext); ! #else /* this code assumes that the component manger is present */ ! comp = OpenComponent (osacomponent); ! if (comp == nil) err = memFullErr; else { *************** *** 4462,4473 **** } ! #endif ! ! #if flcomponent && TARGET_API_MAC_OS8 ! RestoreA5 (curA5); ! ! #endif ! return (err); } /*langipchandlefastscript*/ --- 4464,4475 ---- } ! #endif ! ! #if flcomponent && TARGET_API_MAC_OS8 ! RestoreA5 (curA5); ! ! #endif ! return (err); } /*langipchandlefastscript*/ Index: langsystypes.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langsystypes.c,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -C2 -d -r1.6.2.1 -r1.6.2.2 *** langsystypes.c 2 Feb 2006 18:39:59 -0000 1.6.2.1 --- langsystypes.c 14 Feb 2006 11:43:57 -0000 1.6.2.2 *************** *** 109,137 **** } else ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! { ! Handle hcopy1, hcopy2; ! boolean fl = false; ! ! copydatahandle (d1, &hcopy1); ! ! copydatahandle (d2, &hcopy2); ! ! fl = equalhandles (hcopy1, hcopy2); ! ! disposehandle (hcopy1); ! ! disposehandle (hcopy2); ! ! return (fl); ! } ! ! #else ! ! return (equalhandles ((*d1).dataHandle, (*d2).dataHandle)); ! ! #endif } /*equaldescriptors*/ --- 109,132 ---- } else ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! { ! Handle hcopy1, hcopy2; ! boolean fl = false; ! ! copydatahandle (d1, &hcopy1); ! ! copydatahandle (d2, &hcopy2); ! ! fl = equalhandles (hcopy1, hcopy2); ! ! disposehandle (hcopy1); ! ! disposehandle (hcopy2); ! ! return (fl); ! } ! #else ! return (equalhandles ((*d1).dataHandle, (*d2).dataHandle)); ! #endif } /*equaldescriptors*/ *************** *** 1446,1467 **** disposevaluerecord (*v, true); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! { Handle h; ! copydatahandle (&token, &h); ! if (!setheapvalue (h, stringvaluetype, v)) return (false); ! } ! ! #else ! ! if (!setheapvalue (token.dataHandle, stringvaluetype, v)) /*consumes handle*/ ! return (false); ! ! #endif ! return (stringtoaddress (v)); } /*objspectoaddress*/ --- 1441,1460 ---- disposevaluerecord (*v, true); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! { Handle h; ! copydatahandle (&token, &h); ! #if AEDISPOSAL == 1 ! // possible memleak here ! #endif if (!setheapvalue (h, stringvaluetype, v)) return (false); ! } ! #else ! if (!setheapvalue (token.dataHandle, stringvaluetype, v)) /*consumes handle*/ ! return (false); ! #endif ! return (stringtoaddress (v)); } /*objspectoaddress*/ *************** *** 1539,1559 **** disposevaluerecord (*v, true); ! ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! { Handle h; ! copydatahandle (&objdesc, &h); ! return (setheapvalue (h, objspecvaluetype, v)); ! } ! ! #else ! ! return (setheapvalue (objdesc.dataHandle, objspecvaluetype, v)); ! ! #endif } /*filespectoobjspec*/ --- 1532,1549 ---- disposevaluerecord (*v, true); ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! { Handle h; ! copydatahandle (&objdesc, &h); ! #if AEDISPOSAL == 1 ! // possible memleak here ! #endif return (setheapvalue (h, objspecvaluetype, v)); ! } ! #else ! return (setheapvalue (objdesc.dataHandle, objspecvaluetype, v)); ! #endif } /*filespectoobjspec*/ *************** *** 1824,1845 **** goto exit; ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! { Handle hcopy; ! copydatahandle (&desc, &hcopy); ! op = **(OSType **)hcopy; ! disposehandle (hcopy); ! } - #else - - op = **(OSType **)desc.dataHandle; - - #endif - operatortostring (op, bsop); --- 1814,1831 ---- goto exit; ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! { Handle hcopy; ! copydatahandle (&desc, &hcopy); ! op = **(OSType **)hcopy; ! disposehandle (hcopy); ! } ! #else ! op = **(OSType **)desc.dataHandle; ! #endif operatortostring (op, bsop); *************** *** 1892,1900 **** if (!getobjspeckeydesc (testdata, keyAECompOperator, &desc)) goto exit; ! ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! { Handle hcopy; --- 1878,1884 ---- if (!getobjspeckeydesc (testdata, keyAECompOperator, &desc)) goto exit; ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! { Handle hcopy; *************** *** 1904,1914 **** disposehandle (hcopy); ! } ! ! #else ! ! op = **(OSType **)desc.dataHandle; ! ! #endif operatortostring (op, bsop); --- 1888,1895 ---- disposehandle (hcopy); ! } ! #else ! op = **(OSType **)desc.dataHandle; ! #endif operatortostring (op, bsop); *************** *** 2400,2420 **** return (false); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! { Handle h; ! copydatahandle (&objectdesc, &h); return (setheapvalue (h, objspecvaluetype, v)); ! } ! ! #else ! ! return (setheapvalue (objectdesc.dataHandle, objspecvaluetype, v)); ! ! #endif ! } /*switch*/ ! } /*coercetoobjspec*/ --- 2381,2400 ---- return (false); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! { Handle h; ! copydatahandle (&objectdesc, &h); + #if AEDISPOSAL == 1 + // possible memleak here + #endif return (setheapvalue (h, objspecvaluetype, v)); ! } ! #else ! return (setheapvalue (objectdesc.dataHandle, objspecvaluetype, v)); ! #endif ! } /*switch*/ ! } /*coercetoobjspec*/ *************** *** 2443,2452 **** ! #ifdef flsystem6 if (!langcanuseappleevents ()) return (false); ! #endif if (!getostypevalue (hparam1, 1, &class)) --- 2423,2432 ---- ! #ifdef flsystem6 if (!langcanuseappleevents ()) return (false); ! #endif if (!getostypevalue (hparam1, 1, &class)) *************** *** 2510,2529 **** return (false); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! { Handle h; ! copydatahandle (&objspecdesc, &h); ! return (setheapvalue (h, objspecvaluetype, val)); ! } ! ! #else ! ! return (setheapvalue (objspecdesc.dataHandle, objspecvaluetype, val)); ! ! #endif ! } /*setobjspecverb*/ --- 2490,2507 ---- return (false); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! { Handle h; ! copydatahandle (&objspecdesc, &h); ! #if AEDISPOSAL == 1 ! // possible memleak here ! #endif return (setheapvalue (h, objspecvaluetype, val)); ! } ! #else ! return (setheapvalue (objspecdesc.dataHandle, objspecvaluetype, val)); ! #endif ! } /*setobjspecverb*/ *************** *** 2563,2571 **** boolean fltmp = false; ! #if TARGET_API_MAC_CARBON == 1 ! ! Handle hcopy; ! ! #endif assert (h != nil); --- 2541,2547 ---- boolean fltmp = false; ! #if TARGET_API_MAC_CARBON == 1 ! Handle hcopy; ! #endif assert (h != nil); *************** *** 2591,2606 **** if (!evaluateobject ((**h).param1, nulltype, &containerdesc)) /*daisy-chain recursion*/ return (false); ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&containerdesc, &hcopy); ! ! pushtmpstack (hcopy); ! ! #else ! ! pushtmpstack (containerdesc.dataHandle); /*until it's merged*/ ! ! #endif fltmp = true; --- 2567,2580 ---- if (!evaluateobject ((**h).param1, nulltype, &containerdesc)) /*daisy-chain recursion*/ return (false); ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&containerdesc, &hcopy); ! ! pushtmpstack (hcopy); ! ! #else ! pushtmpstack (containerdesc.dataHandle); /*until it's merged*/ ! #endif fltmp = true; *************** *** 2761,2786 **** AEDesc valdesc; OSErr errcode; ! ! #if TARGET_API_MAC_CARBON == 1 ! ! Handle hcopy; ! ! #endif ! if (!evaluateobject ((**h).param1, typeObjectBeingExamined, &objectdesc)) return (false); ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&objectdesc, &hcopy); ! ! pushtmpstack (hcopy); ! ! #else ! ! pushtmpstack (objectdesc.dataHandle); /*until it's merged*/ ! ! #endif ! if (!evaluatetree ((**h).param2, &val)) return (false); --- 2735,2756 ---- AEDesc valdesc; OSErr errcode; ! ! #if TARGET_API_MAC_CARBON == 1 ! Handle hcopy; ! #endif ! if (!evaluateobject ((**h).param1, typeObjectBeingExamined, &objectdesc)) return (false); ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! copydatahandle (&objectdesc, &hcopy); ! #if AEDISPOSAL == 1 ! // possible memleak here ! #endif ! pushtmpstack (hcopy); ! #else ! pushtmpstack (objectdesc.dataHandle); /*until it's merged*/ ! #endif ! if (!evaluatetree ((**h).param2, &val)) return (false); *************** *** 3011,3021 **** OSErr errcode; boolean fltmp = false; ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! Handle hcopy; ! ! #endif ! assert (h != nil); --- 2981,2989 ---- OSErr errcode; boolean fltmp = false; ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! Handle hcopy; ! #endif ! assert (h != nil); *************** *** 3044,3059 **** if (!evaluateobject ((**hp1).param1, nulltype, &containerdesc)) /*daisy-chain recursion*/ return (false); ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&containerdesc, &hcopy); ! ! pushtmpstack (hcopy); ! ! #else ! ! pushtmpstack (containerdesc.dataHandle); /*until it's merged*/ ! ! #endif fltmp = true; --- 3012,3026 ---- if (!evaluateobject ((**hp1).param1, nulltype, &containerdesc)) /*daisy-chain recursion*/ return (false); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! copydatahandle (&containerdesc, &hcopy); ! ! pushtmpstack (hcopy); ! ! #if AEDISPOSAL == 1 ! // possible memleak here ! #endif ! #else ! pushtmpstack (containerdesc.dataHandle); /*until it's merged*/ ! #endif fltmp = true; *************** *** 3068,3082 **** return (false); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&containerdesc, &hcopy); ! ! pushtmpstack (hcopy); ! ! #else ! ! pushtmpstack (containerdesc.dataHandle); /*until it's merged*/ ! ! #endif fltmp = true; --- 3035,3048 ---- return (false); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! copydatahandle (&containerdesc, &hcopy); ! ! pushtmpstack (hcopy); ! #if AEDISPOSAL == 1 ! // possible memleak here ! #endif ! #else ! pushtmpstack (containerdesc.dataHandle); /*until it's merged*/ ! #endif fltmp = true; *************** *** 3228,3252 **** boolean evaluateobjspec (hdltreenode htree, tyvaluerecord *vreturned) { ! AEDesc objectdesc; ! if (!evaluateobject (htree, typeNull, &objectdesc)) return (false); ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! { Handle h; ! copydatahandle (&objectdesc, &h); return (setheapvalue (h, objspecvaluetype, vreturned)); ! } ! ! #else ! ! return (setheapvalue (objectdesc.dataHandle, objspecvaluetype, vreturned)); ! ! #endif } /*evaluateobjspec*/ --- 3194,3217 ---- boolean evaluateobjspec (hdltreenode htree, tyvaluerecord *vreturned) { ! AEDesc objectdesc; ! if (!evaluateobject (htree, typeNull, &objectdesc)) return (false); ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! { Handle h; ! copydatahandle (&objectdesc, &h); + #if AEDISPOSAL == 1 + // possible memleak here + #endif return (setheapvalue (h, objspecvaluetype, vreturned)); ! } ! #else ! return (setheapvalue (objectdesc.dataHandle, objspecvaluetype, vreturned)); ! #endif } /*evaluateobjspec*/ Index: timedate.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/timedate.c,v retrieving revision 1.10 retrieving revision 1.10.4.1 diff -C2 -d -r1.10 -r1.10.4.1 *** timedate.c 16 Jan 2005 00:30:19 -0000 1.10 --- timedate.c 14 Feb 2006 11:43:57 -0000 1.10.4.1 *************** *** 671,742 **** */ ! #ifdef MACVERSION ! Ptr p = (Ptr) bsdate + 1; ! long n = stringlength (bsdate); ! long used = 0; ! DateCacheRecord cache; ! LongDateRec longdate; ! boolean flgotdate; ! boolean flgottime; ! DateTimeRec shortdate; ! boolean flUseGMT = false; ! long index; ! ! index = stringlength (bsdate); ! while (getstringcharacter(bsdate, index-1) == ' ') ! --index; ! if (index > 3) { ! if ((getstringcharacter(bsdate, index - 3) == 'G') && (getstringcharacter(bsdate, index - 2) == 'M') && (getstringcharacter(bsdate, index -1) == 'T')) { ! flUseGMT = true; ! } ! } ! *time = 0; /*default return value*/ ! ! clearbytes (&longdate, sizeof (longdate)); ! ! if (InitDateCache (&cache) != noErr) /*must do this before calling StringToDate*/ ! return (false); ! ! flgotdate = ((StringToDate (p, n, &cache, &used, &longdate) & fatalDateTime) == 0); ! ! flgottime = ((StringToTime (p + used, n - used, &cache, &used, &longdate) & fatalDateTime) == 0); ! ! if (!flgotdate && !flgottime) /*nuthin' doin'*/ ! return (false); ! ! if (flgotdate) { ! ! shortdate.day = longdate.ld.day; ! ! shortdate.month = longdate.ld.month; ! ! shortdate.year = longdate.ld.year; ! } ! else { ! ! SecondsToDate (0, &shortdate); ! ! /* ! GetTime (&shortdate); ! */ ! } ! ! shortdate.hour = longdate.ld.hour; /*time fields will be zero if !flgottime*/ ! ! shortdate.minute = longdate.ld.minute; ! ! shortdate.second = longdate.ld.second; ! ! DateToSeconds (&shortdate, time); ! if (flUseGMT) { ! adjustforcurrenttimezone (time); ! } ! ! #endif #ifdef WIN95VERSION --- 671,742 ---- */ ! #ifdef MACVERSION ! Ptr p = (Ptr) bsdate + 1; ! long n = stringlength (bsdate); ! long used = 0; ! DateCacheRecord cache; ! LongDateRec longdate; ! boolean flgotdate; ! boolean flgottime; ! DateTimeRec shortdate; ! boolean flUseGMT = false; ! long index; ! index = stringlength (bsdate); ! while (getstringcharacter(bsdate, index-1) == ' ') ! --index; ! if (index > 3) { ! if ((getstringcharacter(bsdate, index - 3) == 'G') && (getstringcharacter(bsdate, index - 2) == 'M') && (getstringcharacter(bsdate, index -1) == 'T')) { ! flUseGMT = true; ! } ! } ! *time = 0; /*default return value*/ ! ! clearbytes (&longdate, sizeof (longdate)); ! ! if (InitDateCache (&cache) != noErr) /*must do this before calling StringToDate*/ ! return (false); ! ! flgotdate = ((StringToDate (p, n, &cache, &used, &longdate) & fatalDateTime) == 0); ! ! flgottime = ((StringToTime (p + used, n - used, &cache, &used, &longdate) & fatalDateTime) == 0); ! ! if (!flgotdate && !flgottime) /*nuthin' doin'*/ ! return (false); ! ! if (flgotdate) { ! ! shortdate.day = longdate.ld.day; ! ! shortdate.month = longdate.ld.month; ! ! shortdate.year = longdate.ld.year; ! } ! else { ! ! SecondsToDate (0, &shortdate); ! ! /* ! GetTime (&shortdate); ! */ ! } ! ! shortdate.hour = longdate.ld.hour; /*time fields will be zero if !flgottime*/ ! ! shortdate.minute = longdate.ld.minute; ! ! shortdate.second = longdate.ld.second; ! ! DateToSeconds (&shortdate, time); ! ! if (flUseGMT) { ! adjustforcurrenttimezone (time); ! } ! ! #endif #ifdef WIN95VERSION Index: langvalue.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langvalue.c,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -C2 -d -r1.8.2.2 -r1.8.2.3 *** langvalue.c 2 Feb 2006 18:39:59 -0000 1.8.2.2 --- langvalue.c 14 Feb 2006 11:43:57 -0000 1.8.2.3 *************** *** 1783,1788 **** ! static boolean binarytoscalar (tyvaluerecord *val, tyvaluetype type) { ! /* 5.0a22 dmb: handle any-endian --- 1783,1789 ---- ! static boolean ! binarytoscalar (tyvaluerecord *val, tyvaluetype type) ! { /* 5.0a22 dmb: handle any-endian *************** *** 2122,2126 **** break; ! case directionvaluetype: x = (long) (*v).data.dirvalue; --- 2123,2127 ---- break; ! case directionvaluetype: x = (long) (*v).data.dirvalue; *************** *** 2148,2152 **** break; #endif ! case singlevaluetype: f = (*v).data.singlevalue; --- 2149,2153 ---- break; #endif ! case singlevaluetype: f = (*v).data.singlevalue; *************** *** 2168,2172 **** break; ! case binaryvaluetype: { long n; --- 2169,2180 ---- break; ! ! #if LONGINT_LONGDATE == 1 ! case longlongintvaluetype: ! // a quick & dirty hack just to have sth. ! ! case longdatetimevaluetype: ! break; ! #endif case binaryvaluetype: { long n; *************** *** 2213,2218 **** case longvaluetype: // kwtodo - 2006-01-30 ! return (true); ! case novaluetype: if (flinhibitnilcoercion) --- 2221,2227 ---- case longvaluetype: // kwtodo - 2006-01-30 ! x = (tylonglongint)(*v).data.longvalue; ! break; ! case novaluetype: if (flinhibitnilcoercion) *************** *** 2309,2315 **** return (false); } /*switch*/ ! ! return (setlongvalue (x, v)); } /* coercetolong */ #endif --- 2318,2426 ---- return (false); } /*switch*/ ! ! { ! Handle llv; ! ! if (!newhandle(sizeof(tylonglongint), &llv)) ! return (false); ! ! if (!sethandlecontents(&x, sizeof(tylonglongint), llv)) ! return (false); ! return (setlonglongintvalue (llv, v)); ! } ! return(true); // have a happy compiler } /* coercetolong */ + + + static boolean + coercetolongdate (tyvaluerecord *v) + { + // kw - 2006-02-12 --- modeled after coercetodate + + tylonglongint x; + + switch ((*v).valuetype) { + + case datevaluetype: + { + // kwtodo: check bounds + return (true); + } + + case novaluetype: { + if (flinhibitnilcoercion) + return (false); + + // kwtodo: + x = timenow (); + + break; + } + + case longvaluetype: + case ostypevaluetype: + x = (tylonglongint)(*v).data.longvalue; + + break; + + case charvaluetype: + x = (tylonglongint) (*v).data.chvalue; + + break; + + case booleanvaluetype: + x = (tylonglongint) (*v).data.flvalue; + + break; + + case intvaluetype: + x = (tylonglongint) (*v).data.intvalue; + + break; + + case directionvaluetype: + x = (tylonglongint) (*v).data.dirvalue; + + break; + + case stringvaluetype: { + bigstring bs; + unsigned long ltime; // kw - 2006-02-02 renamed due to shadow warning + + pullstringvalue (v, bs); + + if (!stringtotime (bs, <ime)) { + + langerror (datecoerceerror); + + return (false); + } + + x = ltime; + + break; + } + + case binaryvaluetype: + return (binarytoscalar (v, datevaluetype)); + + case listvaluetype: + case recordvaluetype: + return (coercelistvalue (v, datevaluetype)); + + default: + langerror (datecoerceerror); + + return (false); + } /*switch*/ + + setdatevalue (x, v); + + return (true); + } /*coercetodate*/ + + + + #endif *************** *** 3694,3698 **** case longvaluetype: return (coercetolong (v)); ! case directionvaluetype: return (coercetodirection (v)); --- 3805,3816 ---- case longvaluetype: return (coercetolong (v)); ! ! #if LONGINT_LONGDATE == 1 ! case longlongintvaluetype: ! return (coercetolonglong(v)); ! ! case longdatetimevaluetype: ! return (coercetolongdate(v)); ! #endif case directionvaluetype: return (coercetodirection (v)); *************** *** 4954,4959 **** return (coercetolong (v)); } /*getlongparam*/ ! ! boolean getdateparam (hdltreenode hfirst, short pnum, tyvaluerecord *v) { --- 5072,5091 ---- return (coercetolong (v)); } /*getlongparam*/ ! ! ! #if LONGINT_LONGDATE == 1 ! boolean ! getlonglongintparam( ! hdltreenode hfirst, ! short pnum, ! tyvaluerecord *v) ! { ! if (!getparamvalue (hfirst, pnum, v)) ! return (false); ! return(coercetolonglong(v)); ! } ! #endif ! ! boolean getdateparam (hdltreenode hfirst, short pnum, tyvaluerecord *v) { *************** *** 5275,5278 **** --- 5407,5428 ---- } /*getlongvalue*/ + #if LONGINT_LONGDATE == 1 + boolean + getlonglongintvalue ( + hdltreenode hfirst, + short pnum, + tylonglongint *lval) + { + tyvaluerecord val; + + if (!getlonglongintparam (hfirst, pnum, &val)) + return (false); + + *lval = val.data.longvalue; + + return (true); + } /* getlonglongintvalue */ + #endif + boolean getdirectionvalue (hdltreenode hfirst, short pnum, tydirection *dirval) { *************** *** 6078,6083 **** ! static boolean assignordeletevalue (register hdltreenode hlhs, tyvaluerecord *vassign, tytreetype op, tyvaluerecord *vold, tyvaluerecord *vnew) { ! /* 2.1b2 dmb: common code; delete item if vassign is nil --- 6228,6239 ---- ! static boolean ! assignordeletevalue ( ! register hdltreenode hlhs, ! tyvaluerecord *vassign, ! tytreetype op, ! tyvaluerecord *vold, ! tyvaluerecord *vnew) ! { /* 2.1b2 dmb: common code; delete item if vassign is nil Index: osacomponent.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/osacomponent.c,v retrieving revision 1.7.6.1 retrieving revision 1.7.6.2 diff -C2 -d -r1.7.6.1 -r1.7.6.2 *** osacomponent.c 31 Jan 2006 16:43:31 -0000 1.7.6.1 --- osacomponent.c 14 Feb 2006 11:43:57 -0000 1.7.6.2 *************** *** 2485,2496 **** hdlhashnode hnodesource; hdlhashnode hnodecode; ! ! #if TARGET_API_MAC_CARBON == 1 ! if (!copydatahandle ((AEDesc*)scriptData, &descData)) /* AE OS X fix */ ! return (memFullErr); ! #else ! descData = scriptData->dataHandle; ! #endif ! switch (scriptData->descriptorType) { --- 2485,2496 ---- hdlhashnode hnodesource; hdlhashnode hnodecode; ! ! #if TARGET_API_MAC_CARBON == 1 ! if (!copydatahandle ((AEDesc*)scriptData, &descData)) /* AE OS X fix */ ! return (memFullErr); ! #else ! descData = scriptData->dataHandle; ! #endif ! switch (scriptData->descriptorType) { *************** *** 2999,3015 **** flkeepsource = true; ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! if (!copydatahandle ((AEDesc*) sourceData, &htext)) /*make copy for eventual getsource*/ ! return (memFullErr); ! ! #else ! ! if (!copyhandle ((*sourceData).dataHandle, &htext)) /*make copy for eventual getsource*/ ! return (memFullErr); ! ! #endif ! if (!setheapvalue (htext, stringvaluetype, &vsource)) return (osageterror ()); --- 2999,3011 ---- flkeepsource = true; ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! if (!copydatahandle ((AEDesc*) sourceData, &htext)) /*make copy for eventual getsource*/ ! return (memFullErr); ! #else ! if (!copyhandle ((*sourceData).dataHandle, &htext)) /*make copy for eventual getsource*/ ! return (memFullErr); ! #endif ! if (!setheapvalue (htext, stringvaluetype, &vsource)) return (osageterror ()); *************** *** 5439,5455 **** return (false); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! { Handle h; ! copydatahandle (&scriptsource, &h); ! AEDisposeDesc (&scriptsource); /* 2004-10-28 aradke: we're done with it */ ! return (setheapvalue (h, stringvaluetype, vsource)); ! } ! #else ! return (setheapvalue (scriptsource.dataHandle, stringvaluetype, vsource)); ! #endif } /*osagetsource*/ --- 5435,5451 ---- return (false); ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! { Handle h; ! copydatahandle (&scriptsource, &h); ! AEDisposeDesc (&scriptsource); /* 2004-10-28 aradke: we're done with it */ ! return (setheapvalue (h, stringvaluetype, vsource)); ! } ! #else ! return (setheapvalue (scriptsource.dataHandle, stringvaluetype, vsource)); ! #endif } /*osagetsource*/ Index: memory.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/memory.c,v retrieving revision 1.6.4.1 retrieving revision 1.6.4.2 diff -C2 -d -r1.6.4.1 -r1.6.4.2 *** memory.c 2 Feb 2006 18:39:59 -0000 1.6.4.1 --- memory.c 14 Feb 2006 11:43:57 -0000 1.6.4.2 *************** *** 444,465 **** if (h != nil) { ! ! #ifdef WIN95VERSION DisposeHandle (h); ! #endif ! #ifdef MACVERSION ! #if (MEMTRACKER == 1) ! debugremovememhandle(h); ! #endif ! #ifdef fldebug //Code change by Timothy Paustian Friday, June 9, 2000 9:43:15 PM //No temp memory in Carbon ! #if TARGET_API_MAC_CARBON == 0 if (HandleZone (h) == tempzone) --cttemphandles; ! #endif ! #endif DisposeHandle (h); --- 444,465 ---- if (h != nil) { ! #ifdef WIN95VERSION DisposeHandle (h); ! #endif ! #ifdef MACVERSION ! # if (MEMTRACKER == 1) ! debugremovememhandle(h); ! # endif ! # ifdef fldebug //Code change by Timothy Paustian Friday, June 9, 2000 9:43:15 PM //No temp memory in Carbon ! # if TARGET_API_MAC_CARBON == 0 if (HandleZone (h) == tempzone) --cttemphandles; ! ! # endif ! # endif DisposeHandle (h); *************** *** 467,479 **** //disposed of handles should always be set to nil h = nil; ! #ifdef fldebug if (MemError ()) memoryerror (); ! #endif ! #endif ! } ! } /*disposehandle*/ --- 467,479 ---- //disposed of handles should always be set to nil h = nil; ! # ifdef fldebug if (MemError ()) memoryerror (); ! # endif ! #endif ! } ! } /*disposehandle*/ *************** *** 599,609 **** ! void fillchar (ptrvoid pfill, long ctfill, char chfill) { ! /* ! do a mass memory fill -- copy ctfill chfills at pfill. ! */ #ifdef MACVERSION register ptrbyte p = pfill; register long ct = ctfill; --- 599,614 ---- ! void ! fillchar ( ! ptrvoid pfill, ! long ctfill, ! char chfill) ! { /* ! do a mass memory fill -- copy ctfill chfills at pfill. ! */ #ifdef MACVERSION + # ifndef SPEED register ptrbyte p = pfill; register long ct = ctfill; *************** *** 612,622 **** while (--ct >= 0) *p++ = (char) ch; /*tight loop*/ #endif ! #ifdef WIN95VERSION FillMemory (pfill, ctfill, chfill); #endif ! } /*fillchar*/ ! void clearbytes (ptrvoid pclear, long ctclear) { --- 617,669 ---- while (--ct >= 0) *p++ = (char) ch; /*tight loop*/ + # else + # ifdef SPEEDDEBUG + static unsigned long + callTabCount = 0, + callZeroCount = 0, + callNonzeroCount = 0, + callZeroFills = 0, + callClosebraceFills = 0, + callOtherFills = 0, + callMedianSize = 0, + callSumCount; + + if (ctfill == 0) + { + callZeroCount++; + } + else + { + callNonzeroCount++; + } + + switch(chfill) + { + case 0x00: + callZeroFills++; + break; + case 0x09: + callTabCount++; + break; + case 0x7d: + callClosebraceFills++; + break; + default: + callOtherFills++; + break; + } + + callSumCount += ctfill; + callMedianSize = (callSumCount / (callZeroCount + callNonzeroCount)); + # endif + memset(pfill, chfill, ctfill); + + # endif #endif ! #ifdef WIN95VERSION FillMemory (pfill, ctfill, chfill); #endif ! } /*fillchar*/ void clearbytes (ptrvoid pclear, long ctclear) { Index: langhtml.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langhtml.c,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** langhtml.c 19 Dec 2005 01:56:43 -0000 1.8 --- langhtml.c 14 Feb 2006 11:43:57 -0000 1.8.2.1 *************** *** 553,565 **** goto error; ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&result, hresult); ! ! #else ! ! *hresult = result.dataHandle; ! #endif return (true); --- 553,568 ---- goto error; ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! copydatahandle (&result, hresult); ! #if AEDISPOSAL == 1 ! // possible memleak here ! #endif ! #else ! ! *hresult = result.dataHandle; ! ! #endif return (true); *************** *** 2847,2881 **** disposehandle (htext); ! ! #if TARGET_API_MAC_CARBON == 1 ! ! { Handle h; ! copydatahandle (&list, &h); ! return (setheapvalue (h, listvaluetype, vreturned)); ! } ! ! #else ! ! return (setheapvalue (list.dataHandle, listvaluetype, vreturned)); ! ! #endif ! ! error: { ! ! disposehandle (hreturnedtext); ! ! disposehandle (htext); ! ! AEDisposeDesc (&list); // 5.0d12 dmb ! if (!fllangerror) ! oserror (IACglobals.errorcode); ! return (false); ! } ! #endif } /*parseargsverb*/ --- 2850,2882 ---- disposehandle (htext); ! ! #if TARGET_API_MAC_CARBON == 1 ! { Handle h; ! copydatahandle (&list, &h); ! return (setheapvalue (h, listvaluetype, vreturned)); ! } ! #else ! return (setheapvalue (list.dataHandle, listvaluetype, vreturned)); ! ! #endif ! ! error: { ! disposehandle (hreturnedtext); ! ! disposehandle (htext); ! ! AEDisposeDesc (&list); // 5.0d12 dmb ! ! if (!fllangerror) ! oserror (IACglobals.errorcode); ! ! return (false); ! } ! #endif } /*parseargsverb*/ Index: fileloop.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/fileloop.c,v retrieving revision 1.5.4.1 retrieving revision 1.5.4.2 diff -C2 -d -r1.5.4.1 -r1.5.4.2 *** fileloop.c 2 Feb 2006 18:39:59 -0000 1.5.4.1 --- fileloop.c 14 Feb 2006 11:43:57 -0000 1.5.4.2 *************** *** 69,73 **** boolean diskinitloop (tyfileloopcallback diskfilter, Handle *hdiskloop) { ! /* same as fileinitloop, but for volumes on line --- 69,73 ---- boolean diskinitloop (tyfileloopcallback diskfilter, Handle *hdiskloop) { ! #pragma unused (diskfilter) /* same as fileinitloop, but for volumes on line *************** *** 179,183 **** boolean fileinitloop (const tyfilespec *fs, tyfileloopcallback filefilter, Handle *hfileloop) { ! /* a conglomeration of filemanager incantations which sets up a UserLand --- 179,183 ---- boolean fileinitloop (const tyfilespec *fs, tyfileloopcallback filefilter, Handle *hfileloop) { ! #pragma unused (filefilter) /* a conglomeration of filemanager incantations which sets up a UserLand |