|
From: <kar...@us...> - 2006-04-05 23:07:29
|
Revision: 1204 Author: karstenw Date: 2006-04-05 16:07:18 -0700 (Wed, 05 Apr 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1204&view=rev Log Message: ----------- parameter unused & name conflict fixes Modified Paths: -------------- Frontier/trunk/Common/source/cancoonwindow.c Frontier/trunk/Common/source/langdll.c Frontier/trunk/Common/source/langregexp.c Frontier/trunk/Common/source/langtrace.c Frontier/trunk/Common/source/opbuttons.c Frontier/trunk/Common/source/opdraggingmove.c Frontier/trunk/Common/source/opicons.c Frontier/trunk/Common/source/opprint.c Frontier/trunk/Common/source/player.c Frontier/trunk/Common/source/scripts.c Frontier/trunk/Common/source/strings.c Modified: Frontier/trunk/Common/source/cancoonwindow.c =================================================================== --- Frontier/trunk/Common/source/cancoonwindow.c 2006-04-05 22:58:09 UTC (rev 1203) +++ Frontier/trunk/Common/source/cancoonwindow.c 2006-04-05 23:07:18 UTC (rev 1204) @@ -175,7 +175,8 @@ void ccwindowsetup (boolean flbigwindow, boolean floldversion) { - +#pragma unused (flbigwindow) + /* called when cc is booting, the window hasn't shown up on the screen yet, we get a chance to change the size of the window. we don't remember whether Modified: Frontier/trunk/Common/source/langdll.c =================================================================== --- Frontier/trunk/Common/source/langdll.c 2006-04-05 22:58:09 UTC (rev 1203) +++ Frontier/trunk/Common/source/langdll.c 2006-04-05 23:07:18 UTC (rev 1204) @@ -348,6 +348,7 @@ odbBool xCALLBACK extOdbGetListCount (odbRef odb, odbValueRecord *value, long * cnt) { +#pragma unused (odb) odbBool res; res = false; @@ -366,7 +367,8 @@ } /*extOdbGetListCount*/ -odbBool xCALLBACK extOdbDeleteListValue (odbRef odb, odbValueRecord *value, long index, char * recordname) { +odbBool xCALLBACK extOdbDeleteListValue (odbRef odb, odbValueRecord *value, long idx, char * recordname) { +#pragma unused (odb) odbBool res; res = false; @@ -374,7 +376,7 @@ grabthreadglobals (); if (((value->valuetype == odb_recordvaluetype) || (value->valuetype == odb_listvaluetype)) && (value->data.listvalue != NULL)) { - res = opdeletelistitem ((hdllistrecord) value->data.listvalue, (short) index, recordname); + res = opdeletelistitem ((hdllistrecord) value->data.listvalue, (short) idx, recordname); } releasethreadglobals (); @@ -383,7 +385,7 @@ } /*extOdbDeleteListValue*/ -odbBool xCALLBACK extOdbSetListValue (odbRef odb, odbValueRecord *value, long index, char * recordname, odbValueRecord *valueData) { +odbBool xCALLBACK extOdbSetListValue (odbRef odb, odbValueRecord *value, long idx, char * recordname, odbValueRecord *valueData) { odbBool res; tyvaluerecord val; @@ -395,7 +397,7 @@ convertodbtotyval (valueData, &val); - res = setnthlistval ((hdllistrecord) value->data.listvalue, index, recordname, &val); + res = setnthlistval ((hdllistrecord) value->data.listvalue, idx, recordname, &val); } releasethreadglobals (); @@ -404,7 +406,8 @@ } /*extOdbSetListValue*/ -odbBool xCALLBACK extOdbGetListValue (odbRef odb, odbValueRecord *value, long index, char * recordname, odbValueRecord *valueReturn) { +odbBool xCALLBACK extOdbGetListValue (odbRef odb, odbValueRecord *value, long idx, char * recordname, odbValueRecord *valueReturn) { +#pragma unused (odb) odbBool res; tyvaluerecord valret; @@ -413,7 +416,7 @@ grabthreadglobals (); if (((value->valuetype == odb_recordvaluetype) || (value->valuetype == odb_listvaluetype)) && (value->data.listvalue != NULL)) { - res = getnthlistval ((hdllistrecord) value->data.listvalue, index, recordname, &valret); + res = getnthlistval ((hdllistrecord) value->data.listvalue, idx, recordname, &valret); if (res) res = converttyvaltoodb (&valret, valueReturn); @@ -426,6 +429,7 @@ odbBool xCALLBACK extOdbAddListValue (odbRef odb, odbValueRecord *value, char * recordname, odbValueRecord *valueData) { +#pragma unused (odb) odbBool res; tyvaluerecord val; @@ -722,6 +726,9 @@ odbBool xCALLBACK extInvoke (bigstring bsscriptname, void * pDispParams, odbValueRecord * retval, boolean *flfoundhandler, unsigned int * errarg) { +#if MACVERSION +# pragma unused (bsscriptname, pDispParams, flfoundhandler, errarg) +#endif boolean res; tyvaluerecord val; Modified: Frontier/trunk/Common/source/langregexp.c =================================================================== --- Frontier/trunk/Common/source/langregexp.c 2006-04-05 22:58:09 UTC (rev 1203) +++ Frontier/trunk/Common/source/langregexp.c 2006-04-05 23:07:18 UTC (rev 1204) @@ -1346,7 +1346,8 @@ static boolean replscanwriteliteral (int ix, int len, bigstring bserror, void *refcon) { - +#pragma unused (bserror) + tyreplscanexpandinfo *info = (tyreplscanexpandinfo *) refcon; return (writehandlestreamhandlepart (&(info->s), info->hsubject, ix, len)); @@ -1354,7 +1355,8 @@ static boolean replscanwritenumbered (int ix, int len, int ref, bigstring bserror, void *refcon) { - +#pragma unused (len) + tyreplscanexpandinfo *info = (tyreplscanexpandinfo *) refcon; tyvaluerecord val; @@ -1379,7 +1381,8 @@ static boolean replscanwritenamed (int ix, int len, const char *cptr, int clen, bigstring bserror, void *refcon) { - +#pragma unused (ix, len, bserror) + tyreplscanexpandinfo *info = (tyreplscanexpandinfo *) refcon; hdlhashnode hnode; hdlhashtable ht; @@ -1414,6 +1417,7 @@ static boolean regexpcheckliteral (int ix, int len, bigstring bserror, void *refcon) { +#pragma unused (ix, len, bserror, refcon) /*nothing to check*/ @@ -1422,7 +1426,8 @@ static boolean regexpchecknumbered (int ix, int len, int ref, bigstring bserror, void *refcon) { - +#pragma unused (len) + Handle hcp = (Handle) refcon; if (ref > getcapturecount (hcp)) { @@ -1435,7 +1440,8 @@ static boolean regexpchecknamed (int ix, int len, const char *cptr, int clen, bigstring bserror, void *refcon) { - +#pragma unused (len) + Handle hcp = (Handle) refcon; int ref; @@ -1454,7 +1460,8 @@ static boolean regexptextsearchwriteliteral (int ix, int len, bigstring bserror, void *refcon) { - +#pragma unused (bserror) + tyregexpsearchinfo *info = (tyregexpsearchinfo *) refcon; return (writehandlestream (&(info->s), stringbaseaddress (searchparams.bsreplace) + ix, len)); @@ -1462,7 +1469,8 @@ static boolean regexptextsearchwritenumbered (int ix, int len, int ref, bigstring bserror, void *refcon) { - +#pragma unused (len, ix, bserror) + tyregexpsearchinfo *info = (tyregexpsearchinfo *) refcon; return (writehandlestream (&(info->s), info->p + getgroupoffset (info->hovector, ref), getgrouplength (info->hovector, ref))); @@ -1470,7 +1478,8 @@ static boolean regexptextsearchwritenamed (int ix, int len, const char *cptr, int clen, bigstring bserror, void *refcon) { - +#pragma unused (ix, len, bserror) + tyregexpsearchinfo *info = (tyregexpsearchinfo *) refcon; int ref; @@ -2953,6 +2962,7 @@ static boolean regexpjoinverb (hdltreenode hp1, tyvaluerecord *v, bigstring bserror) { +#pragma unused (bserror) /* join (s, strList) Modified: Frontier/trunk/Common/source/langtrace.c =================================================================== --- Frontier/trunk/Common/source/langtrace.c 2006-04-05 22:58:09 UTC (rev 1203) +++ Frontier/trunk/Common/source/langtrace.c 2006-04-05 23:07:18 UTC (rev 1204) @@ -111,12 +111,13 @@ void langstarttrace (void) { } - + void langendtrace (void) { } - void langtrace (bigstring bs) { } + void langtrace (bigstring bs) { +#pragma unused (bs) +} - #endif /* Modified: Frontier/trunk/Common/source/opbuttons.c =================================================================== --- Frontier/trunk/Common/source/opbuttons.c 2006-04-05 22:58:09 UTC (rev 1203) +++ Frontier/trunk/Common/source/opbuttons.c 2006-04-05 23:07:18 UTC (rev 1204) @@ -81,6 +81,7 @@ boolean opbuttonstatus (short buttonnum, tybuttonstatus *status) { +#pragma unused (buttonnum) /* 7.1b18 PBS: buttons are always displayed and enabled. Modified: Frontier/trunk/Common/source/opdraggingmove.c =================================================================== --- Frontier/trunk/Common/source/opdraggingmove.c 2006-04-05 22:58:09 UTC (rev 1203) +++ Frontier/trunk/Common/source/opdraggingmove.c 2006-04-05 23:07:18 UTC (rev 1204) @@ -158,7 +158,8 @@ static boolean isundermark (hdlheadrecord htarget, tydirection dir) { - +#pragma unused (dir) + while (true) { if (opgetmark (htarget)) Modified: Frontier/trunk/Common/source/opicons.c =================================================================== --- Frontier/trunk/Common/source/opicons.c 2006-04-05 22:58:09 UTC (rev 1203) +++ Frontier/trunk/Common/source/opicons.c 2006-04-05 23:07:18 UTC (rev 1204) @@ -124,7 +124,8 @@ boolean opdefaultdrawicon (hdlheadrecord hnode, const Rect *iconrect, boolean flselected, boolean flinverted) { - +#pragma unused(flselected, flinverted) + /* the default icon drawing routine, for the script editor and menu editor, not for clay basket. Modified: Frontier/trunk/Common/source/opprint.c =================================================================== --- Frontier/trunk/Common/source/opprint.c 2006-04-05 22:58:09 UTC (rev 1203) +++ Frontier/trunk/Common/source/opprint.c 2006-04-05 23:07:18 UTC (rev 1204) @@ -67,9 +67,9 @@ short ctpages = 1; short sum = 0; short lh; - typrintinfo *pi = &shellprintinfo; + typrintinfo *lpi = &shellprintinfo; - vertpixels = (pi->paperrect.bottom - pi->paperrect.top); //6.0b4, was: * pi->scaleMult / pi->scaleDiv; + vertpixels = (lpi->paperrect.bottom - lpi->paperrect.top); //6.0b4, was: * lpi->scaleMult / lpi->scaleDiv; while (true) { Modified: Frontier/trunk/Common/source/player.c =================================================================== --- Frontier/trunk/Common/source/player.c 2006-04-05 22:58:09 UTC (rev 1203) +++ Frontier/trunk/Common/source/player.c 2006-04-05 23:07:18 UTC (rev 1204) @@ -242,7 +242,8 @@ static boolean playerresetrects (hdlwindowinfo hinfo) { - +#pragma unused (hinfo) + return (true); } /*playerresetrects*/ @@ -481,6 +482,7 @@ pascal Boolean playermoviecontrollereventfilter (MovieController mc, short action, void *params, long refcon) { +#pragma unused (mc, refcon, params) /* 7.0b4 PBS: Handle movie controller events. Modified: Frontier/trunk/Common/source/scripts.c =================================================================== --- Frontier/trunk/Common/source/scripts.c 2006-04-05 22:58:09 UTC (rev 1203) +++ Frontier/trunk/Common/source/scripts.c 2006-04-05 23:07:18 UTC (rev 1204) @@ -525,7 +525,8 @@ static boolean installscriptvisit (hdlhashnode hnode, ptrvoid refcon) { - +#pragma unused (refcon) + hdltreenode hcode; scriptcompiler (hnode, &hcode); @@ -583,7 +584,8 @@ static boolean newprocessvisit (hdlhashnode hnode, ptrvoid refcon) { - +#pragma unused (refcon) + hdltreenode hcode; hdlprocessrecord hprocess; boolean fl; @@ -702,7 +704,8 @@ static boolean runprocessvisit (hdlhashnode hnode, ptrvoid refcon) { - +#pragma unused (refcon) + hdltreenode hcode; hdlprocessrecord hprocess; tyvaluerecord val; @@ -771,7 +774,8 @@ static boolean scriptinvalbuttonsvisit (WindowPtr w, ptrvoid refcon) { - +#pragma unused (refcon) + /* 7.0b42 PBS: If Mac OS X, re-draw the script buttons right away, because otherwise the window doesn't get updated until it's activated. @@ -1446,7 +1450,8 @@ #ifdef flcomponent static pascal OSErr handlerecordedtext (const AppleEvent *event, AppleEvent *reply, SInt32 refcon) { - +#pragma unused (reply, refcon) + /* 2.1b3 dmb: ignore extra syntax/lines needed for text-based recording @@ -1686,7 +1691,8 @@ static pascal OSErr handlestoprecording (const AppleEvent *event, AppleEvent *reply, SInt32 refcon) { - +#pragma unused (event, reply, refcon) + /* 2.1b5 dmb: special event handler for QuicKeys recording panel */ @@ -2081,13 +2087,13 @@ register short x = buttonnum; register hdldebuggerrecord hd = debuggerdata; - register boolean flscriptrunning = (**hd).flscriptrunning; + register boolean lflscriptrunning = (**hd).flscriptrunning; register boolean flscriptsuspended = (**hd).flscriptsuspended; register boolean flrunningthisscript; - flrunningthisscript = flscriptrunning && scriptinruntimestack (); + flrunningthisscript = lflscriptrunning && scriptinruntimestack (); - if (flscriptrunning) { + if (lflscriptrunning) { if ((x != installbutton) && (x != killbutton)) /*rule 3*/ if (!flrunningthisscript) @@ -2112,16 +2118,16 @@ case recordbutton: #ifdef flcomponent - return (!flscriptrunning && scriptrecordable ()); + return (!lflscriptrunning && scriptrecordable ()); #else return (false); #endif case runbutton: - return (!flscriptrunning); + return (!lflscriptrunning); case debugbutton: - return (!flscriptrunning && ((**outlinedata).outlinesignature == typeLAND)); + return (!lflscriptrunning && ((**outlinedata).outlinesignature == typeLAND)); case stopbutton: return (!flscriptsuspended); @@ -2133,13 +2139,13 @@ case stepbutton: case inbutton: case outbutton: - return (flscriptrunning && flscriptsuspended && !(**hd).fllangerror); + return (lflscriptrunning && flscriptsuspended && !(**hd).fllangerror); case localsbutton: - return (flscriptrunning && flscriptsuspended); /*(**hd).flstepping && (!(**hd).flfollowing))*/ + return (lflscriptrunning && flscriptsuspended); /*(**hd).flstepping && (!(**hd).flfollowing))*/ case killbutton: - return (flscriptrunning); + return (lflscriptrunning); case installbutton: return (!flrunningthisscript && scriptinstallable () && !scripthascleancode ()); @@ -2176,12 +2182,12 @@ register hdldebuggerrecord hd = debuggerdata; register hdlprocessrecord hp = (**hd).scriptprocess; - register boolean flscriptrunning = (**hd).flscriptrunning; + register boolean lflscriptrunning = (**hd).flscriptrunning; register boolean flrunningthisscript; register boolean fldebuggingthisscript; register short x = buttonnum; - flrunningthisscript = flscriptrunning && scriptinruntimestack (); /*1/2/91*/ + flrunningthisscript = lflscriptrunning && scriptinruntimestack (); /*1/2/91*/ fldebuggingthisscript = flrunningthisscript && (**hp).fldebugging; @@ -2205,7 +2211,7 @@ case runbutton: case debugbutton: - return (!flscriptrunning); + return (!lflscriptrunning); case installbutton: return (!fldebuggingthisscript && scriptinstallable ()); @@ -2224,7 +2230,7 @@ return (fldebuggingthisscript); case killbutton: - return (flscriptrunning); + return (lflscriptrunning); } /*switch*/ return (true); @@ -2419,7 +2425,7 @@ register hdltreenode hn = hnode; register tytreetype op; register boolean flshowline = false; - register boolean flcontinue = true; + register boolean lflcontinue = true; short topscriptsource; tysourcerecord source; boolean flbreakpoint = false; @@ -2456,7 +2462,7 @@ flshowline = true; - flcontinue = false; + lflcontinue = false; } else { @@ -2501,27 +2507,27 @@ break; } - flcontinue = !flshowline; /*continue if we aren't going to show this line*/ + lflcontinue = !flshowline; /*continue if we aren't going to show this line*/ if ((**hd).flfollowing) flshowline = true; /*show every line when following*/ } - if (flcontinue) { /*so far, nothing is suspending the processor*/ + if (lflcontinue) { /*so far, nothing is suspending the processor*/ - hdlheadrecord hnode; + hdlheadrecord hnoderec; oppushoutline (source.houtline); /*set globals for breakpoint check*/ - if (opgetnthnode (lnum, &hnode) && (**hnode).flbreakpoint) /*breakpoint*/ + if (opgetnthnode (lnum, &hnoderec) && (**hnoderec).flbreakpoint) /*breakpoint*/ - if (!opnestedincomment (hnode)) { + if (!opnestedincomment (hnoderec)) { flbreakpoint = true; flshowline = true; - flcontinue = false; + lflcontinue = false; } oppopoutline (); @@ -2531,7 +2537,7 @@ if (source.pwindow == nil) { /*closed, or never opened*/ - if (flcontinue || fllangerror) { /*show line if window is open; don't bring to front*/ + if (lflcontinue || fllangerror) { /*show line if window is open; don't bring to front*/ hdlwindowinfo hinfo; @@ -2563,7 +2569,7 @@ (**hd).scriptsourcestack [topscriptsource - 1].pwindow = source.pwindow; } - if (!flcontinue && !fllangerror) + if (!lflcontinue && !fllangerror) windowbringtofront (source.pwindow); shellpushglobals (source.pwindow); @@ -2579,7 +2585,7 @@ exit: - if (flcontinue) /*don't drop into event loop, continue running script*/ + if (lflcontinue) /*don't drop into event loop, continue running script*/ return (scriptbackgroundtask (false)); (**hd).flscriptsuspended = true; @@ -2608,7 +2614,8 @@ boolean scriptpushsourcecode (hdlhashtable htable, hdlhashnode hnode, bigstring bsname) { - +#pragma unused (bsname) + /* code execution is about to move into a new script. hnode should be the node in htable containing the script (external variable). @@ -2798,7 +2805,8 @@ boolean scriptpoptable (hdlhashtable htable) { - +#pragma unused (htable) + /* 1/9/91 dmb: see comment in scriptgetlevelname... @@ -2942,10 +2950,10 @@ 5.0.2 dmb: don't clear the recently changed bit; restore it. */ - boolean flbreak = !(**hnode).flbreakpoint; + boolean lflbreak = !(**hnode).flbreakpoint; boolean flrecentlychanged = (**outlinedata).flrecentlychanged; - (**hnode).flbreakpoint = flbreak; + (**hnode).flbreakpoint = lflbreak; opinvalnode (hnode); /*inval the dirty line*/ @@ -2955,7 +2963,7 @@ opupdatenow (); - return (flbreak); + return (lflbreak); } /*optogglebreakpoint*/ @@ -3089,7 +3097,8 @@ static boolean scriptcommentvisit (hdlheadrecord hnode, void *refcon) { - +#pragma unused (refcon) + register hdlheadrecord h = hnode; bigstring bs; @@ -3634,7 +3643,7 @@ serverarray [(*cbd).ctmenus++] = subtype; - if (subtype == (*cbd).signature) + if (subtype == (OSType)(*cbd).signature) (*cbd).checkeditem = (*cbd).ctmenus; return (true); @@ -3642,7 +3651,8 @@ static boolean scriptserverpopupselect (hdlmenu hmenu, short itemselected) { - +#pragma unused (hmenu) + /* 2.1b11 dmb: dirty the outline */ Modified: Frontier/trunk/Common/source/strings.c =================================================================== --- Frontier/trunk/Common/source/strings.c 2006-04-05 22:58:09 UTC (rev 1203) +++ Frontier/trunk/Common/source/strings.c 2006-04-05 23:07:18 UTC (rev 1204) @@ -1322,16 +1322,16 @@ } /*pushheapstring*/ -void timedatestring (long time, bigstring bs) { +void timedatestring (long ptime, bigstring bs) { bigstring bstime; - timetodatestring (time, bs, false); + timetodatestring (ptime, bs, false); getstringlist (interfacelistnumber, timedateseperatorstring, bstime); pushstring (bstime, bs); - timetotimestring (time, bstime, true); + timetotimestring (ptime, bstime, true); pushstring (bstime, bs); @@ -1351,13 +1351,13 @@ } */ - IUDateString (time, shortDate, bs); + IUDateString (ptime, shortDate, bs); getstringlist (interfacelistnumber, timedateseperatorstring, bstime); pushstring (bstime, bs); - IUTimeString (time, true, bstime); + IUTimeString (ptime, true, bstime); pushstring (bstime, bs); #endif @@ -1879,8 +1879,9 @@ /* 2.1b4 dmb: always copy into type, even when returning false for bad length */ - - register short len = stringlength (bs); + + // kw 2005-11-28 changed to unsigned for better match with stringlength() + register unsigned short len = stringlength (bs); boolean fl = true; *type = ' '; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |