|
From: <kar...@us...> - 2006-04-06 01:43:50
|
Revision: 1214 Author: karstenw Date: 2006-04-05 18:43:43 -0700 (Wed, 05 Apr 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1214&view=rev Log Message: ----------- parameter unused & name conflict fixes Modified Paths: -------------- Frontier/trunk/Common/source/filelaunch.c Frontier/trunk/Common/source/shell.c Modified: Frontier/trunk/Common/source/filelaunch.c =================================================================== --- Frontier/trunk/Common/source/filelaunch.c 2006-04-06 01:02:50 UTC (rev 1213) +++ Frontier/trunk/Common/source/filelaunch.c 2006-04-06 01:43:43 UTC (rev 1214) @@ -126,15 +126,20 @@ OSType fndrCreator; Boolean wasChanged; AliasHandle targetAlias; - long index; + long idx; // 2006-04-03 - kw --- renamed long nTargets = 1; FSSpec targets[1]; FSSpec *targetList; targets[0] = fs2; targetList = targets; - /* verify parameters */ - if ((nTargets == 0) || (targetList == NULL)) return paramErr; + /* verify parameters */ + if ( (nTargets == 0) + || (targetList == NULL)) + { + return paramErr; + } + /* set up locals */ AECreateDesc(typeNull, NULL, 0, &theAEvent); AECreateDesc(typeNull, NULL, 0, &fndrAddress); @@ -155,13 +160,13 @@ /* create the list of files to open */ err = AECreateList(NULL, 0, false, &targetListDesc); if (err != noErr) goto bail; - for ( index=0; index < nTargets; index++) { + for ( idx = 0; idx < nTargets; idx++) { if (targetAlias == NULL) - err = NewAlias(NULL, (targetList + index), &targetAlias); - else err = UpdateAlias(NULL, (targetList + index), targetAlias, &wasChanged); + err = NewAlias(NULL, (targetList + idx), &targetAlias); + else err = UpdateAlias(NULL, (targetList + idx), targetAlias, &wasChanged); if (err != noErr) goto bail; HLock((Handle) targetAlias); - err = AEPutPtr(&targetListDesc, (index + 1), typeAlias, *targetAlias, GetHandleSize((Handle) targetAlias)); + err = AEPutPtr(&targetListDesc, (idx + 1), typeAlias, *targetAlias, GetHandleSize((Handle) targetAlias)); HUnlock((Handle) targetAlias); if (err != noErr) goto bail; } Modified: Frontier/trunk/Common/source/shell.c =================================================================== --- Frontier/trunk/Common/source/shell.c 2006-04-06 01:02:50 UTC (rev 1213) +++ Frontier/trunk/Common/source/shell.c 2006-04-06 01:43:43 UTC (rev 1214) @@ -1288,15 +1288,14 @@ #if TARGET_API_MAC_CARBON == 1 - initservices (); - - #endif + initservices (); - +#endif + #if isFrontier || flruntime || winhybrid initlang (); /*init callbacks and other basic inits*/ - + langcallbacks.processeventcallback = &shellprocessevent; /*4.1b13 dmb - new*/ if (!inittablestructure ()) /*create initial hashtable structure*/ @@ -1377,21 +1376,21 @@ NULL, &theTimer);*/ - /*Install dock menu handler.*/ + /*Install dock menu handler.*/ - EventHandlerUPP dockmenuUPP; - OSStatus ec = noErr; - EventTypeSpec eventTypes [1]; - - eventTypes[0].eventClass = kEventClassApplication; - eventTypes[0].eventKind = 20; /*kEventAppGetDockTileMenu; -- not in CodeWarrior yet 11/12/01*/ - - dockmenuUPP = NewEventHandlerUPP (dockmenuhandler); - - ec = InstallApplicationEventHandler (dockmenuUPP, 1, eventTypes, NULL, NULL); + EventHandlerUPP dockmenuUPP; + OSStatus ec = noErr; + EventTypeSpec eventTypes [1]; - /*If it fails, oh well, there's nothing to be done. So ec isn't checked.*/ - } + eventTypes[0].eventClass = kEventClassApplication; + eventTypes[0].eventKind = kEventAppGetDockTileMenu; + + dockmenuUPP = NewEventHandlerUPP (dockmenuhandler); + + ec = InstallApplicationEventHandler (dockmenuUPP, 1, eventTypes, NULL, NULL); + + /*If it fails, oh well, there's nothing to be done. So ec isn't checked.*/ + } #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |