Change GetTokenLexeme() to GetNextToken()

This commit is contained in:
Cristy
2016-03-25 19:54:25 -04:00
parent fc0f124930
commit 8bedb4edca
26 changed files with 454 additions and 454 deletions
+7 -7
View File
@@ -577,9 +577,9 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
p=(const char *) content;
for (i=0; (*p != '\0') && (i < 3); i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
switch (i)
{
case 0:
@@ -609,9 +609,9 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
p=(const char *) content;
for (i=0; (*p != '\0') && (i < 3); i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
switch (i)
{
case 0:
@@ -642,9 +642,9 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
p=(const char *) content;
for (i=0; (*p != '\0') && (i < 3); i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
switch (i)
{
case 0:
@@ -679,7 +679,7 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
{
content=GetXMLTreeContent(saturation);
p=(const char *) content;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
color_correction.saturation=StringToDouble(token,(char **) NULL);
}
}
+10 -10
View File
@@ -243,7 +243,7 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
channel_mask=UndefinedChannel;
pixel=0.0;
p=(char *) expression;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
channel_op=ExtractChannelOp;
for (channels=0; *token != '\0'; )
{
@@ -257,7 +257,7 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
{
case ',':
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
break;
}
case '|':
@@ -266,7 +266,7 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
source_image=GetNextImageInList(source_image);
else
source_image=GetFirstImageInList(source_image);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
break;
}
case ';':
@@ -291,7 +291,7 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
}
AppendImageToList(&destination_image,canvas);
destination_image=GetLastImageInList(destination_image);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
channels=0;
destination_channel=RedPixelChannel;
channel_mask=UndefinedChannel;
@@ -310,30 +310,30 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
}
source_channel=(PixelChannel) i;
channel_op=ExtractChannelOp;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == '<')
{
channel_op=ExchangeChannelOp;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
}
if (*token == '=')
{
if (channel_op != ExchangeChannelOp)
channel_op=AssignChannelOp;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
}
if (*token == '>')
{
if (channel_op != ExchangeChannelOp)
channel_op=TransferChannelOp;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
}
switch (channel_op)
{
case AssignChannelOp:
{
pixel=StringToDoubleInterval(token,(double) QuantumRange+1.0);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
break;
}
case ExchangeChannelOp:
@@ -383,7 +383,7 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression,
if (((channels >= 1) || (destination_channel >= 1)) &&
(IsGrayColorspace(destination_image->colorspace) != MagickFalse))
(void) SetImageColorspace(destination_image,sRGBColorspace,exception);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
break;
}
default:
+8 -8
View File
@@ -838,7 +838,7 @@ static MagickBooleanType LoadCoderCache(SplayTreeInfo *coder_cache,
/*
Interpret XML.
*/
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -848,7 +848,7 @@ static MagickBooleanType LoadCoderCache(SplayTreeInfo *coder_cache,
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -857,7 +857,7 @@ static MagickBooleanType LoadCoderCache(SplayTreeInfo *coder_cache,
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -868,10 +868,10 @@ static MagickBooleanType LoadCoderCache(SplayTreeInfo *coder_cache,
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > 200)
@@ -930,11 +930,11 @@ static MagickBooleanType LoadCoderCache(SplayTreeInfo *coder_cache,
coder_info=(CoderInfo *) NULL;
continue;
}
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'M':
+8 -8
View File
@@ -2012,7 +2012,7 @@ static MagickBooleanType LoadColorCache(LinkedListInfo *color_cache,
/*
Interpret XML.
*/
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -2022,7 +2022,7 @@ static MagickBooleanType LoadColorCache(LinkedListInfo *color_cache,
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -2031,7 +2031,7 @@ static MagickBooleanType LoadColorCache(LinkedListInfo *color_cache,
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -2042,10 +2042,10 @@ static MagickBooleanType LoadColorCache(LinkedListInfo *color_cache,
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > 200)
@@ -2103,11 +2103,11 @@ static MagickBooleanType LoadColorCache(LinkedListInfo *color_cache,
color_info=(ColorInfo *) NULL;
continue;
}
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'C':
+8 -8
View File
@@ -1169,7 +1169,7 @@ static MagickBooleanType LoadConfigureCache(LinkedListInfo *configure_cache,
/*
Interpret XML.
*/
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -1179,7 +1179,7 @@ static MagickBooleanType LoadConfigureCache(LinkedListInfo *configure_cache,
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -1188,7 +1188,7 @@ static MagickBooleanType LoadConfigureCache(LinkedListInfo *configure_cache,
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -1199,10 +1199,10 @@ static MagickBooleanType LoadConfigureCache(LinkedListInfo *configure_cache,
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > 200)
@@ -1264,11 +1264,11 @@ static MagickBooleanType LoadConfigureCache(LinkedListInfo *configure_cache,
/*
Parse configure element.
*/
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'N':
+8 -8
View File
@@ -1523,7 +1523,7 @@ static MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
/*
Interpret XML.
*/
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -1533,7 +1533,7 @@ static MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -1542,7 +1542,7 @@ static MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -1553,10 +1553,10 @@ static MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > 200)
@@ -1615,11 +1615,11 @@ static MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
delegate_info=(DelegateInfo *) NULL;
continue;
}
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'C':
+156 -156
View File
@@ -1794,7 +1794,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
/*
Interpret graphic primitive.
*/
GetMagickToken(q,&q,extent,keyword);
GetNextToken(q,&q,extent,keyword);
if (*keyword == '\0')
break;
if (*keyword == '#')
@@ -1819,27 +1819,27 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
{
if (LocaleCompare("affine",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.sx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.rx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.ry=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.sy=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.tx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.ty=StringToDouble(token,(char **) NULL);
break;
}
@@ -1866,7 +1866,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("border-color",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) QueryColorCompliance(token,AllCompliance,
&graphic_context[n]->border_color,exception);
break;
@@ -1882,7 +1882,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
/*
Create clip mask.
*/
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) CloneString(&graphic_context[n]->clip_mask,token);
(void) DrawClipPath(image,graphic_context[n],
graphic_context[n]->clip_mask,exception);
@@ -1893,7 +1893,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
ssize_t
fill_rule;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
fill_rule=ParseCommandOption(MagickFillRuleOptions,MagickFalse,
token);
if (fill_rule == -1)
@@ -1907,7 +1907,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
ssize_t
clip_units;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
clip_units=ParseCommandOption(MagickClipPathOptions,MagickFalse,
token);
if (clip_units == -1)
@@ -1948,7 +1948,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
ssize_t
decorate;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
decorate=ParseCommandOption(MagickDecorateOptions,MagickFalse,
token);
if (decorate == -1)
@@ -1959,7 +1959,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("density",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) CloneString(&graphic_context[n]->density,token);
break;
}
@@ -1968,7 +1968,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
ssize_t
direction;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
direction=ParseCommandOption(MagickDirectionOptions,MagickFalse,
token);
if (direction == -1)
@@ -1990,7 +1990,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("encoding",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) CloneString(&graphic_context[n]->encoding,token);
break;
}
@@ -2002,7 +2002,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
{
if (LocaleCompare("fill",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(pattern,MagickPathExtent,"%s",token);
if (GetImageArtifact(image,pattern) != (const char *) NULL)
(void) DrawPatternPath(image,draw_info,token,
@@ -2029,7 +2029,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("fill-opacity",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
graphic_context[n]->fill.alpha=(double) QuantumRange*
factor*StringToDouble(token,(char **) NULL);
@@ -2040,7 +2040,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
ssize_t
fill_rule;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
fill_rule=ParseCommandOption(MagickFillRuleOptions,MagickFalse,
token);
if (fill_rule == -1)
@@ -2051,7 +2051,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("font",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) CloneString(&graphic_context[n]->font,token);
if (LocaleCompare("none",token) == 0)
graphic_context[n]->font=(char *)
@@ -2060,13 +2060,13 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("font-family",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) CloneString(&graphic_context[n]->family,token);
break;
}
if (LocaleCompare("font-size",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->pointsize=StringToDouble(token,(char **) NULL);
break;
}
@@ -2075,7 +2075,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
ssize_t
stretch;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
stretch=ParseCommandOption(MagickStretchOptions,MagickFalse,token);
if (stretch == -1)
status=MagickFalse;
@@ -2088,7 +2088,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
ssize_t
style;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
style=ParseCommandOption(MagickStyleOptions,MagickFalse,token);
if (style == -1)
status=MagickFalse;
@@ -2101,7 +2101,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
ssize_t
weight;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
weight=ParseCommandOption(MagickWeightOptions,MagickFalse,
token);
if (weight == -1)
@@ -2117,7 +2117,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
{
if (LocaleCompare("gradient-units",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("gravity",keyword) == 0)
@@ -2125,7 +2125,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
ssize_t
gravity;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
gravity=ParseCommandOption(MagickGravityOptions,MagickFalse,token);
if (gravity == -1)
status=MagickFalse;
@@ -2145,7 +2145,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
compose;
primitive_type=ImagePrimitive;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
compose=ParseCommandOption(MagickComposeOptions,MagickFalse,token);
if (compose == -1)
status=MagickFalse;
@@ -2155,14 +2155,14 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("interline-spacing",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->interline_spacing=StringToDouble(token,
(char **) NULL);
break;
}
if (LocaleCompare("interword-spacing",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->interword_spacing=StringToDouble(token,
(char **) NULL);
break;
@@ -2175,7 +2175,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
{
if (LocaleCompare("kerning",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->kerning=StringToDouble(token,(char **) NULL);
break;
}
@@ -2196,12 +2196,12 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
{
if (LocaleCompare("offset",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("opacity",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
graphic_context[n]->alpha=ClampToQuantum(QuantumRange*(1.0-((1.0-
QuantumScale*graphic_context[n]->alpha)*factor*
@@ -2238,7 +2238,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("pop",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare("clip-path",token) == 0)
break;
if (LocaleCompare("defs",token) == 0)
@@ -2270,27 +2270,27 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("push",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare("clip-path",token) == 0)
{
char
name[MagickPathExtent];
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(name,MagickPathExtent,"%s",token);
for (p=q; *q != '\0'; )
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare(token,"pop") != 0)
continue;
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (LocaleCompare(token,"clip-path") != 0)
continue;
break;
}
(void) CopyMagickString(token,p,(size_t) (q-p-4+1));
(void) SetImageArtifact(image,name,token);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("gradient",token) == 0)
@@ -2303,36 +2303,36 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
SegmentInfo
segment;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) CopyMagickString(name,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) CopyMagickString(type,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
segment.x1=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
segment.y1=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
segment.x2=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
segment.y2=StringToDouble(token,(char **) NULL);
if (LocaleCompare(type,"radial") == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
}
for (p=q; *q != '\0'; )
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare(token,"pop") != 0)
continue;
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (LocaleCompare(token,"gradient") != 0)
continue;
break;
@@ -2361,7 +2361,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
MagickMax(fabs(bounds.y2-bounds.y1+1.0),1.0),
bounds.x1,bounds.y1);
(void) SetImageArtifact(image,key,geometry);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("pattern",token) == 0)
@@ -2373,32 +2373,32 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
RectangleInfo
pattern_bounds;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) CopyMagickString(name,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
pattern_bounds.x=(ssize_t) ceil(StringToDouble(token,
(char **) NULL)-0.5);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
pattern_bounds.y=(ssize_t) ceil(StringToDouble(token,
(char **) NULL)-0.5);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
pattern_bounds.width=(size_t) floor(StringToDouble(token,
(char **) NULL)+0.5);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
pattern_bounds.height=(size_t) floor(StringToDouble(token,
(char **) NULL)+0.5);
for (p=q; *q != '\0'; )
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare(token,"pop") != 0)
continue;
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (LocaleCompare(token,"pattern") != 0)
continue;
break;
@@ -2413,7 +2413,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
(double)pattern_bounds.height,(double)pattern_bounds.x,
(double)pattern_bounds.y);
(void) SetImageArtifact(image,key,geometry);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("graphic-context",token) == 0)
@@ -2450,7 +2450,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("rotate",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
angle=StringToDouble(token,(char **) NULL);
affine.sx=cos(DegreesToRadians(fmod((double) angle,360.0)));
affine.rx=sin(DegreesToRadians(fmod((double) angle,360.0)));
@@ -2471,24 +2471,24 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
{
if (LocaleCompare("scale",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.sx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.sy=StringToDouble(token,(char **) NULL);
break;
}
if (LocaleCompare("skewX",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
angle=StringToDouble(token,(char **) NULL);
affine.ry=sin(DegreesToRadians(angle));
break;
}
if (LocaleCompare("skewY",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
angle=StringToDouble(token,(char **) NULL);
affine.rx=(-tan(DegreesToRadians(angle)/2.0));
break;
@@ -2511,17 +2511,17 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
image->filename);
break;
}
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) QueryColorCompliance(token,AllCompliance,&stop_color,
exception);
stops[number_stops-1].color=stop_color;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
stops[number_stops-1].offset=StringToDouble(token,(char **) NULL);
break;
}
if (LocaleCompare("stroke",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(pattern,MagickPathExtent,"%s",token);
if (GetImageArtifact(image,pattern) != (const char *) NULL)
(void) DrawPatternPath(image,draw_info,token,
@@ -2548,7 +2548,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("stroke-antialias",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->stroke_antialias=
StringToLong(token) != 0 ? MagickTrue : MagickFalse;
break;
@@ -2564,14 +2564,14 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
*r;
r=q;
GetMagickToken(r,&r,extent,token);
GetNextToken(r,&r,extent,token);
if (*token == ',')
GetMagickToken(r,&r,extent,token);
GetNextToken(r,&r,extent,token);
for (x=0; IsPoint(token) != MagickFalse; x++)
{
GetMagickToken(r,&r,extent,token);
GetNextToken(r,&r,extent,token);
if (*token == ',')
GetMagickToken(r,&r,extent,token);
GetNextToken(r,&r,extent,token);
}
graphic_context[n]->dash_pattern=(double *)
AcquireQuantumMemory((size_t) (2UL*x+1UL),
@@ -2585,9 +2585,9 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
for (j=0; j < x; j++)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->dash_pattern[j]=StringToDouble(token,
(char **) NULL);
}
@@ -2598,12 +2598,12 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
graphic_context[n]->dash_pattern[j]=0.0;
break;
}
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("stroke-dashoffset",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->dash_offset=StringToDouble(token,
(char **) NULL);
break;
@@ -2613,7 +2613,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
ssize_t
linecap;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
linecap=ParseCommandOption(MagickLineCapOptions,MagickFalse,token);
if (linecap == -1)
status=MagickFalse;
@@ -2626,7 +2626,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
ssize_t
linejoin;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
linejoin=ParseCommandOption(MagickLineJoinOptions,MagickFalse,
token);
if (linejoin == -1)
@@ -2637,13 +2637,13 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("stroke-miterlimit",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->miterlimit=StringToUnsignedLong(token);
break;
}
if (LocaleCompare("stroke-opacity",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
graphic_context[n]->stroke.alpha=(double) QuantumRange*
factor*StringToDouble(token,(char **) NULL);
@@ -2651,7 +2651,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("stroke-width",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->stroke_width=StringToDouble(token,
(char **) NULL);
break;
@@ -2672,7 +2672,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
ssize_t
align;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
align=ParseCommandOption(MagickAlignOptions,MagickFalse,token);
if (align == -1)
status=MagickFalse;
@@ -2685,7 +2685,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
ssize_t
align;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
align=ParseCommandOption(MagickAlignOptions,MagickFalse,token);
if (align == -1)
status=MagickFalse;
@@ -2695,25 +2695,25 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
}
if (LocaleCompare("text-antialias",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->text_antialias=
StringToLong(token) != 0 ? MagickTrue : MagickFalse;
break;
}
if (LocaleCompare("text-undercolor",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) QueryColorCompliance(token,AllCompliance,
&graphic_context[n]->undercolor,exception);
break;
}
if (LocaleCompare("translate",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.tx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.ty=StringToDouble(token,(char **) NULL);
break;
}
@@ -2725,22 +2725,22 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
{
if (LocaleCompare("viewbox",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->viewbox.x=(ssize_t) ceil(StringToDouble(token,
(char **) NULL)-0.5);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->viewbox.y=(ssize_t) ceil(StringToDouble(token,
(char **) NULL)-0.5);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->viewbox.width=(size_t) floor(StringToDouble(
token,(char **) NULL)+0.5);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
graphic_context[n]->viewbox.height=(size_t) floor(StringToDouble(
token,(char **) NULL)+0.5);
break;
@@ -2805,15 +2805,15 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
*/
if (IsPoint(q) == MagickFalse)
break;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
point.x=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
point.y=StringToDouble(token,(char **) NULL);
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
primitive_info[i].primitive=primitive_type;
primitive_info[i].point=point;
primitive_info[i].coordinates=0;
@@ -2893,7 +2893,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
*s,
*t;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
length=1;
t=token;
for (s=token; *s != '\0'; s=t)
@@ -3070,7 +3070,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
status=MagickFalse;
break;
}
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
method=ParseCommandOption(MagickMethodOptions,MagickFalse,token);
if (method == -1)
status=MagickFalse;
@@ -3086,7 +3086,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
break;
}
if (*token != ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
primitive_info[j].text=AcquireString(token);
break;
}
@@ -3097,7 +3097,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
status=MagickFalse;
break;
}
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
primitive_info[j].text=AcquireString(token);
break;
}
@@ -5389,33 +5389,33 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
*/
do
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
arc.x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
arc.y=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
angle=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
large_arc=StringToLong(token) != 0 ? MagickTrue : MagickFalse;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
sweep=StringToLong(token) != 0 ? MagickTrue : MagickFalse;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,(char **) NULL);
end.x=(double) (attribute == (int) 'A' ? x : point.x+x);
end.y=(double) (attribute == (int) 'A' ? y : point.y+y);
@@ -5440,13 +5440,13 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
points[0]=point;
for (i=1; i < 4; i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,(char **) NULL);
end.x=(double) (attribute == (int) 'C' ? x : point.x+x);
end.y=(double) (attribute == (int) 'C' ? y : point.y+y);
@@ -5465,9 +5465,9 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
{
do
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,(char **) NULL);
point.x=(double) (attribute == (int) 'H' ? x: point.x+x);
TracePoint(q,point);
@@ -5480,13 +5480,13 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
{
do
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,(char **) NULL);
point.x=(double) (attribute == (int) 'L' ? x : point.x+x);
point.y=(double) (attribute == (int) 'L' ? y : point.y+y);
@@ -5507,13 +5507,13 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
i=0;
do
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,(char **) NULL);
point.x=(double) (attribute == (int) 'M' ? x : point.x+x);
point.y=(double) (attribute == (int) 'M' ? y : point.y+y);
@@ -5541,13 +5541,13 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
points[0]=point;
for (i=1; i < 3; i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,(char **) NULL);
if (*p == ',')
p++;
@@ -5576,13 +5576,13 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
points[1].y=2.0*points[3].y-points[2].y;
for (i=2; i < 4; i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,(char **) NULL);
if (*p == ',')
p++;
@@ -5616,13 +5616,13 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
points[1].y=2.0*points[2].y-points[1].y;
for (i=2; i < 3; i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,(char **) NULL);
end.x=(double) (attribute == (int) 'T' ? x : point.x+x);
end.y=(double) (attribute == (int) 'T' ? y : point.y+y);
@@ -5646,9 +5646,9 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
{
do
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,(char **) NULL);
point.y=(double) (attribute == (int) 'V' ? y : point.y+y);
TracePoint(q,point);
+7 -7
View File
@@ -577,9 +577,9 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
p=(const char *) content;
for (i=0; (*p != '\0') && (i < 3); i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
switch (i)
{
case 0:
@@ -609,9 +609,9 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
p=(const char *) content;
for (i=0; (*p != '\0') && (i < 3); i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
switch (i)
{
case 0:
@@ -642,9 +642,9 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
p=(const char *) content;
for (i=0; (*p != '\0') && (i < 3); i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
switch (i)
{
case 0:
@@ -679,7 +679,7 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
{
content=GetXMLTreeContent(saturation);
p=(const char *) content;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
color_correction.saturation=StringToDouble(token,(char **) NULL);
}
}
+2 -2
View File
@@ -747,9 +747,9 @@ MagickExport MagickStatusType ParseAffineGeometry(const char *geometry,
p=(char *) geometry;
for (i=0; (*p != '\0') && (i < 6); i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
switch (i)
{
case 0:
+10 -10
View File
@@ -1197,7 +1197,7 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
/*
Interpret XML.
*/
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickLocaleExtent);
@@ -1208,7 +1208,7 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
while (isspace((int) ((unsigned char) *q)) != 0)
q++;
}
@@ -1221,7 +1221,7 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
while (isspace((int) ((unsigned char) *q)) != 0)
q++;
}
@@ -1235,10 +1235,10 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickLocaleExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"locale") == 0)
{
if (LocaleCompare(locale,token) != 0)
@@ -1285,10 +1285,10 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
while ((*token != '>') && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickLocaleExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
}
continue;
}
@@ -1310,10 +1310,10 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
while ((*token != '>') && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickLocaleExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"name") == 0)
{
(void) ConcatenateMagickString(tag,token,MagickLocaleExtent);
@@ -1372,7 +1372,7 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
(void) ConcatenateMagickString(tag,"/",MagickLocaleExtent);
continue;
}
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
}
+8 -8
View File
@@ -1452,7 +1452,7 @@ static MagickBooleanType LoadLogCache(LinkedListInfo *log_cache,const char *xml,
/*
Interpret XML.
*/
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -1462,7 +1462,7 @@ static MagickBooleanType LoadLogCache(LinkedListInfo *log_cache,const char *xml,
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -1471,7 +1471,7 @@ static MagickBooleanType LoadLogCache(LinkedListInfo *log_cache,const char *xml,
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -1482,10 +1482,10 @@ static MagickBooleanType LoadLogCache(LinkedListInfo *log_cache,const char *xml,
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > 200)
@@ -1542,11 +1542,11 @@ static MagickBooleanType LoadLogCache(LinkedListInfo *log_cache,const char *xml,
log_info=(LogInfo *) NULL;
continue;
}
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'E':
+8 -8
View File
@@ -859,7 +859,7 @@ static MagickBooleanType LoadMagicCache(LinkedListInfo *magic_cache,
/*
Interpret XML.
*/
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -869,7 +869,7 @@ static MagickBooleanType LoadMagicCache(LinkedListInfo *magic_cache,
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -878,7 +878,7 @@ static MagickBooleanType LoadMagicCache(LinkedListInfo *magic_cache,
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -889,10 +889,10 @@ static MagickBooleanType LoadMagicCache(LinkedListInfo *magic_cache,
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > 200)
@@ -951,11 +951,11 @@ static MagickBooleanType LoadMagicCache(LinkedListInfo *magic_cache,
magic_info=(MagicInfo *) NULL;
continue;
}
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'N':
+1 -1
View File
@@ -505,7 +505,7 @@ extern "C" {
#define GetMagickResource PrependMagickMethod(GetMagickResource)
#define GetMagickSeekableStream PrependMagickMethod(GetMagickSeekableStream)
#define GetMagickThreadSupport PrependMagickMethod(GetMagickThreadSupport)
#define GetMagickToken PrependMagickMethod(GetMagickToken)
#define GetNextToken PrependMagickMethod(GetNextToken)
#define GetMagickVersion PrependMagickMethod(GetMagickVersion)
#define GetMagicList PrependMagickMethod(GetMagicList)
#define GetMagicName PrependMagickMethod(GetMagicName)
+7 -7
View File
@@ -298,9 +298,9 @@ static KernelInfo *ParseKernelArray(const char *kernel_string)
p++; /* ignore "'" chars for convolve filter usage - Cristy */
for (i=0; p < end; i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
}
/* set the size of the kernel - old sized square */
kernel->width = kernel->height= (size_t) sqrt((double) i+1.0);
@@ -320,9 +320,9 @@ static KernelInfo *ParseKernelArray(const char *kernel_string)
kernel->negative_range = kernel->positive_range = 0.0;
for (i=0; (i < (ssize_t) (kernel->width*kernel->height)) && (p < end); i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if ( LocaleCompare("nan",token) == 0
|| LocaleCompare("-",token) == 0 ) {
kernel->values[i] = nan; /* this value is not part of neighbourhood */
@@ -338,7 +338,7 @@ static KernelInfo *ParseKernelArray(const char *kernel_string)
}
/* sanity check -- no more values in kernel definition */
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if ( *token != '\0' && *token != ';' && *token != '\'' )
return(DestroyKernelInfo(kernel));
@@ -393,7 +393,7 @@ static KernelInfo *ParseKernelName(const char *kernel_string,
type;
/* Parse special 'named' kernel */
GetMagickToken(kernel_string,&p,MagickPathExtent,token);
GetNextToken(kernel_string,&p,MagickPathExtent,token);
type=ParseCommandOption(MagickKernelOptions,MagickFalse,token);
if ( type < 0 || type == UserDefinedKernel )
return((KernelInfo *) NULL); /* not a valid named kernel */
@@ -509,7 +509,7 @@ MagickExport KernelInfo *AcquireKernelInfo(const char *kernel_string,
p=(const char *) kernel_cache;
}
kernel=NULL;
while (GetMagickToken(p,(const char **) NULL,MagickPathExtent,token), *token != '\0')
while (GetNextToken(p,(const char **) NULL,MagickPathExtent,token), *token != '\0')
{
/* ignore extra or multiple ';' kernel separators */
if (*token != ';')
+1 -1
View File
@@ -423,7 +423,7 @@ MagickExport MagickBooleanType NTAcquireTypeCache(SplayTreeInfo *type_cache,
for (q=value_name; *q != '\0'; )
{
GetMagickToken(q,(const char **) &q,MagickPathExtent,token);
GetNextToken(q,(const char **) &q,MagickPathExtent,token);
if (*token == '\0')
break;
+1 -1
View File
@@ -2758,7 +2758,7 @@ MagickExport ssize_t ParsePixelChannelOption(const char *channels)
ssize_t
channel;
GetMagickToken(channels,(const char **) NULL,MagickPathExtent,token);
GetNextToken(channels,(const char **) NULL,MagickPathExtent,token);
if ((*token == ';') || (*token == '|'))
return(RedPixelChannel);
channel=ParseCommandOption(MagickPixelChannelOptions,MagickTrue,token);
+8 -8
View File
@@ -767,7 +767,7 @@ static MagickBooleanType LoadPolicyCache(LinkedListInfo *policy_cache,
/*
Interpret XML.
*/
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -777,7 +777,7 @@ static MagickBooleanType LoadPolicyCache(LinkedListInfo *policy_cache,
Docdomain element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -786,7 +786,7 @@ static MagickBooleanType LoadPolicyCache(LinkedListInfo *policy_cache,
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -797,10 +797,10 @@ static MagickBooleanType LoadPolicyCache(LinkedListInfo *policy_cache,
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > 200)
@@ -858,11 +858,11 @@ static MagickBooleanType LoadPolicyCache(LinkedListInfo *policy_cache,
policy_info=(PolicyInfo *) NULL;
continue;
}
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'D':
+2 -2
View File
@@ -1346,9 +1346,9 @@ MagickExport MagickBooleanType OrderedDitherImage(Image *image,
if ((p != (char *) NULL) && (isdigit((int) ((unsigned char) *(++p))) != 0))
for (i=0; (*p != '\0') && (i < MaxPixelChannels); i++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
levels[i]=StringToDouble(token,(char **) NULL);
}
for (i=0; i < MaxPixelChannels; i++)
+6 -6
View File
@@ -141,21 +141,21 @@ MagickExport TokenInfo *DestroyTokenInfo(TokenInfo *token_info)
% %
% %
% %
+ G e t M a g i c k T o k e n %
+ G e t N e x t T o k e n %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% GetMagickToken() gets a token from the token stream. A token is defined as
% GetNextToken() gets a lexeme from the token stream. A token is defined as
% a sequence of characters delimited by whitespace (e.g. clip-path), a
% sequence delimited with quotes (.e.g "Quote me"), or a sequence enclosed in
% parenthesis (e.g. rgb(0,0,0)). GetMagickToken() also recognizes these
% parenthesis (e.g. rgb(0,0,0)). GetNextToken() also recognizes these
% separator characters: ':', '=', ',', and ';'.
%
% The format of the GetMagickToken method is:
% The format of the GetNextToken method is:
%
% void GetMagickToken(const char *start,const char **end,
% void GetNextToken(const char *start,const char **end,
% const size_t extent,char *token)
%
% A description of each parameter follows:
@@ -169,7 +169,7 @@ MagickExport TokenInfo *DestroyTokenInfo(TokenInfo *token_info)
% o token: copy the token to this buffer.
%
*/
MagickExport void GetMagickToken(const char *start,const char **end,
MagickExport void GetNextToken(const char *start,const char **end,
const size_t extent,char *token)
{
double
+1 -1
View File
@@ -40,7 +40,7 @@ extern MagickExport TokenInfo
*DestroyTokenInfo(TokenInfo *);
extern MagickExport void
GetMagickToken(const char *,const char **,const size_t,char *);
GetNextToken(const char *,const char **,const size_t,char *);
#if defined(__cplusplus) || defined(c_plusplus)
}
+8 -8
View File
@@ -1112,7 +1112,7 @@ static MagickBooleanType LoadTypeCache(SplayTreeInfo *type_cache,
/*
Interpret XML.
*/
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -1122,7 +1122,7 @@ static MagickBooleanType LoadTypeCache(SplayTreeInfo *type_cache,
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -1131,7 +1131,7 @@ static MagickBooleanType LoadTypeCache(SplayTreeInfo *type_cache,
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -1142,10 +1142,10 @@ static MagickBooleanType LoadTypeCache(SplayTreeInfo *type_cache,
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > 200)
@@ -1207,11 +1207,11 @@ static MagickBooleanType LoadTypeCache(SplayTreeInfo *type_cache,
type_info=(TypeInfo *) NULL;
continue;
}
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,extent,token);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'E':
+1 -1
View File
@@ -2210,7 +2210,7 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
i++;
if (i == (ssize_t) argc)
ThrowConvertException(OptionError,"MissingArgument",option);
GetMagickToken(argv[i],(const char **) NULL,MagickPathExtent,token);
GetNextToken(argv[i],(const char **) NULL,MagickPathExtent,token);
op=ParseCommandOption(MagickMorphologyOptions,MagickFalse,token);
if (op < 0)
ThrowConvertException(OptionError,"UnrecognizedMorphologyMethod",
+6 -6
View File
@@ -6379,14 +6379,14 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
*p;
p=q;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
for (x=0; IsPoint(token) != MagickFalse; x++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
}
CurrentContext->dash_pattern=(double *) AcquireQuantumMemory(
(size_t) (2UL*x)+1UL,sizeof(*CurrentContext->dash_pattern));
@@ -6395,9 +6395,9 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
"MemoryAllocationFailed",wand->name);
for (j=0; j < x; j++)
{
GetMagickToken(q,&q,MagickPathExtent,token);
GetNextToken(q,&q,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(q,&q,MagickPathExtent,token);
GetNextToken(q,&q,MagickPathExtent,token);
CurrentContext->dash_pattern[j]=StringToDouble(token,
(char **) NULL);
}
+28 -28
View File
@@ -489,7 +489,7 @@ static Image *SparseColorOption(const Image *image,
x=0;
while( *p != '\0' )
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == ',' ) continue;
if ( isalpha((int) token[0]) || token[0] == '#' ) {
if ( color_from_image ) {
@@ -536,7 +536,7 @@ static Image *SparseColorOption(const Image *image,
x=0;
while( *p != '\0' && x < number_arguments ) {
/* X coordinate */
token[0]=','; while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
token[0]=','; while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' ) break;
if ( isalpha((int) token[0]) || token[0] == '#' ) {
(void) ThrowMagickException(exception,GetMagickModule(),
@@ -547,7 +547,7 @@ static Image *SparseColorOption(const Image *image,
}
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
/* Y coordinate */
token[0]=','; while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
token[0]=','; while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' ) break;
if ( isalpha((int) token[0]) || token[0] == '#' ) {
(void) ThrowMagickException(exception,GetMagickModule(),
@@ -567,7 +567,7 @@ static Image *SparseColorOption(const Image *image,
#endif
{
/* color name or function given in string argument */
token[0]=','; while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
token[0]=','; while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' ) break;
if ( isalpha((int) token[0]) || token[0] == '#' ) {
/* Color string given */
@@ -590,7 +590,7 @@ static Image *SparseColorOption(const Image *image,
/* NB: token contains the first floating point value to use! */
if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
{
while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
@@ -598,7 +598,7 @@ static Image *SparseColorOption(const Image *image,
}
if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
{
while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
@@ -606,7 +606,7 @@ static Image *SparseColorOption(const Image *image,
}
if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
{
while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
@@ -615,7 +615,7 @@ static Image *SparseColorOption(const Image *image,
if (((GetPixelBlackTraits(image) & UpdatePixelTrait) != 0) &&
(image->colorspace == CMYKColorspace))
{
while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
@@ -624,7 +624,7 @@ static Image *SparseColorOption(const Image *image,
if (((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) &&
(image->alpha_trait != UndefinedPixelTrait))
{
while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
@@ -1404,9 +1404,9 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
p=(char *) args;
for (x=0; *p != '\0'; x++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
}
number_arguments=(size_t) x;
arguments=(double *) AcquireQuantumMemory(number_arguments,
@@ -1419,9 +1419,9 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
p=(char *) args;
for (x=0; (x < (ssize_t) number_arguments) && (*p != '\0'); x++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
arguments[x]=StringToDouble(token,(char **) NULL);
}
args=DestroyString(args);
@@ -1707,9 +1707,9 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
p=(char *) arguments;
for (x=0; *p != '\0'; x++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
}
number_parameters=(size_t) x;
parameters=(double *) AcquireQuantumMemory(number_parameters,
@@ -1722,9 +1722,9 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
p=(char *) arguments;
for (x=0; (x < (ssize_t) number_parameters) && (*p != '\0'); x++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
parameters[x]=StringToDouble(token,(char **) NULL);
}
arguments=DestroyString(arguments);
@@ -1991,7 +1991,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
white_point;
p=(const char *) argv[i+1];
GetMagickToken(p,&p,MagickPathExtent,token); /* get black point color */
GetNextToken(p,&p,MagickPathExtent,token); /* get black point color */
if ((isalpha((int) *token) != 0) || ((*token == '#') != 0))
(void) QueryColorCompliance(token,AllCompliance,
&black_point,exception);
@@ -1999,13 +1999,13 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
(void) QueryColorCompliance("#000000",AllCompliance,
&black_point,exception);
if (isalpha((int) token[0]) || (token[0] == '#'))
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == '\0')
white_point=black_point; /* set everything to that color */
else
{
if ((isalpha((int) *token) == 0) && ((*token == '#') == 0))
GetMagickToken(p,&p,MagickPathExtent,token); /* Get white point color. */
GetNextToken(p,&p,MagickPathExtent,token); /* Get white point color. */
if ((isalpha((int) *token) != 0) || ((*token == '#') != 0))
(void) QueryColorCompliance(token,AllCompliance,
&white_point,exception);
@@ -2237,13 +2237,13 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
*/
(void) SyncImageSettings(mogrify_info,*image,exception);
p=argv[i+1];
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
method=(MorphologyMethod) ParseCommandOption(
MagickMorphologyOptions,MagickFalse,token);
iterations=1L;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if ((*p == ':') || (*p == ','))
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if ((*p != '\0'))
iterations=(ssize_t) StringToLong(p);
kernel=AcquireKernelInfo(argv[i+2],exception);
@@ -5458,7 +5458,7 @@ WandExport MagickBooleanType MogrifyImageCommand(ImageInfo *image_info,
i++;
if (i == (ssize_t) argc)
ThrowMogrifyException(OptionError,"MissingArgument",option);
GetMagickToken(argv[i],(const char **) NULL,MagickPathExtent,token);
GetNextToken(argv[i],(const char **) NULL,MagickPathExtent,token);
op=ParseCommandOption(MagickMorphologyOptions,MagickFalse,token);
if (op < 0)
ThrowMogrifyException(OptionError,"UnrecognizedMorphologyMethod",
@@ -8548,9 +8548,9 @@ WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,
p=(char *) args;
for (x=0; *p != '\0'; x++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
}
number_arguments=(size_t) x;
arguments=(double *) AcquireQuantumMemory(number_arguments,
@@ -8563,9 +8563,9 @@ WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,
p=(char *) args;
for (x=0; (x < (ssize_t) number_arguments) && (*p != '\0'); x++)
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
arguments[x]=StringToDouble(token,(char **) NULL);
}
args=DestroyString(args);
+15 -15
View File
@@ -233,7 +233,7 @@ static Image *SparseColorOption(const Image *image,
x=0;
while( *p != '\0' )
{
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == ',' ) continue;
if ( isalpha((int) token[0]) || token[0] == '#' )
x += number_colors; /* color argument found */
@@ -265,7 +265,7 @@ static Image *SparseColorOption(const Image *image,
x=0;
while( *p != '\0' && x < number_arguments ) {
/* X coordinate */
token[0]=','; while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
token[0]=','; while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' ) break;
if ( isalpha((int) token[0]) || token[0] == '#' ) {
(void) ThrowMagickException(exception,GetMagickModule(),
@@ -276,7 +276,7 @@ static Image *SparseColorOption(const Image *image,
}
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
/* Y coordinate */
token[0]=','; while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
token[0]=','; while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' ) break;
if ( isalpha((int) token[0]) || token[0] == '#' ) {
(void) ThrowMagickException(exception,GetMagickModule(),
@@ -287,7 +287,7 @@ static Image *SparseColorOption(const Image *image,
}
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
/* color name or function given in string argument */
token[0]=','; while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
token[0]=','; while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' ) break;
if ( isalpha((int) token[0]) || token[0] == '#' ) {
/* Color string given */
@@ -311,7 +311,7 @@ static Image *SparseColorOption(const Image *image,
/* NB: token contains the first floating point value to use! */
if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
{
while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
@@ -319,7 +319,7 @@ static Image *SparseColorOption(const Image *image,
}
if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
{
while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
@@ -327,7 +327,7 @@ static Image *SparseColorOption(const Image *image,
}
if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
{
while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
@@ -336,7 +336,7 @@ static Image *SparseColorOption(const Image *image,
if (((GetPixelBlackTraits(image) & UpdatePixelTrait) != 0) &&
(image->colorspace == CMYKColorspace))
{
while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
@@ -345,7 +345,7 @@ static Image *SparseColorOption(const Image *image,
if (((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) &&
image->alpha_trait != UndefinedPixelTrait)
{
while ( token[0] == ',' ) GetMagickToken(p,&p,MagickPathExtent,token);
while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
@@ -2645,7 +2645,7 @@ static MagickBooleanType CLISimpleOperatorImage(MagickCLI *cli_wand,
white_point;
p=(const char *) arg1;
GetMagickToken(p,&p,MagickPathExtent,token); /* get black point color */
GetNextToken(p,&p,MagickPathExtent,token); /* get black point color */
if ((isalpha((int) *token) != 0) || ((*token == '#') != 0))
(void) QueryColorCompliance(token,AllCompliance,
&black_point,_exception);
@@ -2653,13 +2653,13 @@ static MagickBooleanType CLISimpleOperatorImage(MagickCLI *cli_wand,
(void) QueryColorCompliance("#000000",AllCompliance,
&black_point,_exception);
if (isalpha((int) token[0]) || (token[0] == '#'))
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == '\0')
white_point=black_point; /* set everything to that color */
else
{
if ((isalpha((int) *token) == 0) && ((*token == '#') == 0))
GetMagickToken(p,&p,MagickPathExtent,token); /* Get white point color. */
GetNextToken(p,&p,MagickPathExtent,token); /* Get white point color. */
if ((isalpha((int) *token) != 0) || ((*token == '#') != 0))
(void) QueryColorCompliance(token,AllCompliance,
&white_point,_exception);
@@ -2818,15 +2818,15 @@ static MagickBooleanType CLISimpleOperatorImage(MagickCLI *cli_wand,
iterations;
p=arg1;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
parse=ParseCommandOption(MagickMorphologyOptions,MagickFalse,token);
if ( parse < 0 )
CLIWandExceptArgBreak(OptionError,"UnrecognizedFunction",option,
arg1);
iterations=1L;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if ((*p == ':') || (*p == ','))
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if ((*p != '\0'))
iterations=(ssize_t) StringToLong(p);
kernel=AcquireKernelInfo(arg2,exception);
+129 -129
View File
@@ -299,7 +299,7 @@ static double GetUserSpaceCoordinateValue(const SVGInfo *svg_info,int type,
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",string);
assert(string != (const char *) NULL);
p=(const char *) string;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
value=StringToDouble(token,(char **) NULL);
if (strchr(token,'%') != (char *) NULL)
{
@@ -323,7 +323,7 @@ static double GetUserSpaceCoordinateValue(const SVGInfo *svg_info,int type,
beta=value-svg_info->view_box.height;
return(hypot(alpha,beta)/sqrt(2.0)/100.0);
}
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (LocaleNCompare(token,"cm",2) == 0)
return(DefaultResolution*svg_info->scale[0]/2.54*value);
if (LocaleNCompare(token,"em",2) == 0)
@@ -391,7 +391,7 @@ static char **GetStyleTokens(void *context,const char *style,int *number_tokens)
text=DestroyString(text);
for (i=0; tokens[i] != (char *) NULL; i++)
StripStyleTokens(tokens[i]);
*number_tokens=i;
*number_tokens=(int) i;
return(tokens);
}
@@ -1318,27 +1318,27 @@ static void SVGStartElement(void *context,const xmlChar *name,
if (LocaleCompare(keyword,"matrix") == 0)
{
p=(const char *) value;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
affine.sx=StringToDouble(value,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
affine.rx=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
affine.ry=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
affine.sy=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
affine.tx=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
affine.ty=StringToDouble(token,(char **) NULL);
break;
}
@@ -1937,27 +1937,27 @@ static void SVGStartElement(void *context,const xmlChar *name,
if (LocaleCompare(keyword,"matrix") == 0)
{
p=(const char *) value;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
affine.sx=StringToDouble(value,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
affine.rx=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
affine.ry=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
affine.sy=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
affine.tx=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
affine.ty=StringToDouble(token,(char **) NULL);
break;
}
@@ -1974,15 +1974,15 @@ static void SVGStartElement(void *context,const xmlChar *name,
y;
p=(const char *) value;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
angle=StringToDouble(value,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,(char **) NULL);
affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
@@ -2084,22 +2084,22 @@ static void SVGStartElement(void *context,const xmlChar *name,
if (LocaleCompare(keyword,"viewBox") == 0)
{
p=(const char *) value;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
svg_info->view_box.x=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
svg_info->view_box.y=StringToDouble(token,(char **) NULL);
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
svg_info->view_box.width=StringToDouble(token,
(char **) NULL);
if (svg_info->bounds.width == 0)
svg_info->bounds.width=svg_info->view_box.width;
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
GetMagickToken(p,&p,MagickPathExtent,token);
GetNextToken(p,&p,MagickPathExtent,token);
svg_info->view_box.height=StringToDouble(token,
(char **) NULL);
if (svg_info->bounds.height == 0)
@@ -3696,7 +3696,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
/*
Interpret graphic primitive.
*/
GetMagickToken(q,&q,token,keyword);
GetNextToken(q,&q,token,keyword);
if (*keyword == '\0')
break;
if (*keyword == '#')
@@ -3732,27 +3732,27 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
{
if (LocaleCompare("affine",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.sx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.rx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.ry=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.sy=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.tx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.ty=StringToDouble(token,(char **) NULL);
break;
}
@@ -3763,7 +3763,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("angle",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.rx=StringToDouble(token,(char **) NULL);
affine.ry=StringToDouble(token,(char **) NULL);
break;
@@ -3792,7 +3792,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
{
if (LocaleCompare("clip-path",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"clip-path:url(#%s);",token);
(void) WriteBlobString(image,message);
@@ -3800,7 +3800,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("clip-rule",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"clip-rule:%s;",token);
(void) WriteBlobString(image,message);
@@ -3808,7 +3808,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("clip-units",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"clipPathUnits=%s;",token);
(void) WriteBlobString(image,message);
@@ -3832,7 +3832,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
{
if (LocaleCompare("decorate",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"text-decoration:%s;",token);
(void) WriteBlobString(image,message);
@@ -3857,7 +3857,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
{
if (LocaleCompare("fill",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"fill:%s;",
token);
(void) WriteBlobString(image,message);
@@ -3865,7 +3865,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("fill-rule",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"fill-rule:%s;",token);
(void) WriteBlobString(image,message);
@@ -3873,7 +3873,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("fill-alpha",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"fill-alpha:%s;",token);
(void) WriteBlobString(image,message);
@@ -3881,7 +3881,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("font-family",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"font-family:%s;",token);
(void) WriteBlobString(image,message);
@@ -3889,7 +3889,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("font-stretch",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"font-stretch:%s;",token);
(void) WriteBlobString(image,message);
@@ -3897,7 +3897,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("font-style",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"font-style:%s;",token);
(void) WriteBlobString(image,message);
@@ -3905,7 +3905,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("font-size",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"font-size:%s;",token);
(void) WriteBlobString(image,message);
@@ -3913,7 +3913,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("font-weight",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"font-weight:%s;",token);
(void) WriteBlobString(image,message);
@@ -3927,12 +3927,12 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
{
if (LocaleCompare("gradient-units",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("text-align",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"text-align %s ",token);
(void) WriteBlobString(image,message);
@@ -3940,7 +3940,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("text-anchor",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"text-anchor %s ",token);
(void) WriteBlobString(image,message);
@@ -3954,7 +3954,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
{
if (LocaleCompare("image",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
primitive_type=ImagePrimitive;
break;
}
@@ -3977,7 +3977,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
{
if (LocaleCompare("opacity",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"opacity %s ",
token);
(void) WriteBlobString(image,message);
@@ -4011,7 +4011,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("pop",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare("clip-path",token) == 0)
{
(void) WriteBlobString(image,"</clipPath>\n");
@@ -4048,10 +4048,10 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("push",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare("clip-path",token) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"<clipPath id=\"%s\">\n",token);
(void) WriteBlobString(image,message);
@@ -4064,27 +4064,27 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("gradient",token) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) CopyMagickString(name,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) CopyMagickString(type,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
svg_info.segment.x1=StringToDouble(token,(char **) NULL);
svg_info.element.cx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
svg_info.segment.y1=StringToDouble(token,(char **) NULL);
svg_info.element.cy=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
svg_info.segment.x2=StringToDouble(token,(char **) NULL);
svg_info.element.major=StringToDouble(token,
(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
svg_info.segment.y2=StringToDouble(token,(char **) NULL);
svg_info.element.minor=StringToDouble(token,
(char **) NULL);
@@ -4094,9 +4094,9 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
svg_info.segment.y1,svg_info.segment.x2,svg_info.segment.y2);
if (LocaleCompare(type,"radial") == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
svg_info.element.angle=StringToDouble(token,
(char **) NULL);
(void) FormatLocaleString(message,MagickPathExtent,
@@ -4122,22 +4122,22 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("pattern",token) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) CopyMagickString(name,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
svg_info.bounds.x=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
svg_info.bounds.y=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
svg_info.bounds.width=StringToDouble(token,
(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
svg_info.bounds.height=StringToDouble(token,
(char **) NULL);
(void) FormatLocaleString(message,MagickPathExtent,
@@ -4168,7 +4168,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("rotate",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"rotate(%s) ",
token);
(void) WriteBlobString(image,message);
@@ -4182,17 +4182,17 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
{
if (LocaleCompare("scale",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.sx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.sy=StringToDouble(token,(char **) NULL);
break;
}
if (LocaleCompare("skewX",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"skewX(%s) ",
token);
(void) WriteBlobString(image,message);
@@ -4200,7 +4200,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("skewY",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"skewY(%s) ",
token);
(void) WriteBlobString(image,message);
@@ -4211,9 +4211,9 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
char
color[MagickPathExtent];
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) CopyMagickString(color,token,MagickPathExtent);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
" <stop offset=\"%s\" stop-color=\"%s\" />\n",token,color);
(void) WriteBlobString(image,message);
@@ -4221,7 +4221,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("stroke",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"stroke:%s;",
token);
(void) WriteBlobString(image,message);
@@ -4229,7 +4229,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("stroke-antialias",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-antialias:%s;",token);
(void) WriteBlobString(image,message);
@@ -4243,13 +4243,13 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
k;
p=q;
GetMagickToken(p,&p,extent,token);
GetNextToken(p,&p,extent,token);
for (k=0; IsPoint(token); k++)
GetMagickToken(p,&p,extent,token);
GetNextToken(p,&p,extent,token);
(void) WriteBlobString(image,"stroke-dasharray:");
for (j=0; j < k; j++)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"%s ",
token);
(void) WriteBlobString(image,message);
@@ -4257,7 +4257,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
(void) WriteBlobString(image,";");
break;
}
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-dasharray:%s;",token);
(void) WriteBlobString(image,message);
@@ -4265,7 +4265,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("stroke-dashoffset",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-dashoffset:%s;",token);
(void) WriteBlobString(image,message);
@@ -4273,7 +4273,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("stroke-linecap",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-linecap:%s;",token);
(void) WriteBlobString(image,message);
@@ -4281,7 +4281,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("stroke-linejoin",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-linejoin:%s;",token);
(void) WriteBlobString(image,message);
@@ -4289,7 +4289,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("stroke-miterlimit",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-miterlimit:%s;",token);
(void) WriteBlobString(image,message);
@@ -4297,7 +4297,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("stroke-opacity",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-opacity:%s;",token);
(void) WriteBlobString(image,message);
@@ -4305,7 +4305,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("stroke-width",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-width:%s;",token);
(void) WriteBlobString(image,message);
@@ -4324,7 +4324,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("text-antialias",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"text-antialias:%s;",token);
(void) WriteBlobString(image,message);
@@ -4337,11 +4337,11 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
}
if (LocaleCompare("translate",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.tx=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
affine.ty=StringToDouble(token,(char **) NULL);
break;
}
@@ -4353,16 +4353,16 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
{
if (LocaleCompare("viewbox",keyword) == 0)
{
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
break;
}
status=MagickFalse;
@@ -4390,15 +4390,15 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
*/
if (IsPoint(q) == MagickFalse)
break;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
point.x=StringToDouble(token,(char **) NULL);
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
point.y=StringToDouble(token,(char **) NULL);
GetMagickToken(q,(const char **) NULL,extent,token);
GetNextToken(q,(const char **) NULL,extent,token);
if (*token == ',')
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
primitive_info[i].primitive=primitive_type;
primitive_info[i].point=point;
primitive_info[i].coordinates=0;
@@ -4595,7 +4595,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
int
number_attributes;
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
number_attributes=1;
for (p=token; *p != '\0'; p++)
if (isalpha((int) *p))
@@ -4626,7 +4626,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
status=MagickFalse;
break;
}
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
if (LocaleCompare("point",token) == 0)
primitive_info[j].method=PointMethod;
if (LocaleCompare("replace",token) == 0)
@@ -4649,7 +4649,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
status=MagickFalse;
break;
}
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
" <text x=\"%g\" y=\"%g\">",primitive_info[j].point.x,
primitive_info[j].point.y);
@@ -4672,7 +4672,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image,
status=MagickFalse;
break;
}
GetMagickToken(q,&q,extent,token);
GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
" <image x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\" "
"xlink:href=\"%s\"/>\n",primitive_info[j].point.x,