|
From: Andre R. <and...@us...> - 2004-10-30 22:46:22
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17808 Modified Files: langhtml.c Log Message: Fix GCC compiler warnings. Index: langhtml.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/langhtml.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** langhtml.c 23 Oct 2004 22:25:51 -0000 1.2 --- langhtml.c 30 Oct 2004 22:46:12 -0000 1.3 *************** *** 350,354 **** #if version42orgreater ! static ptraddress callbackscript = nil; typedef struct typrocessmacrosinfo { --- 350,354 ---- #if version42orgreater ! //static ptraddress callbackscript = nil; typedef struct typrocessmacrosinfo { *************** *** 380,384 **** #endif ! static boolean htmlcallbackerror (bigstring bsmsg, ptrstring perrorstring) { /* --- 380,384 ---- #endif ! static boolean htmlcallbackerror (bigstring bsmsg, ptrvoid perrorstring) { /* *************** *** 388,397 **** */ ! copystring (bsmsg, perrorstring); return (true); } /*htmlcallbackerror*/ ! #if version42orgreater --- 388,397 ---- */ ! copystring (bsmsg, (ptrstring) perrorstring); return (true); } /*htmlcallbackerror*/ ! #if 0 #if version42orgreater *************** *** 573,576 **** --- 573,577 ---- #endif + #endif *************** *** 625,658 **** } /*langpushwithtable*/ - /* - static boolean langlookupstringvalue (hdlhashtable ht, bigstring bs, bigstring bsval) { - - /* - a genereic piece of code: look up the string value, with errors - %/ - - tyvaluerecord val; - - if (!hashtablelookup (ht, bs, &val)) { - - langparamerror (unknownidentifiererror, bs); - - return (false); - } - - /* - if (!copyvaluerecord (val, &val) && coercetostring (&val)) - return (false); - - exemptfromtmpstack (&val); - - *value = val.data.stringvalue; - %/ - - pullstringvalue (&val, bsval); - - return (true); - } /*langlookupstringvalue*/ - static boolean htmlgetdefaultpagetable (hdlhashtable *hpagetable) { --- 626,629 ---- *************** *** 663,667 **** return (langfastaddresstotable (roottable, str_websitesdata, hpagetable)); ! } /*htmlgetpagetable*/ --- 634,638 ---- return (langfastaddresstotable (roottable, str_websitesdata, hpagetable)); ! } /*htmlgetdefaultpagetable*/ *************** *** 684,687 **** --- 655,660 ---- + #if 0 + static boolean htmlgetpagetable (hdlhashtable *hpagetable) { *************** *** 712,715 **** --- 685,690 ---- } /*htmlgetpagetable*/ + #endif + static boolean htmlgetprefstable (hdlhashtable *huserprefs) { *************** *** 1281,1284 **** --- 1256,1261 ---- + #if 0 + static boolean isPunctuationChar (char ch) { *************** *** 1293,1296 **** --- 1270,1275 ---- return (false); } /*isPunctuationChar*/ + + #endif *************** *** 2103,2108 **** } ! /* 4.1b12 dmb: these don't have html charactors equivalents, but we can do the mapping in the open-architecture isofilter ! case 'Õ': case 'Ô': (*h) [i] = '\''; --- 2082,2087 ---- } ! /* 4.1b12 dmb: these don't have html charactors equivalents, but we can do the mapping in the open-architecture isofilter */ ! /* case 'Õ': case 'Ô': (*h) [i] = '\''; *************** *** 2143,2149 **** break; ! ! /* 4.1b5 dmb: all of the following are html charactors and have iso8859 mappings ! case 'Ê': // a funny space that Word produces (*h) [i] = ' '; --- 2122,2128 ---- break; ! */ ! /* 4.1b5 dmb: all of the following are html charactors and have iso8859 mappings */ ! /* case 'Ê': // a funny space that Word produces (*h) [i] = ' '; *************** *** 2217,2221 **** Handle h = (*s).data; unsigned long remainingchars; - unsigned long pgfcount = 0; char ch; boolean flinsidetag = false; --- 2196,2199 ---- *************** *** 2756,2760 **** Handle htext, hreturnedtext = nil, hfieldname, hfieldvalue; hdllistrecord list = nil; ! short fieldnum = 1, ixlist = 1; long lenfield, lenfieldname; --- 2734,2738 ---- Handle htext, hreturnedtext = nil, hfieldname, hfieldvalue; hdllistrecord list = nil; ! short fieldnum = 1; long lenfield, lenfieldname; *************** *** 3484,3488 **** ! /* static boolean refglossaryverb (hdltreenode hp1, tyvaluerecord *v) { --- 3462,3467 ---- ! #if 0 ! static boolean refglossaryverb (hdltreenode hp1, tyvaluerecord *v) { *************** *** 3496,3500 **** */ ! /*typrocessmacrosinfo pageinfo; Handle href, hresult; bigstring errorstring; --- 3475,3479 ---- */ ! typrocessmacrosinfo pageinfo; Handle href, hresult; bigstring errorstring; *************** *** 3509,3512 **** --- 3488,3493 ---- } /*refglossaryverb*/ + #endif + #ifdef MACVERSION *************** *** 3537,3587 **** ! /* static boolean getonedirectiveverb (hdltreenode hp1, tyvaluerecord *v) { /* ! on getOneDirective (directiveName, s) { Çnew in 4.0.1 ! ÇRevised for ContentServer. ! ÇFriday, March 13, 1998 at 9:47:37 PM by PBS ! ÇNow case-insensitive. ! ÇRespects directivesOnlyAtBeginning pref. ! ÇOld code ! Çlocal (ix = string.patternMatch (string.lower (directivename), string.lower (s))) ! Çif ix > 0 ! Çs = string.delete (s, 1, ix + sizeof (directivename)) ! Çs = string.delete (s, string.patternmatch (cr, s), infinity) ! Çreturn (evaluate (s)) ! Çelse ! Çreturn ("") ! local (value = ""); ! local (flDirectivesOnlyAtBeginning = html.getPref ("directivesOnlyAtBeginning")); ! if typeOf (s) == outlineType { ! flDirectivesOnlyAtBeginning = false}; ! table.assign (@s, string.replaceAll (string (s), "\n", "")); ! if directiveName beginsWith "#" { //pop off leading # character ! directiveName = string.mid (directiveName, 2, infinity)}; ! loop { //loop through directives ! if sizeof (s) == 0 { ! break}; ! local (line = string.nthField (s, "\r", 1)); ! if line beginsWith "#" { ! local (name); ! name = string.nthField (line, ' ', 1); //get the name of the directive ! name = string.mid (name, 2, infinity); //pop off leading # character ! if string.lower (name) == string.lower (directiveName) { //is this the directive asked for? ! local (ix = string.patternMatch (" ", line)); ! value = string.mid (line, ix + 1, infinity); ! return (evaluate (value))}} ! else { ! if flDirectivesOnlyAtBeginning { break}}; ! s = string.delete (s, 1, sizeof (line) + 1); ! if sizeOf (s) < 3 { ! break}}; ! return (value)} ! * / } /*getonedirectiveverb*/ static boolean htmlrundirective (typrocessmacrosinfo *pmi, Handle s, bigstring fieldname) { --- 3518,3571 ---- ! #if 0 ! static boolean getonedirectiveverb (hdltreenode hp1, tyvaluerecord *v) { /* ! on getOneDirective (directiveName, s) { Çnew in 4.0.1 ! ÇRevised for ContentServer. ! ÇFriday, March 13, 1998 at 9:47:37 PM by PBS ! ÇNow case-insensitive. ! ÇRespects directivesOnlyAtBeginning pref. ! ÇOld code ! Çlocal (ix = string.patternMatch (string.lower (directivename), string.lower (s))) ! Çif ix > 0 ! Çs = string.delete (s, 1, ix + sizeof (directivename)) ! Çs = string.delete (s, string.patternmatch (cr, s), infinity) ! Çreturn (evaluate (s)) ! Çelse ! Çreturn ("") ! local (value = ""); ! local (flDirectivesOnlyAtBeginning = html.getPref ("directivesOnlyAtBeginning")); ! if typeOf (s) == outlineType { ! flDirectivesOnlyAtBeginning = false}; ! table.assign (@s, string.replaceAll (string (s), "\n", "")); ! if directiveName beginsWith "#" { //pop off leading # character ! directiveName = string.mid (directiveName, 2, infinity)}; ! loop { //loop through directives ! if sizeof (s) == 0 { ! break}; ! local (line = string.nthField (s, "\r", 1)); ! if line beginsWith "#" { ! local (name); ! name = string.nthField (line, ' ', 1); //get the name of the directive ! name = string.mid (name, 2, infinity); //pop off leading # character ! if string.lower (name) == string.lower (directiveName) { //is this the directive asked for? ! local (ix = string.patternMatch (" ", line)); ! value = string.mid (line, ix + 1, infinity); ! return (evaluate (value))}} ! else { ! if flDirectivesOnlyAtBeginning { ! break}}; ! s = string.delete (s, 1, sizeof (line) + 1); ! if sizeOf (s) < 3 { break}}; ! return (value)} ! */ } /*getonedirectiveverb*/ + #endif + static boolean htmlrundirective (typrocessmacrosinfo *pmi, Handle s, bigstring fieldname) { *************** *** 3978,4036 **** ! /*static boolean normalizenameverb (hdltreenode hp1, tyvaluerecord *v) { /* ! on normalizeName (name, pageTable=nil, adrObject=nil) { ! Ç2/12/98 at 3:26:44 PM by PBS ! ÇSupport for normalizing folder names. ! ÇURL-encode returned name. ! ÇSupport for normalizing a name that isn't the page being generated. ! Ç4/13/98 PBS ! ÇThere are three contexts in which this operates: ! Ç1) Normalizing a name of a new page that has no prefs. ! Ç2) Normalizing a name based on the prefs of the page being rendered. ! Ç3) Normalizing a name based on the prefs of a remote page. ! ! local (flDropNonAlphas, flLowerCaseFileNames); ! local (maxLength); ! local (extension = ""); ! local (flFolder = false); ! ! if pageTable == nil and adrObject == nil { //it's a new page without prefs ! flDropNonAlphas = html.getPref ("dropNonAlphas"); ! flLowerCaseFileNames = html.getPref ("lowerCaseFileNames"); ! maxLength = number (html.getPref ("maxFileNameLength")); ! extension = html.getPref ("fileExtension")} ! else { //it's an existing page with prefs ! if pageTable == nil { ! pageTable = @websites.["#data"]}; ! if adrObject == nil { ! adrObject = pageTable^.adrObject}; ! if adrObject == pageTable^.adrObject { //it's the current page ! flDropNonAlphas = html.getPref ("dropNonAlphas", pageTable); ! flLowerCaseFileNames = html.getPref ("lowerCaseFileNames", pageTable); ! maxLength = number (html.getPref ("maxFileNameLength", pageTable)); ! extension = html.getPref ("fileExtension", pageTable)} ! else { //it's a remote page ! flDropNonAlphas = html.getPagePref ("dropNonAlphas", adrObject, pageTable); ! flLowerCaseFileNames = html.getPagePref ("lowerCaseFileNames", adrObject, pageTable); ! maxLength = number (html.getPagePref ("maxFileNameLength", adrObject, pageTable)); ! extension = html.getPagePref ("fileExtension", adrObject, pageTable)}; ! if typeOf (adrObject^) == tableType { ! flFolder = true}}; - if flDropNonAlphas { - name = string.dropNonAlphas (name)}; - if flLowerCaseFileNames { - name = string.lower (name)}; - if flFolder { - extension = ""}; - maxLength = maxLength - sizeOf (extension); - if sizeof (name) > maxLength { - name = string.mid (name, 1, maxLength)}; - return (name)} - * / } /*normalizenameverb*/ static boolean glossarypatcherverb (hdltreenode hp1, tyvaluerecord *v) { --- 3962,4025 ---- ! #if 0 ! ! static boolean normalizenameverb (hdltreenode hp1, tyvaluerecord *v) { /* ! on normalizeName (name, pageTable=nil, adrObject=nil) { ! Ç2/12/98 at 3:26:44 PM by PBS ! ÇSupport for normalizing folder names. ! ÇURL-encode returned name. ! ÇSupport for normalizing a name that isn't the page being generated. ! Ç4/13/98 PBS ! ÇThere are three contexts in which this operates: ! Ç1) Normalizing a name of a new page that has no prefs. ! Ç2) Normalizing a name based on the prefs of the page being rendered. ! Ç3) Normalizing a name based on the prefs of a remote page. ! ! local (flDropNonAlphas, flLowerCaseFileNames); ! local (maxLength); ! local (extension = ""); ! local (flFolder = false); ! ! if pageTable == nil and adrObject == nil { //it's a new page without prefs ! flDropNonAlphas = html.getPref ("dropNonAlphas"); ! flLowerCaseFileNames = html.getPref ("lowerCaseFileNames"); ! maxLength = number (html.getPref ("maxFileNameLength")); ! extension = html.getPref ("fileExtension")} ! else { //it's an existing page with prefs ! if pageTable == nil { ! pageTable = @websites.["#data"]}; ! if adrObject == nil { ! adrObject = pageTable^.adrObject}; ! if adrObject == pageTable^.adrObject { //it's the current page ! flDropNonAlphas = html.getPref ("dropNonAlphas", pageTable); ! flLowerCaseFileNames = html.getPref ("lowerCaseFileNames", pageTable); ! maxLength = number (html.getPref ("maxFileNameLength", pageTable)); ! extension = html.getPref ("fileExtension", pageTable)} ! else { //it's a remote page ! flDropNonAlphas = html.getPagePref ("dropNonAlphas", adrObject, pageTable); ! flLowerCaseFileNames = html.getPagePref ("lowerCaseFileNames", adrObject, pageTable); ! maxLength = number (html.getPagePref ("maxFileNameLength", adrObject, pageTable)); ! extension = html.getPagePref ("fileExtension", adrObject, pageTable)}; ! if typeOf (adrObject^) == tableType { ! flFolder = true}}; ! ! if flDropNonAlphas { ! name = string.dropNonAlphas (name)}; ! if flLowerCaseFileNames { ! name = string.lower (name)}; ! if flFolder { ! extension = ""}; ! maxLength = maxLength - sizeOf (extension); ! if sizeof (name) > maxLength { ! name = string.mid (name, 1, maxLength)}; ! return (name)} ! */ } /*normalizenameverb*/ + #endif + static boolean glossarypatcherverb (hdltreenode hp1, tyvaluerecord *v) { *************** *** 5078,5082 **** hdltreenode hscriptcode; tyvaluerecord vhandler; - Handle hthread = nil; hdlhashnode handlernode; --- 5067,5070 ---- *************** *** 5900,5903 **** --- 5888,5893 ---- */ + #if 0 + static boolean webservergetpref (bigstring bsprefname, tyvaluerecord *vreturn) { *************** *** 5933,5937 **** return (true); } /*webservergetpref*/ ! --- 5923,5928 ---- return (true); } /*webservergetpref*/ ! ! #endif *************** *** 6104,6108 **** if (coercetoboolean (&v) && v.data.flvalue) { /* found it */ ! /*gethashkey (hnode, bs); /*7.0.1 PBS: commented out. We may have resolved one or more addresses.*/ copystring (bskey, bs); /*7.0.1 PBS: use the key we got before resolving addresses.*/ --- 6095,6099 ---- if (coercetoboolean (&v) && v.data.flvalue) { /* found it */ ! //gethashkey (hnode, bs); /*7.0.1 PBS: commented out. We may have resolved one or more addresses.*/ copystring (bskey, bs); /*7.0.1 PBS: use the key we got before resolving addresses.*/ *************** *** 6703,6709 **** /* Check for Expect header -- we may not be able to live up to the client's expectations */ ! /* if (hashtablesymbolexists (hheaderstable, STR_P_EXPECT)) { /*PBS 7.0b43: handle before reading body*/ ! /* *errorcode = 417; flresult = true; --- 6694,6700 ---- /* Check for Expect header -- we may not be able to live up to the client's expectations */ ! /* if (hashtablesymbolexists (hheaderstable, STR_P_EXPECT)) { /% PBS 7.0b43: handle before reading body %/ ! *errorcode = 417; flresult = true; *************** *** 7201,7205 **** hdlhashtable hparenttable, hlogtable; - hdllistrecord hparamlist = nil; tyvaluerecord vlogtable; bigstring bstablename; --- 7192,7195 ---- *************** *** 7717,7723 **** ! static boolean findfirstnumericnodevisit (bigstring bsname, hdlhashnode nomad, tyvaluerecord val, hdlhashnode *hnode) { ! if (isallnumeric (bsname)) { *hnode = nomad; --- 7707,7715 ---- ! static boolean findfirstnumericnodevisit (bigstring bsname, hdlhashnode nomad, tyvaluerecord val, ptrvoid refcon) { ! if (isallnumeric (bsname)) { + + hdlhashnode *hnode = (hdlhashnode *) refcon; *hnode = nomad; *************** *** 7854,7862 **** */ ! static boolean findlastnumericnodevisit (bigstring bsname, hdlhashnode nomad, tyvaluerecord val, hdlhashnode *hnode) { - if (isallnumeric (bsname)) *hnode = nomad; ! return (false); }/*findlastnumericnodevisit*/ --- 7846,7858 ---- */ ! static boolean findlastnumericnodevisit (bigstring bsname, hdlhashnode nomad, tyvaluerecord val, ptrvoid refcon) { ! ! if (isallnumeric (bsname)) { ! ! hdlhashnode *hnode = (hdlhashnode *) refcon; *hnode = nomad; ! } ! return (false); }/*findlastnumericnodevisit*/ *************** *** 8436,8439 **** --- 8432,8437 ---- #define columntodayofweek(i,f) ((((i) + ((f) - 1) - 1) % 7) + 1) + #if 0 + static boolean addhandle (handlestream *s, Handle h, short cttabs) { *************** *** 8473,8476 **** --- 8471,8476 ---- }/*addstring*/ + #endif + static boolean addclassattribute (handlestream *s, Handle hcssprefix, bigstring bsname) { *************** *** 8535,8539 **** Handle hlink= nil; - Handle hurl = nil; bigstring daystring; bigstring paddeddaystring; --- 8535,8538 ---- *************** *** 9424,9429 **** static boolean issafeunaryop (hdltreenode hnode, hdlhashtable hmacrostable); - static boolean issafebracketop (hdltreenode hnode, hdlhashtable hmacrostable); - static boolean issafearrayop (hdltreenode hnode, hdlhashtable hmacrostable); --- 9423,9426 ---- *************** *** 9818,9824 **** case noop: return (true); /*noop's are very agreeable*/ }/*switch*/ - return (false); }/*issafestatement*/ --- 9815,9823 ---- case noop: return (true); /*noop's are very agreeable*/ + + default: + return (false); }/*switch*/ }/*issafestatement*/ *************** *** 10578,10582 **** case webserverdispatchfunc: { tyaddress adrparamtable; - Handle hrequest = nil; flnextparamislast = true; --- 10577,10580 ---- |