|
From: <kar...@us...> - 2006-04-05 22:31:49
|
Revision: 1201 Author: karstenw Date: 2006-04-05 15:31:38 -0700 (Wed, 05 Apr 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1201&view=rev Log Message: ----------- parameter unused & name conflict fixes Modified Paths: -------------- Frontier/trunk/Common/source/cancoonpopup.c Frontier/trunk/Common/source/dockmenu.c Frontier/trunk/Common/source/fileverbs.c Frontier/trunk/Common/source/langevaluate.c Frontier/trunk/Common/source/langipc.c Frontier/trunk/Common/source/mac.c Frontier/trunk/Common/source/menu.c Frontier/trunk/Common/source/shellcallbacks.c Frontier/trunk/Common/source/smallicon.c Frontier/trunk/Common/source/sounds.c Frontier/trunk/Common/source/tablepopup.c Modified: Frontier/trunk/Common/source/cancoonpopup.c =================================================================== --- Frontier/trunk/Common/source/cancoonpopup.c 2006-04-05 22:19:55 UTC (rev 1200) +++ Frontier/trunk/Common/source/cancoonpopup.c 2006-04-05 22:31:38 UTC (rev 1201) @@ -56,7 +56,8 @@ static boolean ccagentpopupvisit (bigstring bsname, hdlhashnode hnode, tyvaluerecord val, ptrvoid refcon) { - +#pragma unused (hnode) + hdltreenode hcode; ptragentpopupinfo info = (ptragentpopupinfo) refcon; @@ -169,7 +170,8 @@ boolean ccagentpopuphit (Rect rpopup, Point pt) { - +#pragma unused (pt) + return (popupmenuhit (rpopup, true, &ccfillagentpopup, &ccagentpopupselect)); } /*ccagentpopuphit*/ Modified: Frontier/trunk/Common/source/dockmenu.c =================================================================== --- Frontier/trunk/Common/source/dockmenu.c 2006-04-05 22:19:55 UTC (rev 1200) +++ Frontier/trunk/Common/source/dockmenu.c 2006-04-05 22:31:38 UTC (rev 1201) @@ -403,10 +403,7 @@ #if TARGET_API_MAC_CARBON == 1 pascal OSStatus dockcommandhandler (EventHandlerCallRef nextHandler, EventRef theEvent, void* userData) { - - #pragma unused(nextHandler) /*happy compiler*/ - #pragma unused(theEvent) - #pragma unused(userData) +#pragma unused(nextHandler, theEvent, userData) /*happy compiler*/ HICommand commandstruct; UInt32 commandid; Modified: Frontier/trunk/Common/source/fileverbs.c =================================================================== --- Frontier/trunk/Common/source/fileverbs.c 2006-04-05 22:19:55 UTC (rev 1200) +++ Frontier/trunk/Common/source/fileverbs.c 2006-04-05 22:31:38 UTC (rev 1201) @@ -745,19 +745,19 @@ short ctconsumed = 3; short ctpositional = 3; - tyvaluerecord val; + tyvaluerecord lval; if (!gettypelistvalue (hparam1, 3, &filetypes, &typelist)) return (false); flnextparamislast = true; - setostypevalue (oscreator, &val); + setostypevalue (oscreator, &lval); - if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x07""creator", &val)) + if (!getoptionalparamvalue (hparam1, &ctconsumed, &ctpositional, "\x07""creator", &lval)) return (false); - oscreator = val.data.ostypevalue; + oscreator = lval.data.ostypevalue; } Modified: Frontier/trunk/Common/source/langevaluate.c =================================================================== --- Frontier/trunk/Common/source/langevaluate.c 2006-04-05 22:19:55 UTC (rev 1200) +++ Frontier/trunk/Common/source/langevaluate.c 2006-04-05 22:31:38 UTC (rev 1201) @@ -1120,7 +1120,8 @@ #endif static boolean langtryerror (bigstring bsmsg, ptrvoid refcon) { - +#pragma unused (refcon) + /* 6/25/92 dmb: when an error occurs during a try block, we stash it in the tryerror handle. it is later placed in the stack frame of the Modified: Frontier/trunk/Common/source/langipc.c =================================================================== --- Frontier/trunk/Common/source/langipc.c 2006-04-05 22:19:55 UTC (rev 1200) +++ Frontier/trunk/Common/source/langipc.c 2006-04-05 22:31:38 UTC (rev 1201) @@ -138,7 +138,8 @@ boolean langipcerrorroutine (bigstring bs, ptrvoid refcon) { - +#pragma unused (refcon) + /* if an error occurs while processing a runscript verb, we want to return the text that would normally go into the langerror window as @@ -2033,7 +2034,8 @@ boolean langipcgetaddressvalue (hdltreenode hparam1, tyvaluerecord *vreturned) { - +#pragma unused (hparam1) + return (setbooleanvalue (false, vreturned)); } /*langipcgetaddressvalue*/ @@ -2705,7 +2707,8 @@ */ static boolean langipcgetparamvisit (bigstring bs, hdlhashnode hnode, tyvaluerecord val, ptrvoid refcon) { - +#pragma unused (hnode) + hdlverbrecord hv = (hdlverbrecord) refcon; OSType key; @@ -2867,15 +2870,15 @@ tyvaluerecord valparam; tyvaluerecord valkey; hdlhashtable htable; - boolean fl; + boolean lfl; flparamerrorenabled = false; /*no error dialog on getparamvalue call*/ - fl = getparamvalue (hp1, pnum++, &valkey); + lfl = getparamvalue (hp1, pnum++, &valkey); flparamerrorenabled = true; /*restore*/ - if (!fl) { /*didn't get another key*/ + if (!lfl) { /*didn't get another key*/ if (fllangerror) /*was a bad parameter; didn't run out*/ goto error; @@ -2904,14 +2907,14 @@ flinhibitnilcoercion = true; - fl = getparamvalue (hp1, pnum++, &valparam); + lfl = getparamvalue (hp1, pnum++, &valparam); flinhibitnilcoercion = false; if (fllangerror) /*wasn't just nil coercion failure*/ goto error; - if (!fl) /*must be nil coercion error*/ + if (!lfl) /*must be nil coercion error*/ continue; if (!langipcpushparam (&valparam, valkey.data.ostypevalue, hv)) @@ -3327,7 +3330,8 @@ boolean langipccomplexmessage (hdltreenode hparam1, tyvaluerecord *vreturned) { - +#pragma unused(vreturned) + hdlhashtable htable; tyipcaddress ipcaddress; hdlverbrecord hverb; @@ -3343,7 +3347,8 @@ boolean langipctablemessage (hdltreenode hparam1, tyvaluerecord *vreturned) { - +#pragma unused(vreturned) + /* 5.1.5 dmb: use tablesortedinversesearch for guest databases */ @@ -3381,7 +3386,8 @@ static boolean langipcfasterror (bigstring bs, ptrvoid refcon) { - +#pragma unused (refcon) + long n; OSErr err; @@ -3985,7 +3991,8 @@ #if !flruntime static pascal OSErr handleshowmenunode (const AppleEvent *event, AppleEvent *reply, long refcon) { - +#pragma unused (reply, refcon) + /* 4.1b14 dmb: added outline parameter; can't count on outline data not changing */ @@ -4064,7 +4071,8 @@ static pascal OSErr handleyield (const AppleEvent *event, AppleEvent *reply, long refcon) { - +#pragma unused (event, reply, refcon) + processyield (); return (noErr); @@ -4210,7 +4218,8 @@ static pascal OSErr langipcfastgetobject (AppleEvent *event, AppleEvent *reply, long refcon) { - +#pragma unused (refcon) + /* 7/3/92 DW: this one will be hot! */ @@ -4285,7 +4294,13 @@ } /*langipcfastgetobject*/ -static pascal OSErr langipcfastsetobject (AppleEvent *event, AppleEvent *reply, long refcon) { +static pascal OSErr +langipcfastsetobject ( + AppleEvent *event, + AppleEvent *reply, + long refcon) +{ +#pragma unused(refcon) /* 7/3/92 DW: this one will be hot! @@ -4362,8 +4377,14 @@ } /*langipcfastsetobject*/ -static pascal OSErr langipchandlefastscript (AppleEvent *event, AppleEvent *reply, long refcon) { - +static pascal OSErr +langipchandlefastscript ( + AppleEvent *event, + AppleEvent *reply, + long refcon) +{ +#pragma unused(refcon) + /* 3.0.2b1 dmb: reverted to original, 2.0.1 implementation that doesn't rely on the component manager being present. @@ -4658,7 +4679,8 @@ #else static boolean langipceventhook (EventRecord *ev, WindowPtr w) { - +#pragma unused(w) + /* 7/3/91 dmb: under system 7, we fork off a new thread for every incoming IAC event we handle. under system 6, handling IAC events Modified: Frontier/trunk/Common/source/mac.c =================================================================== --- Frontier/trunk/Common/source/mac.c 2006-04-05 22:19:55 UTC (rev 1200) +++ Frontier/trunk/Common/source/mac.c 2006-04-05 22:31:38 UTC (rev 1201) @@ -278,25 +278,30 @@ if ((status != noErr) && (status != 2)) { - formatStr = CFCopyLocalizedString (errorFormatString, NULL); - if (formatStr != NULL) - { - printErrorMsg = CFStringCreateWithFormat( - NULL, NULL, - formatStr, status); - if (printErrorMsg != NULL) - { - if (CFStringGetPascalString (printErrorMsg, - stringBuf, sizeof(stringBuf), - GetApplicationTextEncoding())) { - - StandardAlert(kAlertStopAlert, stringBuf, NULL, NULL, &alertItemHit); - } - CFRelease (printErrorMsg); - } - CFRelease (formatStr); - } - } + formatStr = CFCopyLocalizedString (errorFormatString, NULL); + if (formatStr != NULL) + { + printErrorMsg = CFStringCreateWithFormat( + NULL, + NULL, + formatStr, + status); + if (printErrorMsg != NULL) + { + if (CFStringGetPascalString ( + printErrorMsg, + stringBuf, + sizeof(stringBuf), + GetApplicationTextEncoding())) + { + StandardAlert(kAlertStopAlert, stringBuf, NULL, NULL, &alertItemHit); + } + CFRelease (printErrorMsg); + } + CFRelease (formatStr); + } + } } -#endif \ No newline at end of file +#endif + Modified: Frontier/trunk/Common/source/menu.c =================================================================== --- Frontier/trunk/Common/source/menu.c 2006-04-05 22:19:55 UTC (rev 1200) +++ Frontier/trunk/Common/source/menu.c 2006-04-05 22:31:38 UTC (rev 1201) @@ -550,13 +550,14 @@ boolean inserthierarchicmenu (hdlmenu hmenu, short idmenu) { - - #ifdef MACVERSION - InsertMenu (hmenu, insertsubmenu); +#ifdef MACVERSION +# pragma unused (idmenu) - return (true); - #endif + InsertMenu (hmenu, insertsubmenu); + return (true); +#endif + #ifdef WIN95VERSION HMENU menubar = GetMenu (shellframewindow); MENUITEMINFO info; @@ -714,7 +715,9 @@ void setmenutitleenable (hdlmenu hmenu, short idmenu, boolean fl) { - +#if MACVERSION +# pragma unused (idmenu) +#endif /* enable or disable a menu or a menu item. if fl is true we enable the item, if false we disable it. @@ -725,28 +728,29 @@ */ //Code change by Timothy Paustian Friday, June 9, 2000 9:44:07 PM //Changed to Modern calls for Enabling and Disabling menu items - #ifdef MACVERSION - if (fl) - #if ACCESSOR_CALLS_ARE_FUNCTIONS == 1 - EnableMenuItem (hmenu, 0); - #else - EnableItem (hmenu, 0); - #endif - else - #if ACCESSOR_CALLS_ARE_FUNCTIONS == 1 - DisableMenuItem (hmenu, 0); - #else - DisableItem (hmenu, 0); - #endif - #endif +#ifdef MACVERSION + if (fl) { +# if ACCESSOR_CALLS_ARE_FUNCTIONS == 1 + EnableMenuItem (hmenu, 0); +# else + EnableItem (hmenu, 0); +# endif + } else { +# if ACCESSOR_CALLS_ARE_FUNCTIONS == 1 + DisableMenuItem (hmenu, 0); +# else + DisableItem (hmenu, 0); +# endif + } +#endif - #ifdef WIN95VERSION - HMENU menubar = GetMenu (shellframewindow); +#ifdef WIN95VERSION + HMENU menubar = GetMenu (shellframewindow); - assert (idmenu >= 0); - + assert (idmenu >= 0); + EnableMenuItem (menubar, idmenu, MF_BYCOMMAND | (fl? MF_ENABLED : MF_DISABLED)); - #endif +#endif } /*setmenutitleenable*/ @@ -797,15 +801,20 @@ /* */ - #ifdef MACVERSION - #if ACCESSOR_CALLS_ARE_FUNCTIONS == 1 - return IsMenuItemEnabled(hmenu, 0); - #else - //old code - return (((**hmenu).enableFlags & (0x01)) != 0); - #endif - #endif +#ifdef MACVERSION +# pragma unused (idmenu) +# if ACCESSOR_CALLS_ARE_FUNCTIONS == 1 + return IsMenuItemEnabled(hmenu, 0); + +# else + + //old code + return (((**hmenu).enableFlags & (0x01)) != 0); + +# endif +#endif + #ifdef WIN95VERSION MENUITEMINFO info; HMENU menubar = GetMenu (shellframewindow); @@ -1479,6 +1488,7 @@ */ #ifdef MACVERSION +# pragma unused (idmenu) bigstring bsspace; if (isseparatorstring (bs)) /*take disabled seperator as is*/ @@ -1529,6 +1539,7 @@ boolean pushresourcemenuitems (hdlmenu hmenu, short idmenu, OSType restype) { #ifdef MACVERSION +# pragma unused (idmenu) //Code change by Timothy Paustian Wednesday, June 28, 2000 4:27:19 PM //You can't do this in carbon. //#if !TARGET_API_MAC_CARBON Modified: Frontier/trunk/Common/source/shellcallbacks.c =================================================================== --- Frontier/trunk/Common/source/shellcallbacks.c 2006-04-05 22:19:55 UTC (rev 1200) +++ Frontier/trunk/Common/source/shellcallbacks.c 2006-04-05 22:31:38 UTC (rev 1201) @@ -251,7 +251,8 @@ static boolean shelldefaultmsgroutine (bigstring bs, boolean flbackgroundmsg) { - +#pragma unused (flbackgroundmsg) + shellsetwindowmessage (shellwindowinfo, bs); drawwindowmessage (shellwindow); @@ -481,27 +482,27 @@ } /*shellloadbuttonlists*/ -boolean shellgetconfig (short resnum, tyconfigrecord *config) { +boolean shellgetconfig (short resnum, tyconfigrecord *pconfig) { short ix = 0; if (!shellfindcallbacks (resnum, &ix)) return (false); - *config = globalsarray [ix].config; + *pconfig = globalsarray [ix].config; return (true); } /*shellgetconfig*/ -boolean shellsetconfig (short resnum, tyconfigrecord config) { +boolean shellsetconfig (short resnum, tyconfigrecord pconfig) { short ix = 0; if (!shellfindcallbacks (resnum, &ix)) return (false); - globalsarray [ix].config = config; + globalsarray [ix].config = pconfig; return (true); } /*shellsetconfig*/ Modified: Frontier/trunk/Common/source/smallicon.c =================================================================== --- Frontier/trunk/Common/source/smallicon.c 2006-04-05 22:19:55 UTC (rev 1200) +++ Frontier/trunk/Common/source/smallicon.c 2006-04-05 22:31:38 UTC (rev 1201) @@ -40,7 +40,6 @@ - static hdlsmalliconbits hmiscbits; //static hdlsmalliconbits hleaderbits; @@ -171,8 +170,8 @@ r.bottom = r.bottom + 4; - DrawThemePopupArrow (&r, kThemeArrowDown, kThemeArrow9pt, themestate, NULL, (UInt32) NULL); - + DrawThemePopupArrow (&r, kThemeArrowDown, kThemeArrow9pt, themestate, NULL, 0); + return (true); #else @@ -372,5 +371,5 @@ return (true); } /*initsmallicons*/ - - + + Modified: Frontier/trunk/Common/source/sounds.c =================================================================== --- Frontier/trunk/Common/source/sounds.c 2006-04-05 22:19:55 UTC (rev 1200) +++ Frontier/trunk/Common/source/sounds.c 2006-04-05 22:31:38 UTC (rev 1201) @@ -91,7 +91,7 @@ SndChannelPtr channel; SndCommand cmd; - long time; + long ltime; float note; OSErr err; @@ -107,16 +107,16 @@ cmd.param2 = 0; err = SndDoCommand (channel, &cmd, false); - time = duration * (2000/60); + ltime = duration * (2000/60); - time = min (infinity, time); + ltime = min (infinity, ltime); note = (frequency / 129.0) / 69; note = 69 + 12.0 * (note - 1); cmd.cmd = freqDurationCmd; - cmd.param1 = time; + cmd.param1 = ltime; cmd.param2 = note; err = SndDoCommand (channel, &cmd, false); @@ -142,10 +142,10 @@ #ifdef WIN95VERSION //NOTE: Beep does not take amplitude. // Also the parameters are ignored on Windows 95/98 - long time; + long ltime; - time = (duration * 1000L) / 60L; - return (Beep (frequency, time)); + ltime = (duration * 1000L) / 60L; + return (Beep (frequency, ltime)); // return (false); // *** WIN95 not implemented #endif } /*dosound*/ Modified: Frontier/trunk/Common/source/tablepopup.c =================================================================== --- Frontier/trunk/Common/source/tablepopup.c 2006-04-05 22:19:55 UTC (rev 1200) +++ Frontier/trunk/Common/source/tablepopup.c 2006-04-05 22:31:38 UTC (rev 1201) @@ -425,7 +425,8 @@ static boolean tablekindpopupselect (hdlmenu hmenu, short itemselected) { - +#pragma unused (hmenu) + tyvaluetype valuetype; if (!tablemapmenutovaluetype (itemselected, &valuetype)) @@ -436,7 +437,8 @@ boolean tablekindpopuphit (Point pt) { - +#pragma unused (pt) + /* 5/6/93 dmb: added support for new types */ @@ -506,7 +508,8 @@ static boolean tablesortpopupselect (hdlmenu hmenu, short itemselected) { - +#pragma unused (hmenu) + hdlhashtable ht; bigstring bs; @@ -539,6 +542,7 @@ boolean tablesortpopuphit (Point pt) { +#pragma unused (pt) register hdltableformats hf = tableformatsdata; Rect r; @@ -902,7 +906,8 @@ static boolean tabletitlepopupselect (hdlmenu hmenu, short itemselected) { - +#pragma unused (hmenu) + /* note: the last item, "root", is really just a dummy which has no matching element in the array. the first item in the array will actually go to the parent table, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |