]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/xpdf/CharCodeToUnicode.cc
Import of Xpdf 2.02 for merge
[evince.git] / pdf / xpdf / CharCodeToUnicode.cc
index 912981e99e96f6562ad9a53c77aef56e043457a5..e2fecbc04d87b55a959bf7350f19561411ea3d9b 100644 (file)
@@ -6,11 +6,12 @@
 //
 //========================================================================
 
-#ifdef __GNUC__
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
 #pragma implementation
 #endif
 
-#include <aconf.h>
 #include <stdio.h>
 #include <string.h>
 #include "gmem.h"
@@ -85,6 +86,7 @@ CharCodeToUnicode *CharCodeToUnicode::parseCIDToUnicode(GString *collectionA) {
     }
     ++mapLenA;
   }
+  fclose(f);
 
   ctu = new CharCodeToUnicode(collectionA->copy(), mapA, mapLenA, gTrue,
                              NULL, 0);
@@ -222,7 +224,7 @@ void CharCodeToUnicode::parseCMap1(int (*getCharFunc)(void *), void *data,
            map[i] = 0;
          }
        }
-       if (n3 == 6) {
+       if (n3 <= 6) {
          if (sscanf(tok3 + 1, "%x", &u) != 1) {
            error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
            continue;