/*
- 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.
#define MaxMultibyteCodes 6
+extern MagickPrivate MagickBooleanType
+ IsGlob(const char *);
+
typedef struct
{
int
static inline unsigned char *ConvertLatin1ToUTF8(const unsigned char *content)
{
+ int
+ c;
+
register const unsigned char
*p;
unsigned char
*utf8;
- unsigned int
- c;
-
length=0;
for (p=content; *p != '\0'; p++)
length+=(*p & 0x80) != 0 ? 2 : 1;
{
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';