upgrade to xpdf 3.00.
[swftools.git] / pdf2swf / xpdf / UnicodeMap.h
index 274c447..6fd4ed2 100644 (file)
@@ -4,20 +4,26 @@
 //
 // Mapping from Unicode to an encoding.
 //
-// Copyright 2001-2002 Glyph & Cog, LLC
+// Copyright 2001-2003 Glyph & Cog, LLC
 //
 //========================================================================
 
 #ifndef UNICODEMAP_H
 #define UNICODEMAP_H
 
-#ifdef __GNUC__
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
 #pragma interface
 #endif
 
 #include "gtypes.h"
 #include "CharTypes.h"
 
+#if MULTITHREADED
+#include "GMutex.h"
+#endif
+
 class GString;
 
 //------------------------------------------------------------------------
@@ -47,12 +53,13 @@ public:
   static UnicodeMap *parse(GString *encodingNameA);
 
   // Create a resident UnicodeMap.
-  UnicodeMap(char *encodingNameA,
+  UnicodeMap(char *encodingNameA, GBool unicodeOutA,
             UnicodeMapRange *rangesA, int lenA);
 
   // Create a resident UnicodeMap that uses a function instead of a
   // list of ranges.
-  UnicodeMap(char *encodingNameA, UnicodeMapFunc funcA);
+  UnicodeMap(char *encodingNameA, GBool unicodeOutA,
+            UnicodeMapFunc funcA);
 
   ~UnicodeMap();
 
@@ -61,6 +68,8 @@ public:
 
   GString *getEncodingName() { return encodingName; }
 
+  GBool isUnicode() { return unicodeOut; }
+
   // Return true if this UnicodeMap matches the specified
   // <encodingNameA>.
   GBool match(GString *encodingNameA);
@@ -77,6 +86,7 @@ private:
 
   GString *encodingName;
   UnicodeMapKind kind;
+  GBool unicodeOut;
   union {
     UnicodeMapRange *ranges;   // (user, resident)
     UnicodeMapFunc func;       // (func)
@@ -85,6 +95,9 @@ private:
   UnicodeMapExt *eMaps;                // (user)
   int eMapsLen;                        // (user)
   int refCnt;
+#ifdef MULTITHREADED
+  GMutex mutex;
+#endif
 };
 
 //------------------------------------------------------------------------