]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/token-private.h
(no commit message)
[imagemagick] / MagickCore / token-private.h
index 9eb663a14acf8769ee85a06c48e5ea8ebdc8352e..182c1931bfde1b5d11d553e9d958fc1eb2f78f5d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization
+  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization
   dedicated to making software imaging solutions freely available.
 
   You may not use this file except in compliance with the License.
@@ -28,6 +28,9 @@ extern "C" {
 
 #define MaxMultibyteCodes  6
 
+extern MagickPrivate MagickBooleanType
+  IsGlob(const char *);
+
 typedef struct
 {
   int
@@ -50,6 +53,9 @@ static UTFInfo
 
 static inline unsigned char *ConvertLatin1ToUTF8(const unsigned char *content)
 {
+  int
+    c;
+
   register const unsigned char
     *p;
 
@@ -62,9 +68,6 @@ static inline unsigned char *ConvertLatin1ToUTF8(const unsigned char *content)
   unsigned char
     *utf8;
 
-  unsigned int
-    c;
-
   length=0;
   for (p=content; *p != '\0'; p++)
     length+=(*p & 0x80) != 0 ? 2 : 1;
@@ -78,11 +81,11 @@ static inline unsigned char *ConvertLatin1ToUTF8(const unsigned char *content)
   {
     c=(*p);
     if ((c & 0x80) == 0)
-      *q++=c;
+      *q++=(unsigned char) c;
     else
       {
-        *q++=0xc0 | ((c >> 6) & 0x3f);
-        *q++=0x80 | (c & 0x3f);
+        *q++=(unsigned char) (0xc0 | ((c >> 6) & 0x3f));
+        *q++=(unsigned char) (0x80 | (c & 0x3f));
       }
   }
   *q='\0';