|
From: <kar...@us...> - 2006-04-05 22:58:21
|
Revision: 1203 Author: karstenw Date: 2006-04-05 15:58:09 -0700 (Wed, 05 Apr 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1203&view=rev Log Message: ----------- parameter unused & name conflict fixes Modified Paths: -------------- Frontier/trunk/Common/source/claybrowserstruc.c Frontier/trunk/Common/source/fileloop.c Frontier/trunk/Common/source/langtree.c Frontier/trunk/Common/source/launch.c Frontier/trunk/Common/source/ophoist.c Frontier/trunk/Common/source/oppack.c Frontier/trunk/Common/source/shellfile.c Frontier/trunk/Common/source/shellscroll.c Frontier/trunk/Common/source/shellsysverbs.c Frontier/trunk/Common/source/shellupdate.c Frontier/trunk/Common/source/tableops.c Frontier/trunk/Common/source/tablescrap.c Modified: Frontier/trunk/Common/source/claybrowserstruc.c =================================================================== --- Frontier/trunk/Common/source/claybrowserstruc.c 2006-04-05 22:52:08 UTC (rev 1202) +++ Frontier/trunk/Common/source/claybrowserstruc.c 2006-04-05 22:58:09 UTC (rev 1203) @@ -431,7 +431,8 @@ static boolean deletetmpbitvisit (hdlheadrecord hnode, ptrvoid refcon) { - +#pragma unused (refcon) + if ((**hnode).tmpbit) { (**hnode).tmpbit = false; @@ -922,9 +923,10 @@ boolean browsertextualizerefcon (hdlheadrecord hnode, Handle htext) { - +#pragma unused (htext) + tyvaluerecord val; - + if (!browsergetnodevalue (hnode, &val)) return (false); @@ -960,7 +962,8 @@ static boolean lineinsertvisit (hdlheadrecord hnode, ptrvoid refcon) { - +#pragma unused (refcon) + /* set the node's refcon info to reflect its current position in the outline hierarchy. @@ -1035,7 +1038,8 @@ static boolean notownrefconvisit (hdlheadrecord hnode, ptrvoid refcon) { - +#pragma unused (refcon) + (**hnode).flnodeonscrap = true; return (true); @@ -1043,7 +1047,8 @@ static boolean closeownedwindowsvisit (hdlhashnode hn, ptrvoid refcon) { - +#pragma unused (refcon) + tyvaluerecord val = (**hn).val; hdlexternalvariable hv; hdlwindowinfo hinfo; Modified: Frontier/trunk/Common/source/fileloop.c =================================================================== --- Frontier/trunk/Common/source/fileloop.c 2006-04-05 22:52:08 UTC (rev 1202) +++ Frontier/trunk/Common/source/fileloop.c 2006-04-05 22:58:09 UTC (rev 1203) @@ -54,7 +54,8 @@ static boolean fileloopreleaseitem (Handle h) { - +#pragma unused(h) + /* callback routine that disposes of one of our items. since there are no handles linked into our handle, there's nothing to release. @@ -68,7 +69,8 @@ boolean diskinitloop (tyfileloopcallback diskfilter, Handle *hdiskloop) { - +#pragma unused(diskfilter) + /* same as fileinitloop, but for volumes on line @@ -178,7 +180,8 @@ boolean fileinitloop (const tyfilespec *fs, tyfileloopcallback filefilter, Handle *hfileloop) { - +#pragma unused(filefilter) + /* a conglomeration of filemanager incantations which sets up a UserLand fileloop construct. we create a new handle (allows fileloops to be Modified: Frontier/trunk/Common/source/langtree.c =================================================================== --- Frontier/trunk/Common/source/langtree.c 2006-04-05 22:52:08 UTC (rev 1202) +++ Frontier/trunk/Common/source/langtree.c 2006-04-05 22:58:09 UTC (rev 1203) @@ -318,7 +318,8 @@ static boolean counttreenodevisit (hdltreenode hnode, ptrvoid refcon) { - +#pragma unused (hnode) + short *ctnodes = (short *) refcon; ++*ctnodes; @@ -1025,7 +1026,7 @@ */ register hdltreenode hn = htree; - ptrpacktreeinfo pi = (ptrpacktreeinfo) refcon; + ptrpacktreeinfo lpi = (ptrpacktreeinfo) refcon; register ptrdisktreenode pn; tyvaluerecord val = (**hn).nodeval; Handle hpackedval = nil; @@ -1039,7 +1040,7 @@ if (!langpackvalue ((**hn).nodeval, &hpackedval, HNoNode)) return (false); - if (!pushhandle (hpackedval, (*pi).htreenodevalues)) { + if (!pushhandle (hpackedval, (*lpi).htreenodevalues)) { disposehandle (hpackedval); @@ -1047,7 +1048,7 @@ } } - pn = &(**(*pi).hdisktree).nodes [(*pi).ctvisited++]; + pn = &(**(*lpi).hdisktree).nodes [(*lpi).ctvisited++]; (*pn).nodetype = (**hn).nodetype; @@ -1123,15 +1124,19 @@ memtodisklong ((**info.hdisktree).flags); return (mergehandles ((Handle) info.hdisktree, info.htreenodevalues, hpacked)); - } /*langpacktree*/ +} /*langpacktree*/ -static boolean langunpacktreenode (tydisktreenode *rec, hdltreenode *hnode, ptrpacktreeinfo pi) { - +static boolean +langunpacktreenode ( + tydisktreenode *rec, + hdltreenode *hnode, + ptrpacktreeinfo ppi) +{ /* unpack a single tree node. */ - + register ptrdisktreenode pn = rec; register hdltreenode hn; Handle hpackedval = nil; @@ -1150,7 +1155,7 @@ if (!newhandle ((*pn).nodevalsize, &hpackedval)) goto error; - if (!pullfromhandle ((*pi).htreenodevalues, 0, (*pn).nodevalsize, *hpackedval)) /*does _not_ move memory*/ + if (!pullfromhandle ((*ppi).htreenodevalues, 0, (*pn).nodevalsize, *hpackedval)) /*does _not_ move memory*/ goto error; if (!langunpackvalue (hpackedval, &val)) @@ -1166,26 +1171,28 @@ (**hn).lnum = (*pn).lnum; (**hn).charnum = (*pn).charnum; - + return (true); - - error: { - - #ifndef treenodeallocator - disposehandle ((Handle) *hnode); - #else - freetreenode (*hnode); - #endif - + +error: + { +#ifndef treenodeallocator + disposehandle ((Handle) *hnode); +#else + freetreenode (*hnode); +#endif disposehandle (hpackedval); return (false); - } - } /*langunpacktreenode*/ + } +} /*langunpacktreenode*/ -static boolean langunpacktreevisit (hdltreenode *htree, ptrpacktreeinfo pi) { - +static boolean +langunpacktreevisit ( + hdltreenode *htree, + ptrpacktreeinfo ppi) +{ /* unpack a code tree recursively */ @@ -1195,18 +1202,18 @@ tydisktreenode rec; hdltreenode hnode; - while (true) { + while (true) + { + rec = (**(*ppi).hdisktree).nodes [(*ppi).ctvisited++]; - rec = (**(*pi).hdisktree).nodes [(*pi).ctvisited++]; - disktomemlong (rec.nodevalsize); disktomemshort (rec.lnum); disktomemshort (rec.charnum); /* remaining fields are byte values */ - assert ((*pi).ctvisited <= (**(*pi).hdisktree).ctnodes); + assert ((*ppi).ctvisited <= (**(*ppi).hdisktree).ctnodes); - if (!langunpacktreenode (&rec, &hnode, pi)) + if (!langunpacktreenode (&rec, &hnode, ppi)) goto error; if (hn == nil) /*first node created*/ @@ -1216,37 +1223,37 @@ hn = hnode; - if (rec.paraminfo & hasparam1_mask) { - - if (!langunpacktreevisit (&hnode, pi)) + if (rec.paraminfo & hasparam1_mask) + { + if (!langunpacktreevisit (&hnode, ppi)) goto error; - + (**hn).param1 = hnode; - } - - if (rec.paraminfo & hasparam2_mask) { - - if (!langunpacktreevisit (&hnode, pi)) + } + + if (rec.paraminfo & hasparam2_mask) + { + if (!langunpacktreevisit (&hnode, ppi)) goto error; - + (**hn).param2 = hnode; - } - - if (rec.paraminfo & hasparam3_mask) { - - if (!langunpacktreevisit (&hnode, pi)) + } + + if (rec.paraminfo & hasparam3_mask) + { + if (!langunpacktreevisit (&hnode, ppi)) goto error; - + (**hn).param3 = hnode; - } - - if (rec.paraminfo & hasparam4_mask) { - - if (!langunpacktreevisit (&hnode, pi)) + } + + if (rec.paraminfo & hasparam4_mask) + { + if (!langunpacktreevisit (&hnode, ppi)) goto error; - + (**hn).param4 = hnode; - } + } if ((rec.paraminfo & haslink_mask) == 0) break; Modified: Frontier/trunk/Common/source/launch.c =================================================================== --- Frontier/trunk/Common/source/launch.c 2006-04-05 22:52:08 UTC (rev 1202) +++ Frontier/trunk/Common/source/launch.c 2006-04-05 22:58:09 UTC (rev 1203) @@ -1454,9 +1454,12 @@ #ifdef MACVERSION static boolean system6activate (bigstring bsprogram) { - - #ifdef flsystem6 - +# if TARGET_API_MAC_CARBON == 1 +# pragma unused (bsprogram) +# endif + +# ifdef flsystem6 + bigstring bs; if (bsprogram == nil) Modified: Frontier/trunk/Common/source/ophoist.c =================================================================== --- Frontier/trunk/Common/source/ophoist.c 2006-04-05 22:52:08 UTC (rev 1202) +++ Frontier/trunk/Common/source/ophoist.c 2006-04-05 22:58:09 UTC (rev 1203) @@ -76,7 +76,8 @@ static boolean oppushhoistvisit (hdlheadrecord hnode, ptrvoid refcon) { - +#pragma unused (refcon) + /* assume we are only being called for the 1st level subheads of the guy being hoisted. we reset his left pointer to indicate that he's a summit, Modified: Frontier/trunk/Common/source/oppack.c =================================================================== --- Frontier/trunk/Common/source/oppack.c 2006-04-05 22:52:08 UTC (rev 1202) +++ Frontier/trunk/Common/source/oppack.c 2006-04-05 22:58:09 UTC (rev 1203) @@ -1177,7 +1177,8 @@ boolean optextscraptooutline (hdloutlinerecord houtline, Handle htext, hdlheadrecord *hnode) { - +#pragma unused (houtline) + /* there seems to be an opportunity to factor code here. Modified: Frontier/trunk/Common/source/shellfile.c =================================================================== --- Frontier/trunk/Common/source/shellfile.c 2006-04-05 22:52:08 UTC (rev 1202) +++ Frontier/trunk/Common/source/shellfile.c 2006-04-05 22:58:09 UTC (rev 1203) @@ -281,22 +281,22 @@ 5.0d3 dmb: look in clickers table for types we can actually open */ - tyconfigrecord config; - tyfilespec fspec; - tysftypelist filetypes; - ptrsftypelist ptypes = nil; - hdlhashtable htable; + tyconfigrecord lconfig; + tyfilespec fspec; + tysftypelist filetypes; + ptrsftypelist ptypes = nil; + hdlhashtable htable; bigstring bs; boolean fl; hdlwindowinfo hdummy; if (!keyboardstatus.floptionkey) { /*2.1b4*/ - shellgetconfig (iddefaultconfig, &config); + shellgetconfig (iddefaultconfig, &lconfig); filetypes.cttypes = 1; - filetypes.types [0] = config.filetype; + filetypes.types [0] = lconfig.filetype; // filetypes.types [1] = '2CLK'; // application glue files @@ -330,7 +330,10 @@ static void prepuserforwait (WindowPtr w) { - +#if TARGET_API_MAC_CARBON +# pragma unused(w) +#endif + /* 4.1.1b1 dmb: call langpartialeventloop when appropriate @@ -362,7 +365,8 @@ static boolean killundovisit (WindowPtr w, ptrvoid refcon) { - +#pragma unused (refcon) + if (shellpushglobals (w)) { killundo (); @@ -745,22 +749,22 @@ 5.0d8 dmb: pass file type to sfdialog for Win */ - tyconfigrecord config; + tyconfigrecord lconfig; tyfilespec fspec; tysftypelist filetypes; WindowPtr w; - shellgetconfig (iddefaultconfig, &config); + shellgetconfig (iddefaultconfig, &lconfig); clearbytes (&fspec, sizeof (fspec)); getuntitledfilename (fsname (&fspec)); - if (config.flcreateonnew) { + if (lconfig.flcreateonnew) { filetypes.cttypes = 1; - filetypes.types [0] = config.filetype; + filetypes.types [0] = lconfig.filetype; if (!sfdialog (sfputfileverb, nil, &filetypes, &fspec, 'LAND')) /* 2005-10-06 creedon - added 'LAND' */ /*user canceled*/ return (false); Modified: Frontier/trunk/Common/source/shellscroll.c =================================================================== --- Frontier/trunk/Common/source/shellscroll.c 2006-04-05 22:52:08 UTC (rev 1202) +++ Frontier/trunk/Common/source/shellscroll.c 2006-04-05 22:58:09 UTC (rev 1203) @@ -356,7 +356,7 @@ SInt32 theValue = 0, theRange, theDistance, thePin; Rect rectControl, indicatorbounds; - WindowPtr pWindow; + WindowPtr lpWindow; long thumbheight = 16; long thumbwidth = 16; RgnHandle indicatorregion = NewRgn (); @@ -376,7 +376,7 @@ gTotalWidthAdjust = ((kScrollArrowWidth * 2) + thumbwidth); - pWindow = shellwindow; // (*hControl)->contrlOwner; + lpWindow = shellwindow; // (*hControl)->contrlOwner; zerorect (&rectControl); Modified: Frontier/trunk/Common/source/shellsysverbs.c =================================================================== --- Frontier/trunk/Common/source/shellsysverbs.c 2006-04-05 22:52:08 UTC (rev 1202) +++ Frontier/trunk/Common/source/shellsysverbs.c 2006-04-05 22:58:09 UTC (rev 1203) @@ -870,7 +870,8 @@ extern boolean hashstatsverb (tyvaluerecord *v); static boolean frontierfunctionvalue (short token, hdltreenode hparam1, tyvaluerecord *vreturned, bigstring bserror) { - +#pragma unused (bserror) + /* 6/5/92 dmb: added isruntime func Modified: Frontier/trunk/Common/source/shellupdate.c =================================================================== --- Frontier/trunk/Common/source/shellupdate.c 2006-04-05 22:52:08 UTC (rev 1202) +++ Frontier/trunk/Common/source/shellupdate.c 2006-04-05 22:58:09 UTC (rev 1203) @@ -333,14 +333,16 @@ static boolean updatenowvisit (WindowPtr wupdate, ptrvoid refcon) { - +#pragma unused (refcon) + shellupdatenow (wupdate); return (true); } /*updatenowvisit*/ -void shellupdateallnow (void) { /*updates all windows immediately*/ +/*updates all windows immediately*/ +void shellupdateallnow (void) { shellvisittypedwindows (-1, &updatenowvisit, nil); /*visit all windows*/ } /*shellupdateallnow*/ Modified: Frontier/trunk/Common/source/tableops.c =================================================================== --- Frontier/trunk/Common/source/tableops.c 2006-04-05 22:52:08 UTC (rev 1202) +++ Frontier/trunk/Common/source/tableops.c 2006-04-05 22:58:09 UTC (rev 1203) @@ -236,7 +236,8 @@ boolean newtablevariable (boolean flinmemory, long variabledata, hdltablevariable *h, boolean flxml) { - +#pragma unused (flxml) + /* tytablevariable item; @@ -546,7 +547,8 @@ static boolean nosubsdirtyvisit (hdlhashnode hnode, ptrvoid refcon) { - +#pragma unused (refcon) + /* return true if hnode and its substructure is all clean */ @@ -842,7 +844,8 @@ boolean tablemovetoname (hdlhashtable htable, bigstring bsname) { - +#pragma unused (htable) + /* 2/4/91 dmb: must visi if already on cell Modified: Frontier/trunk/Common/source/tablescrap.c =================================================================== --- Frontier/trunk/Common/source/tablescrap.c 2006-04-05 22:52:08 UTC (rev 1202) +++ Frontier/trunk/Common/source/tablescrap.c 2006-04-05 22:58:09 UTC (rev 1203) @@ -543,7 +543,8 @@ static boolean tableclosewindows (hdlhashnode hnode, ptrvoid refcon) { - +#pragma unused (refcon) + /* the indicated external value is being deleted. close any windows that contain descendants of the table This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |