rse 99/06/02 00:15:06
Modified: src/lib/expat-lite xmlparse.c xmltok.c xmltok.h xmltok_impl.c Log: Various cleanups to the unclean expat sources to make them at least compile without warnings... Revision Changes Path 1.2 +13 -7 apache-1.3/src/lib/expat-lite/xmlparse.c Index: xmlparse.c =================================================================== RCS file: /home/cvs/apache-1.3/src/lib/expat-lite/xmlparse.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- xmlparse.c 1999/05/31 10:56:25 1.1 +++ xmlparse.c 1999/06/02 07:15:03 1.2 @@ -190,7 +190,9 @@ static Processor contentProcessor; static Processor cdataSectionProcessor; static Processor epilogProcessor; +#if 0 static Processor errorProcessor; +#endif static Processor externalEntityInitProcessor; static Processor externalEntityInitProcessor2; static Processor externalEntityInitProcessor3; @@ -1615,17 +1617,17 @@ if (id->prefix->binding) { int j; const BINDING *b = id->prefix->binding; - const XML_Char *s = appAtts[i]; + const XML_Char *ss = appAtts[i]; for (j = 0; j < b->uriLen; j++) { if (!poolAppendChar(&tempPool, b->uri[j])) return XML_ERROR_NO_MEMORY; } - while (*s++ != ':') + while (*ss++ != ':') ; do { - if (!poolAppendChar(&tempPool, *s)) + if (!poolAppendChar(&tempPool, *ss)) return XML_ERROR_NO_MEMORY; - } while (*s++); + } while (*ss++); appAtts[i] = poolStart(&tempPool); poolFinish(&tempPool); } @@ -1895,14 +1897,14 @@ } else if (encodingName) { enum XML_Error result; - const XML_Char *s = poolStoreString(&tempPool, + const XML_Char *ss = poolStoreString(&tempPool, encoding, encodingName, encodingName + XmlNameLength(encoding, encodingName)); - if (!s) + if (!ss) return XML_ERROR_NO_MEMORY; - result = handleUnknownEncoding(parser, s); + result = handleUnknownEncoding(parser, ss); poolDiscard(&tempPool); if (result == XML_ERROR_UNKNOWN_ENCODING) eventPtr = encodingName; @@ -2333,6 +2335,7 @@ } } +#if 0 static enum XML_Error errorProcessor(XML_Parser parser, const char *s, @@ -2341,6 +2344,7 @@ { return errorCode; } +#endif static enum XML_Error storeAttributeValue(XML_Parser parser, const ENCODING *enc, int isCdata, @@ -2483,7 +2487,9 @@ const char *entityTextPtr, const char *entityTextEnd) { +#if 0 const ENCODING *internalEnc = ns ? XmlGetInternalEncodingNS() : XmlGetInternalEncoding(); +#endif STRING_POOL *pool = &(dtd.pool); entityTextPtr += encoding->minBytesPerChar; entityTextEnd -= encoding->minBytesPerChar; 1.2 +2 -2 apache-1.3/src/lib/expat-lite/xmltok.c Index: xmltok.c =================================================================== RCS file: /home/cvs/apache-1.3/src/lib/expat-lite/xmltok.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- xmltok.c 1999/05/31 10:56:25 1.1 +++ xmltok.c 1999/06/02 07:15:04 1.2 @@ -1168,7 +1168,7 @@ char utf8[256][4]; }; -int XmlSizeOfUnknownEncoding() +int XmlSizeOfUnknownEncoding(void) { return sizeof(struct unknown_encoding); } @@ -1491,7 +1491,7 @@ break; } } - *encPtr = encodingTable[INIT_ENC_INDEX(enc)]; + *encPtr = encodingTable[(int)INIT_ENC_INDEX(enc)]; return XmlTok(*encPtr, state, ptr, end, nextTokPtr); } 1.2 +1 -0 apache-1.3/src/lib/expat-lite/xmltok.h Index: xmltok.h =================================================================== RCS file: /home/cvs/apache-1.3/src/lib/expat-lite/xmltok.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- xmltok.h 1999/05/31 10:56:26 1.1 +++ xmltok.h 1999/06/02 07:15:04 1.2 @@ -275,6 +275,7 @@ const ENCODING XMLTOKAPI *XmlGetUtf16InternalEncoding(); int XMLTOKAPI XmlUtf8Encode(int charNumber, char *buf); int XMLTOKAPI XmlUtf16Encode(int charNumber, unsigned short *buf); +int XmlSizeOfUnknownEncoding(void); int XMLTOKAPI XmlSizeOfUnknownEncoding(); ENCODING XMLTOKAPI * 1.2 +1 -1 apache-1.3/src/lib/expat-lite/xmltok_impl.c Index: xmltok_impl.c =================================================================== RCS file: /home/cvs/apache-1.3/src/lib/expat-lite/xmltok_impl.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- xmltok_impl.c 1999/05/31 10:56:26 1.1 +++ xmltok_impl.c 1999/06/02 07:15:04 1.2 @@ -1391,7 +1391,7 @@ { enum { other, inName, inValue } state = inName; int nAtts = 0; - int open; + int open = 0; for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) { switch (BYTE_TYPE(enc, ptr)) {