|
From: Karsten W. <kar...@us...> - 2006-03-10 22:27:35
|
Update of /cvsroot/frontierkernel/Frontier/FrontierSDK/Toolkits/IACTools/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2899/FrontierSDK/Toolkits/IACTools/Source Modified Files: Tag: pre_int64_branch iacapps.c iacbinary.c iacsend.c iactable.c iactext.c Log Message: long overdue commit update Index: iactext.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/FrontierSDK/Toolkits/IACTools/Source/iactext.c,v retrieving revision 1.3.6.1 retrieving revision 1.3.6.2 diff -C2 -d -r1.3.6.1 -r1.3.6.2 *** iactext.c 14 Feb 2006 11:46:27 -0000 1.3.6.1 --- iactext.c 10 Mar 2006 22:26:56 -0000 1.3.6.2 *************** *** 44,48 **** register OSErr ec; ! AEDesc desc; DescType key; --- 44,48 ---- register OSErr ec; ! AEDesc desc = {typeNull, 0L}; // kw - 2006-02-18 --- AEDISPOSAL DescType key; *************** *** 67,71 **** copydatahandle (&desc, val); #if AEDISPOSAL == 1 ! // possible memleak here #endif #else --- 67,72 ---- copydatahandle (&desc, val); #if AEDISPOSAL == 1 ! // possible memleak here ! AEDisposeDesc(&desc); #endif #else *************** *** 79,82 **** --- 80,87 ---- else { *val = NULL; + #if AEDISPOSAL == 1 + // possible memleak here + AEDisposeDesc(&desc); + #endif return (false); Index: iacbinary.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/FrontierSDK/Toolkits/IACTools/Source/iacbinary.c,v retrieving revision 1.3.6.1 retrieving revision 1.3.6.2 diff -C2 -d -r1.3.6.1 -r1.3.6.2 *** iacbinary.c 14 Feb 2006 11:46:27 -0000 1.3.6.1 --- iacbinary.c 10 Mar 2006 22:26:56 -0000 1.3.6.2 *************** *** 59,63 **** ec = AEGetNthDesc (list, n, typeWildCard, &key, &desc); ! done: IACglobals.errorcode = ec; --- 59,63 ---- ec = AEGetNthDesc (list, n, typeWildCard, &key, &desc); ! done: IACglobals.errorcode = ec; *************** *** 71,75 **** copydatahandle (&desc, val); #if AEDISPOSAL == 1 ! // possible memleak here #endif --- 71,76 ---- copydatahandle (&desc, val); #if AEDISPOSAL == 1 ! // possible memleak here ! AEDisposeDesc(&desc); #endif *************** *** 99,115 **** OSErr ec; ! AEDesc desc; desc.descriptorType = binaryfieldtype; ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! newdescwithhandle (&desc, binaryfieldtype, val); ! ! #else ! ! desc.dataHandle = val; ! ! #endif if ((*list).descriptorType != typeAEList) --- 100,112 ---- OSErr ec; ! AEDesc desc = {typeNull, 0L}; desc.descriptorType = binaryfieldtype; ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! newdescwithhandle (&desc, binaryfieldtype, val); ! #else ! desc.dataHandle = val; ! #endif if ((*list).descriptorType != typeAEList) Index: iactable.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/FrontierSDK/Toolkits/IACTools/Source/iactable.c,v retrieving revision 1.3.6.1 retrieving revision 1.3.6.2 diff -C2 -d -r1.3.6.1 -r1.3.6.2 *** iactable.c 14 Feb 2006 11:46:27 -0000 1.3.6.1 --- iactable.c 10 Mar 2006 22:26:56 -0000 1.3.6.2 *************** *** 54,58 **** OSErr ec; ! AEDesc desc; DescType key; --- 54,58 ---- OSErr ec; ! AEDesc desc = {typeNull, 0L}; // kw - 2006-02-19 --- AEDISPOSAL DescType key; *************** *** 77,81 **** copydatahandle (&desc, val); #if AEDISPOSAL == 1 ! // possible memleak here #endif #else --- 77,82 ---- copydatahandle (&desc, val); #if AEDISPOSAL == 1 ! // possible memleak here ! AEDisposeDesc(&desc); #endif #else *************** *** 90,93 **** --- 91,98 ---- *val = NULL; + #if AEDISPOSAL == 1 + // possible memleak here + AEDisposeDesc(&desc); + #endif return (false); } Index: iacapps.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/FrontierSDK/Toolkits/IACTools/Source/iacapps.c,v retrieving revision 1.4.6.1 retrieving revision 1.4.6.2 diff -C2 -d -r1.4.6.1 -r1.4.6.2 *** iacapps.c 31 Jan 2006 16:47:55 -0000 1.4.6.1 --- iacapps.c 10 Mar 2006 22:26:56 -0000 1.4.6.2 *************** *** 60,82 **** for (i = 1; i <= ctfiles; i ++) { ! ec = AEGetNthPtr ( ! &desc, i, typeFSS, &actualkeyword, &actualtype, ! ! (Ptr) &fs, sizeof (fs), &actualsize); ! IACglobals.errorcode = ec; ! if (ec != noErr) { ! AEDisposeDesc (&desc); ! return (ec); ! } ! if (!(*handlespecroutine) (&fs)) return (-1); ! } /*for*/ ! return (noErr); } /*IACdrivefilelist*/ --- 60,90 ---- for (i = 1; i <= ctfiles; i ++) { ! ec = AEGetNthPtr ( ! &desc, ! i, ! typeFSS, ! &actualkeyword, ! &actualtype, ! (Ptr) &fs, ! sizeof (fs), ! &actualsize); ! IACglobals.errorcode = ec; ! if (ec != noErr) { ! AEDisposeDesc (&desc); ! return (ec); ! } ! if (!(*handlespecroutine) (&fs)) return (-1); ! } /*for*/ ! ! #if AEDISPOSAL == 1 ! AEDisposeDesc(&desc); ! #endif return (noErr); } /*IACdrivefilelist*/ *************** *** 122,138 **** TargetID target; Ptr addressoftype; ! ! #if !TARGET_API_MAC_CARBON ProcessSerialNumber psn; ProcessInfoRec info; OSErr ec; ! #endif ! BlockMove (dataptr, &target, sizeof (target)); ! //Code change by Timothy Paustian Sunday, June 25, 2000 10:08:45 PM //This is a bit of a hack but should work. We will just get stuff directly out of //the target rec. I hope this works. Maybe this never gets called in carbon. ! #if !TARGET_API_MAC_CARBON if (target.location.locationKindSelector == ppcNoLocation) { /*local program*/ --- 130,146 ---- TargetID target; Ptr addressoftype; ! ! #if !TARGET_API_MAC_CARBON ProcessSerialNumber psn; ProcessInfoRec info; OSErr ec; ! #endif ! BlockMove (dataptr, &target, sizeof (target)); ! //Code change by Timothy Paustian Sunday, June 25, 2000 10:08:45 PM //This is a bit of a hack but should work. We will just get stuff directly out of //the target rec. I hope this works. Maybe this never gets called in carbon. ! #if !TARGET_API_MAC_CARBON if (target.location.locationKindSelector == ppcNoLocation) { /*local program*/ *************** *** 159,163 **** else { /*not a local program*/ ! #endif if (target.name.portKindSelector == ppcByCreatorAndType) --- 167,171 ---- else { /*not a local program*/ ! #endif if (target.name.portKindSelector == ppcByCreatorAndType) *************** *** 166,192 **** addressoftype = ((Ptr) &target.name.u.portTypeStr) + 1; /*kloooge*/ ! #if !TARGET_API_MAC_CARBON } ! #endif - (*result).descriptorType = typeType; ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! return (putdescdatapointer (result, typeType, addressoftype, 4)); ! ! #else ! ! return (PtrToHand (addressoftype, &(*result).dataHandle, 4)); ! ! #endif ! } /*CoerceTargetIDToType*/ ! ! ! static pascal OSErr CoercePSNToType (DescType typecode, Ptr dataptr, Size datasize, DescType totype, long refcon, AEDesc *result) { ! ! #pragma unused (typecode, datasize, totype, refcon) ! ProcessInfoRec info; OSErr ec; --- 174,202 ---- addressoftype = ((Ptr) &target.name.u.portTypeStr) + 1; /*kloooge*/ ! #if !TARGET_API_MAC_CARBON } ! #endif (*result).descriptorType = typeType; ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! return (putdescdatapointer (result, typeType, addressoftype, 4)); ! #else ! return (PtrToHand (addressoftype, &(*result).dataHandle, 4)); ! #endif ! } /*CoerceTargetIDToType*/ ! ! ! static pascal OSErr ! CoercePSNToType ( ! DescType typecode, ! Ptr dataptr, ! Size datasize, ! DescType totype, ! long refcon, ! AEDesc *result) ! { ! #pragma unused (typecode, datasize, totype, refcon) ! ProcessInfoRec info; OSErr ec; *************** *** 207,220 **** (*result).descriptorType = typeType; ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! return (putdescdatapointer (result, typeType, &info.processSignature, 4)); ! ! #else ! ! return (PtrToHand (&info.processSignature, &(*result).dataHandle, 4)); ! ! #endif } /*CoercePSNToType*/ --- 217,226 ---- (*result).descriptorType = typeType; ! ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! return (putdescdatapointer (result, typeType, &info.processSignature, 4)); ! #else ! return (PtrToHand (&info.processSignature, &(*result).dataHandle, 4)); ! #endif } /*CoercePSNToType*/ Index: iacsend.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/FrontierSDK/Toolkits/IACTools/Source/iacsend.c,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** iacsend.c 11 Jan 2005 22:48:37 -0000 1.3 --- iacsend.c 10 Mar 2006 22:26:56 -0000 1.3.6.1 *************** *** 191,203 **** else { ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! long lenstring = AEGetDescDataSize (&desc); ! ! #else ! ! long lenstring = GetHandleSize (desc.dataHandle); ! ! #endif if (lenstring > 255) --- 191,203 ---- else { ! #if TARGET_API_MAC_CARBON == 1 /*PBS 03/14/02: AE OS X fix.*/ ! ! long lenstring = AEGetDescDataSize (&desc); ! ! #else ! ! long lenstring = GetHandleSize (desc.dataHandle); ! ! #endif if (lenstring > 255) *************** *** 208,222 **** //Changed to Opaque call for Carbon //This has not been tested. ! #if ACCESSOR_CALLS_ARE_FUNCTIONS == 1 { ! Size dataSize = AEGetDescDataSize(&desc); ! Ptr theData = NewPtr(dataSize); ! AEGetDescData(&desc, theData, dataSize); ! BlockMove (theData, &errorstring [1], lenstring); ! DisposePtr(theData); } ! #else BlockMove (*desc.dataHandle, &errorstring [1], lenstring); ! #endif } --- 208,222 ---- //Changed to Opaque call for Carbon //This has not been tested. ! #if ACCESSOR_CALLS_ARE_FUNCTIONS == 1 { ! Size dataSize = AEGetDescDataSize(&desc); ! Ptr theData = NewPtr(dataSize); ! AEGetDescData(&desc, theData, dataSize); ! BlockMove (theData, &errorstring [1], lenstring); ! DisposePtr(theData); } ! #else BlockMove (*desc.dataHandle, &errorstring [1], lenstring); ! #endif } |