Declare type map.
*/
static const char
- *TypeMap = (const char *)
+ TypeMap[] =
"<?xml version=\"1.0\"?>"
"<typemap>"
" <type stealth=\"True\" name=\"fixed\" family=\"helvetica\"/>"
typedef struct _Fontmap
{
const char
- *name,
- *substitute;
+ name[17],
+ substitute[10];
} Fontmap;
const TypeInfo
{ "news gothic", "helvetica" },
{ "system", "courier" },
{ "terminal", "courier" },
- { "wingdings", "symbol" },
- { NULL, NULL }
+ { "wingdings", "symbol" }
};
size_t
/*
Check for table-based substitution match.
*/
- for (i=0; fontmap[i].name != (char *) NULL; i++)
+ for (i=0; i < (sizeof(fontmap)/sizeof(fontmap[0])); i++)
{
if (family == (const char *) NULL)
{
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,"<<\n");
if (LocaleCompare(image_info->magick,"PDFA") == 0)
- (void) FormatLocaleString(buffer,MagickPathExtent,"/Title (%s)\n",
- EscapeParenthesis(basename));
+ {
+ escape=EscapeParenthesis(basename);
+ (void) FormatLocaleString(buffer,MagickPathExtent,"/Title (%s)\n",
+ escape);
+ escape=DestroyString(escape);
+ }
else
{
wchar_t
%
*/
-static const unsigned char *ExpandBuffer(const unsigned char *magick_restrict pixels,
- const unsigned int bits_per_pixel,MagickSizeType *bytes_per_line)
+static const unsigned char *UnpackScanline(
+ const unsigned char *magick_restrict pixels,const unsigned int bits_per_pixel,
+ unsigned char *scanline,MagickSizeType *bytes_per_line)
{
register const unsigned char
*p;
register unsigned char
*q;
- static unsigned char
- scanline[8*256];
-
p=pixels;
q=scanline;
switch (bits_per_pixel)
unsigned char
*pixels,
- *scanline;
+ *scanline,
+ unpack_buffer[8*256];
/*
Determine pixel buffer size.
status=MagickFalse;
break;
}
- p=ExpandBuffer(scanline,bits_per_pixel,&number_pixels);
+ p=UnpackScanline(scanline,bits_per_pixel,unpack_buffer,&number_pixels);
if ((q+number_pixels) > (pixels+(*extent)))
{
status=MagickFalse;
{
length=(size_t) ((scanline[j] & 0xff)+1);
number_pixels=length*bytes_per_pixel;
- p=ExpandBuffer(scanline+j+1,bits_per_pixel,&number_pixels);
+ p=UnpackScanline(scanline+j+1,bits_per_pixel,unpack_buffer,
+ &number_pixels);
if ((q-pixels+number_pixels) <= *extent)
(void) memcpy(q,p,(size_t) number_pixels);
q+=number_pixels;
{
length=(size_t) (((scanline[j] ^ 0xff) & 0xff)+2);
number_pixels=bytes_per_pixel;
- p=ExpandBuffer(scanline+j+1,bits_per_pixel,&number_pixels);
+ p=UnpackScanline(scanline+j+1,bits_per_pixel,unpack_buffer,
+ &number_pixels);
for (i=0; i < (ssize_t) length; i++)
{
if ((q-pixels+number_pixels) <= *extent)