]> granicus.if.org Git - libexpat/commitdiff
Fixed compile errors when XML_DTD and XML_CONTEXT_BYTES
authorKarl Waclawek <kwaclaw@users.sourceforge.net>
Thu, 29 Apr 2004 17:53:34 +0000 (17:53 +0000)
committerKarl Waclawek <kwaclaw@users.sourceforge.net>
Thu, 29 Apr 2004 17:53:34 +0000 (17:53 +0000)
were undefined.

expat/lib/xmlparse.c

index 6b783839d8c3ecebe42275fcd8a703539444abc7..1d3b900425c78f7f785809c5b7b909a9d147ab1a 100644 (file)
@@ -1466,10 +1466,10 @@ XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
   else if (bufferPtr == bufferEnd) {
     const char *end;
     int nLeftOver;
+    enum XML_Error result;
     parseEndByteIndex += len;
     positionPtr = s;
     finalBuffer = (XML_Bool)isFinal;
-    enum XML_Error result;
 
     errorCode = processor(parser, s, parseEndPtr = s + len, &end);
 
@@ -1483,7 +1483,8 @@ XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
       case XML_SUSPENDED:
         result = XML_STATUS_SUSPENDED;
         break;
-      case XML_INITIALIZED, XML_PARSING:
+      case XML_INITIALIZED:
+      case XML_PARSING:
         result = XML_STATUS_OK;
         if (isFinal) {
           parsing = XML_FINISHED;
@@ -1679,10 +1680,12 @@ XML_StopParser(XML_Parser parser, XML_Bool resumable)
     return XML_STATUS_ERROR;
   default:
     if (resumable) {
+#ifdef XML_DTD
       if (isParamEntity) {
         errorCode = XML_ERROR_SUSPEND_PE;
         return XML_STATUS_ERROR;
       }
+#endif
       parsing = XML_SUSPENDED;
     }
     else