|
From: Andre R. <and...@us...> - 2004-10-30 22:20:08
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11075 Modified Files: langregexp.c Log Message: Fix GCC compiler warnings. Index: langregexp.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langregexp.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** langregexp.c 23 Oct 2004 22:30:08 -0000 1.4 --- langregexp.c 30 Oct 2004 22:19:55 -0000 1.5 *************** *** 572,576 **** grepfunc, ! getpatterinfofunc, expandfunc, --- 572,576 ---- grepfunc, ! getpatterninfofunc, expandfunc, *************** *** 703,710 **** typedef boolean (*tyreplscannamedcallback) (int ix, int len, const char *cptr, int clen, bigstring bserror, void *refcon); ! typedef boolean (*tyreplscanbadgroupnamecallback) (int pos, bigstring bsmsg); ! static const unsigned char *chartableptr = nil; --- 703,710 ---- typedef boolean (*tyreplscannamedcallback) (int ix, int len, const char *cptr, int clen, bigstring bserror, void *refcon); ! typedef void (*tyreplscanbadgroupnamecallback) (int pos, bigstring bsmsg); ! static unsigned char *chartableptr = nil; *************** *** 910,914 **** } ! *hlist = vparam.data.binaryvalue; return (true); --- 910,914 ---- } ! *hlist = (hdllistrecord) vparam.data.binaryvalue; return (true); *************** *** 1030,1034 **** subject, length, ix, matchlen, getoptions (hcp) & PUBLIC_EXEC_OPTIONS, ! *hovector, getovectorsize (hcp), chartableptr); /* process execution errors here, presumably indicative of a bug in the PCRE library */ --- 1030,1034 ---- subject, length, ix, matchlen, getoptions (hcp) & PUBLIC_EXEC_OPTIONS, ! (int *)*hovector, getovectorsize (hcp), chartableptr); /* process execution errors here, presumably indicative of a bug in the PCRE library */ *************** *** 1168,1172 **** initvalue (&vtemp, listvaluetype); ! vtemp.data.binaryvalue = hoffsets; if (!hashtableassign (ht, STR_groupOffsets, vtemp)) --- 1168,1172 ---- initvalue (&vtemp, listvaluetype); ! vtemp.data.binaryvalue = (Handle) hoffsets; if (!hashtableassign (ht, STR_groupOffsets, vtemp)) *************** *** 1179,1183 **** initvalue (&vtemp, listvaluetype); ! vtemp.data.binaryvalue = hlengths; if (!hashtableassign (ht, STR_groupLengths, vtemp)) --- 1179,1183 ---- initvalue (&vtemp, listvaluetype); ! vtemp.data.binaryvalue = (Handle) hlengths; if (!hashtableassign (ht, STR_groupLengths, vtemp)) *************** *** 1190,1194 **** initvalue (&vtemp, listvaluetype); ! vtemp.data.binaryvalue = hstrings; if (!hashtableassign (ht, STR_groupStrings, vtemp)) --- 1190,1194 ---- initvalue (&vtemp, listvaluetype); ! vtemp.data.binaryvalue = (Handle) hstrings; if (!hashtableassign (ht, STR_groupStrings, vtemp)) *************** *** 1290,1303 **** - static int regexpstringnumberfromtable (char *cptr, int len, void *refcon) { - - hdlhashtable htmatchinfo = (hdlhashtable) refcon; - - - - return (PCRE_ERROR_NOSUBSTRING); - } /*regexpstringnumberfrompattern*/ - - static int regexpstringnumberfrompattern (const char *cptr, int len, Handle hcp) { --- 1290,1293 ---- *************** *** 1506,1510 **** ! static boolean regexptextsearchwritenamed (int ix, int len, char *cptr, int clen, bigstring bserror, void *refcon) { tyregexpsearchinfo *info = (tyregexpsearchinfo *) refcon; --- 1496,1500 ---- ! static boolean regexptextsearchwritenamed (int ix, int len, const char *cptr, int clen, bigstring bserror, void *refcon) { tyregexpsearchinfo *info = (tyregexpsearchinfo *) refcon; *************** *** 1530,1534 **** regexperrorwithnumber (frbadgroupnameerror, pos, bsmsg); ! } /*replscanerror*/ --- 1520,1524 ---- regexperrorwithnumber (frbadgroupnameerror, pos, bsmsg); ! } /*regexpcheckerror*/ *************** *** 1599,1604 **** } else { /*might be a named group*/ - - long ref = 0; while (p1 < pend && *p1 != '>') --- 1589,1592 ---- *************** *** 1665,1669 **** ! static boolean regexpcompilereplacement (Handle hcp, char *p, long len, bigstring bserror, Handle *hreplaceparts) { tyreplscancompileinfo info; --- 1653,1657 ---- ! static boolean regexpcompilereplacement (Handle hcp, char *p, long len, bigstring bserror, hdlreplacepart *hreplaceparts) { tyreplscancompileinfo info; *************** *** 1688,1692 **** } ! *hreplaceparts = closehandlestream (&info.s); return (*hreplaceparts != nil); --- 1676,1680 ---- } ! *hreplaceparts = (hdlreplacepart) closehandlestream (&info.s); return (*hreplaceparts != nil); *************** *** 1744,1748 **** */ - boolean fl = false; tyvaluerecord vhandler; hdlhashnode handlernode; --- 1732,1735 ---- *************** *** 1759,1771 **** /*build a code tree and call the handler, with our error hook in place*/ ! hcode = nil; if (vhandler.valuetype == codevaluetype) { ! hcode = vhandler.data.codevalue; } else if ((**htable).valueroutine == nil) { /*not a kernel table*/ ! if (!langexternalvaltocode (vhandler, &hcode)) { langparamerror (notfunctionerror, bsverb); --- 1746,1758 ---- /*build a code tree and call the handler, with our error hook in place*/ ! *hcode = nil; if (vhandler.valuetype == codevaluetype) { ! *hcode = vhandler.data.codevalue; } else if ((**htable).valueroutine == nil) { /*not a kernel table*/ ! if (!langexternalvaltocode (vhandler, hcode)) { langparamerror (notfunctionerror, bsverb); *************** *** 1774,1780 **** } ! if (hcode == nil) { /*needs compilation*/ ! if (!langcompilescript (handlernode, &hcode)) return (false); } --- 1761,1767 ---- } ! if (*hcode == nil) { /*needs compilation*/ ! if (!langcompilescript (handlernode, hcode)) return (false); } *************** *** 1981,1985 **** initvalue (&vtemp, listvaluetype); ! vtemp.data.binaryvalue = hsublist; fl = langpushlistval (hresult, nil, &vtemp); --- 1968,1972 ---- initvalue (&vtemp, listvaluetype); ! vtemp.data.binaryvalue = (Handle) hsublist; fl = langpushlistval (hresult, nil, &vtemp); *************** *** 2270,2274 **** (const char *)ptext, lentext, ixstart, lentext - ixstart, getoptions (hcp) & PUBLIC_EXEC_OPTIONS, ! *hovector, getovectorsize (hcp), chartableptr); if (res <= 0) --- 2257,2261 ---- (const char *)ptext, lentext, ixstart, lentext - ixstart, getoptions (hcp) & PUBLIC_EXEC_OPTIONS, ! (int *) *hovector, getovectorsize (hcp), chartableptr); if (res <= 0) *************** *** 2329,2333 **** tyvaluerecord vtemp; int options = 0; - int capturecount = 0; short ctconsumed = 1; short ctpositional = 1; --- 2316,2319 ---- *************** *** 2630,2634 **** goto exit; ! pushtmpstack (hreplaceparts); /* run engine */ --- 2616,2620 ---- goto exit; ! pushtmpstack ((Handle) hreplaceparts); /* run engine */ *************** *** 2698,2702 **** releaseheaptmp (hovec); /*no need to accumulate these on the tmp stack*/ ! releaseheaptmp (hreplaceparts); /* set result */ --- 2684,2688 ---- releaseheaptmp (hovec); /*no need to accumulate these on the tmp stack*/ ! releaseheaptmp ((Handle) hreplaceparts); /* set result */ *************** *** 2820,2824 **** return (false); ! if (!setheapvalue (hresult, listvaluetype, v)) return (false); --- 2806,2810 ---- return (false); ! if (!setheapvalue ((Handle) hresult, listvaluetype, v)) return (false); *************** *** 2908,2912 **** return (false); ! if (!setheapvalue (hresult, listvaluetype, v)) return (false); --- 2894,2898 ---- return (false); ! if (!setheapvalue ((Handle) hresult, listvaluetype, v)) return (false); *************** *** 3220,3224 **** return (false); ! if (!setheapvalue (hresult, listvaluetype, v)) return (false); --- 3206,3210 ---- return (false); ! if (!setheapvalue ((Handle) hresult, listvaluetype, v)) return (false); *************** *** 3233,3237 **** info.hresult = hresult; info.flincludematches = flincludematches; ! info.bserrorptr = &bserror; flsuccess = langvisitlistvalues (&vsubject, ®expgreplistitemscallback, (ptrvoid) &info); --- 3219,3223 ---- info.hresult = hresult; info.flincludematches = flincludematches; ! info.bserrorptr = (StringPtr) &bserror; flsuccess = langvisitlistvalues (&vsubject, ®expgreplistitemscallback, (ptrvoid) &info); *************** *** 3535,3539 **** } ! info.hgroups = vtemp.data.binaryvalue; /* get namedGroups sub-table from info table*/ --- 3521,3525 ---- } ! info.hgroups = (hdllistrecord) vtemp.data.binaryvalue; /* get namedGroups sub-table from info table*/ *************** *** 3612,3616 **** return (regexpgrepverb (hp1, v, bserror)); ! case getpatterinfofunc: return (regexpgetpatterninfoverb (hp1, v, bserror)); --- 3598,3602 ---- return (regexpgrepverb (hp1, v, bserror)); ! case getpatterninfofunc: return (regexpgetpatterninfoverb (hp1, v, bserror)); *************** *** 3633,3637 **** assert (sizeof (regexp_default_tables) == tables_length); /*if this fails, something changed in the PCRE library*/ ! chartableptr = ®exp_default_tables; //was: pcre_maketables (); /*build char tables using current locale*/ return (loadfunctionprocessor (idregexpverbs, ®expfunctionvalue)); --- 3619,3623 ---- assert (sizeof (regexp_default_tables) == tables_length); /*if this fails, something changed in the PCRE library*/ ! chartableptr = regexp_default_tables; //was: pcre_maketables (); /*build char tables using current locale*/ return (loadfunctionprocessor (idregexpverbs, ®expfunctionvalue)); |