]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/xpdf/Function.cc
Import of Xpdf 2.00 for merge
[evince.git] / pdf / xpdf / Function.cc
index 64ea60c1902e6bbbcc8b7e3e3b0ef21ceb993fa6..82bbdce2c0cbca26d188fdc4581697ad473cff27 100644 (file)
@@ -6,11 +6,12 @@
 //
 //========================================================================
 
-#ifdef __GNUC__
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
 #pragma implementation
 #endif
 
-#include <aconf.h>
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
@@ -1095,14 +1096,14 @@ GBool PostScriptFunction::parseCode(Stream *str, int *codePtr) {
        if (!parseCode(str, codePtr)) {
          return gFalse;
        }
+       delete tok;
+       if (!(tok = getToken(str))) {
+         error(-1, "Unexpected end of PostScript function stream");
+         return gFalse;
+       }
       } else {
        elsePtr = -1;
       }
-      delete tok;
-      if (!(tok = getToken(str))) {
-       error(-1, "Unexpected end of PostScript function stream");
-       return gFalse;
-      }
       if (!tok->cmp("if")) {
        if (elsePtr >= 0) {
          error(-1, "Got 'if' operator with two blocks in PostScript function");