]> 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 6d70858a17fd747ceda1ccfd5cc5c05bba72871f..82bbdce2c0cbca26d188fdc4581697ad473cff27 100644 (file)
@@ -6,12 +6,12 @@
 //
 //========================================================================
 
-#ifdef __GNUC__
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
 #pragma implementation
 #endif
 
-#include <aconf.h>
-#include <locale.h>
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
@@ -1072,11 +1072,7 @@ GBool PostScriptFunction::parseCode(Stream *str, int *codePtr) {
       resizeCode(*codePtr);
       if (isReal) {
        code[*codePtr].type = psReal;
-        {
-          char *theLocale = setlocale(LC_NUMERIC, "C");
-          code[*codePtr].real = atof(tok->getCString());
-          setlocale(LC_NUMERIC, theLocale);
-        }
+       code[*codePtr].real = atof(tok->getCString());
       } else {
        code[*codePtr].type = psInt;
        code[*codePtr].intg = atoi(tok->getCString());
@@ -1100,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");