Improve GetNextToken() performance
diff --git a/MagickCore/channel.c b/MagickCore/channel.c
index 630ab6e..b7e1117 100644
--- a/MagickCore/channel.c
+++ b/MagickCore/channel.c
@@ -249,7 +249,7 @@
channel_mask=UndefinedChannel;
pixel=0.0;
p=(char *) expression;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
channel_op=ExtractChannelOp;
for (channels=0; *token != '\0'; )
{
@@ -263,7 +263,7 @@
{
case ',':
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
break;
}
case '|':
@@ -272,7 +272,7 @@
source_image=GetNextImageInList(source_image);
else
source_image=GetFirstImageInList(source_image);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
break;
}
case ';':
@@ -301,7 +301,7 @@
destination_image=GetLastImageInList(destination_image);
return((Image *) NULL);
}
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
channels=0;
destination_channel=RedPixelChannel;
channel_mask=UndefinedChannel;
@@ -320,23 +320,23 @@
}
source_channel=(PixelChannel) i;
channel_op=ExtractChannelOp;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == '<')
{
channel_op=ExchangeChannelOp;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
}
if (*token == '=')
{
if (channel_op != ExchangeChannelOp)
channel_op=AssignChannelOp;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
}
if (*token == '>')
{
if (channel_op != ExchangeChannelOp)
channel_op=TransferChannelOp;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
}
switch (channel_op)
{
@@ -407,7 +407,7 @@
if (((channels >= 1) || (destination_channel >= 1)) &&
(IsGrayColorspace(destination_image->colorspace) != MagickFalse))
(void) SetImageColorspace(destination_image,sRGBColorspace,exception);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
break;
}
default:
diff --git a/MagickCore/color.c b/MagickCore/color.c
index 87415a0..d113a63 100644
--- a/MagickCore/color.c
+++ b/MagickCore/color.c
@@ -2030,7 +2030,7 @@
/*
Interpret XML.
*/
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -2040,7 +2040,7 @@
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -2049,7 +2049,7 @@
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -2060,10 +2060,10 @@
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > MagickMaxRecursionDepth)
@@ -2120,11 +2120,11 @@
color_info=(ColorInfo *) NULL;
continue;
}
- GetNextToken(q,(const char **) NULL,extent,token);
+ (void) GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'C':
diff --git a/MagickCore/configure.c b/MagickCore/configure.c
index 3692d32..ba5affe 100644
--- a/MagickCore/configure.c
+++ b/MagickCore/configure.c
@@ -1165,7 +1165,7 @@
/*
Interpret XML.
*/
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -1175,7 +1175,7 @@
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -1184,7 +1184,7 @@
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -1195,10 +1195,10 @@
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > MagickMaxRecursionDepth)
@@ -1259,11 +1259,11 @@
/*
Parse configure element.
*/
- GetNextToken(q,(const char **) NULL,extent,token);
+ (void) GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'N':
diff --git a/MagickCore/delegate.c b/MagickCore/delegate.c
index 5565fc8..eb0ba31 100644
--- a/MagickCore/delegate.c
+++ b/MagickCore/delegate.c
@@ -2047,7 +2047,7 @@
/*
Interpret XML.
*/
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -2057,7 +2057,7 @@
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -2066,7 +2066,7 @@
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -2077,10 +2077,10 @@
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > MagickMaxRecursionDepth)
@@ -2138,11 +2138,11 @@
delegate_info=(DelegateInfo *) NULL;
continue;
}
- GetNextToken(q,(const char **) NULL,extent,token);
+ (void) GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'C':
diff --git a/MagickCore/draw.c b/MagickCore/draw.c
index 584e225..f371231 100644
--- a/MagickCore/draw.c
+++ b/MagickCore/draw.c
@@ -2321,7 +2321,8 @@
extent=strlen(token)+MagickPathExtent;
for (q=primitive; *q != '\0'; )
{
- GetNextToken(q,&q,extent,token);
+ if (GetNextToken(q,&q,extent,token) < 1)
+ break;
if (*token == '\0')
break;
if (LocaleCompare("push",token) == 0)
@@ -2330,7 +2331,7 @@
*end,
*start;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*q == '"')
{
char
@@ -2345,14 +2346,14 @@
/*
Named macro (e.g. push graphic-context "wheel").
*/
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
start=q;
end=q;
(void) CopyMagickString(name,token,MagickPathExtent);
n=1;
for (p=q; *p != '\0'; )
{
- GetNextToken(p,&p,extent,token);
+ (void) GetNextToken(p,&p,extent,token);
if (*token == '\0')
break;
if (LocaleCompare(token,"pop") == 0)
@@ -2367,7 +2368,7 @@
/*
Extract macro.
*/
- GetNextToken(p,&p,extent,token);
+ (void) GetNextToken(p,&p,extent,token);
(void) CopyMagickString(macro,start,(size_t) (end-start));
(void) AddValueToSplayTree(macros,ConstantString(name),
ConstantString(macro));
@@ -2567,7 +2568,8 @@
/*
Interpret graphic primitive.
*/
- GetNextToken(q,&q,MagickPathExtent,keyword);
+ if (GetNextToken(q,&q,MagickPathExtent,keyword) < 1)
+ break;
if (*keyword == '\0')
break;
if (*keyword == '#')
@@ -2593,37 +2595,37 @@
{
if (LocaleCompare("affine",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.sx=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.rx=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.ry=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.sy=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.tx=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.ty=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -2652,7 +2654,7 @@
}
if (LocaleCompare("border-color",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
status&=QueryColorCompliance(token,AllCompliance,
&graphic_context[n]->border_color,exception);
break;
@@ -2668,7 +2670,7 @@
const char
*mvg_class;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == '\0')
{
status=MagickFalse;
@@ -2706,7 +2708,7 @@
/*
Take a node from within the MVG document, and duplicate it here.
*/
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == '\0')
{
status=MagickFalse;
@@ -2742,7 +2744,7 @@
ssize_t
fill_rule;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
fill_rule=ParseCommandOption(MagickFillRuleOptions,MagickFalse,
token);
if (fill_rule == -1)
@@ -2758,7 +2760,7 @@
ssize_t
clip_units;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
clip_units=ParseCommandOption(MagickClipPathOptions,MagickFalse,
token);
if (clip_units == -1)
@@ -2794,7 +2796,7 @@
MVG compliance associates a clipping mask with an image; SVG
compliance associates a clipping mask with a graphics context.
*/
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->compliance=(ComplianceType) ParseCommandOption(
MagickComplianceOptions,MagickFalse,token);
break;
@@ -2810,7 +2812,7 @@
ssize_t
decorate;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
decorate=ParseCommandOption(MagickDecorateOptions,MagickFalse,
token);
if (decorate == -1)
@@ -2823,7 +2825,7 @@
}
if (LocaleCompare("density",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) CloneString(&graphic_context[n]->density,token);
break;
}
@@ -2832,7 +2834,7 @@
ssize_t
direction;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
direction=ParseCommandOption(MagickDirectionOptions,MagickFalse,
token);
if (direction == -1)
@@ -2854,7 +2856,7 @@
}
if (LocaleCompare("encoding",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) CloneString(&graphic_context[n]->encoding,token);
break;
}
@@ -2866,7 +2868,7 @@
{
if (LocaleCompare("fill",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (graphic_context[n]->clip_path != MagickFalse)
break;
(void) FormatLocaleString(pattern,MagickPathExtent,"%s",token);
@@ -2887,7 +2889,7 @@
double
opacity;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (graphic_context[n]->clip_path != MagickFalse)
break;
factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
@@ -2908,7 +2910,7 @@
ssize_t
fill_rule;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
fill_rule=ParseCommandOption(MagickFillRuleOptions,MagickFalse,
token);
if (fill_rule == -1)
@@ -2921,7 +2923,7 @@
}
if (LocaleCompare("font",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) CloneString(&graphic_context[n]->font,token);
if (LocaleCompare("none",token) == 0)
graphic_context[n]->font=(char *) RelinquishMagickMemory(
@@ -2930,13 +2932,13 @@
}
if (LocaleCompare("font-family",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) CloneString(&graphic_context[n]->family,token);
break;
}
if (LocaleCompare("font-size",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->pointsize=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -2947,7 +2949,7 @@
ssize_t
stretch;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
stretch=ParseCommandOption(MagickStretchOptions,MagickFalse,token);
if (stretch == -1)
{
@@ -2962,7 +2964,7 @@
ssize_t
style;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
style=ParseCommandOption(MagickStyleOptions,MagickFalse,token);
if (style == -1)
{
@@ -2977,7 +2979,7 @@
ssize_t
weight;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
weight=ParseCommandOption(MagickWeightOptions,MagickFalse,token);
if (weight == -1)
weight=(ssize_t) StringToUnsignedLong(token);
@@ -2992,7 +2994,7 @@
{
if (LocaleCompare("gradient-units",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("gravity",keyword) == 0)
@@ -3000,7 +3002,7 @@
ssize_t
gravity;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
gravity=ParseCommandOption(MagickGravityOptions,MagickFalse,token);
if (gravity == -1)
{
@@ -3022,7 +3024,7 @@
compose;
primitive_type=ImagePrimitive;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
compose=ParseCommandOption(MagickComposeOptions,MagickFalse,token);
if (compose == -1)
{
@@ -3034,7 +3036,7 @@
}
if (LocaleCompare("interline-spacing",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->interline_spacing=StringToDouble(token,
&next_token);
if (token == next_token)
@@ -3043,7 +3045,7 @@
}
if (LocaleCompare("interword-spacing",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->interword_spacing=StringToDouble(token,
&next_token);
if (token == next_token)
@@ -3058,7 +3060,7 @@
{
if (LocaleCompare("kerning",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->kerning=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -3072,7 +3074,7 @@
{
if (LocaleCompare("letter-spacing",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
clone_info=CloneDrawInfo((ImageInfo *) NULL,graphic_context[n]);
clone_info->text=AcquireString(" ");
status&=GetTypeMetrics(image,clone_info,&metrics,exception);
@@ -3102,7 +3104,7 @@
/*
Take a node from within the MVG document, and duplicate it here.
*/
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
mask_path=(const char *) GetValueFromSplayTree(macros,token);
if (mask_path != (const char *) NULL)
{
@@ -3124,7 +3126,7 @@
{
if (LocaleCompare("offset",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("opacity",keyword) == 0)
@@ -3132,7 +3134,7 @@
double
opacity;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (graphic_context[n]->clip_path != MagickFalse)
break;
factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
@@ -3172,7 +3174,7 @@
}
if (LocaleCompare("pop",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare("class",token) == 0)
break;
if (LocaleCompare("clip-path",token) == 0)
@@ -3222,7 +3224,7 @@
}
if (LocaleCompare("push",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare("class",token) == 0)
{
/*
@@ -3230,20 +3232,20 @@
*/
for (p=q; *q != '\0'; )
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare(token,"pop") != 0)
continue;
- GetNextToken(q,(const char **) NULL,extent,token);
+ (void) GetNextToken(q,(const char **) NULL,extent,token);
if (LocaleCompare(token,"class") != 0)
continue;
break;
}
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("clip-path",token) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
for (p=q; *q != '\0'; )
{
GetNextToken(q,&q,extent,token);
@@ -3259,7 +3261,7 @@
status=MagickFalse;
break;
}
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("defs",token) == 0)
@@ -3279,44 +3281,44 @@
SegmentInfo
segment;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) CopyMagickString(name,token,MagickPathExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) CopyMagickString(type,token,MagickPathExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
segment.x1=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
segment.y1=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
segment.x2=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
segment.y2=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
if (LocaleCompare(type,"radial") == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
}
for (p=q; *q != '\0'; )
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare(token,"pop") != 0)
continue;
- GetNextToken(q,(const char **) NULL,extent,token);
+ (void) GetNextToken(q,(const char **) NULL,extent,token);
if (LocaleCompare(token,"gradient") != 0)
continue;
break;
@@ -3351,7 +3353,7 @@
MagickMax(fabs(bounds.y2-bounds.y1+1.0),1.0),
bounds.x1,bounds.y1);
(void) SetImageArtifact(image,key,geometry);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("graphic-context",token) == 0)
@@ -3369,12 +3371,12 @@
graphic_context[n]=CloneDrawInfo((ImageInfo *) NULL,
graphic_context[n-1]);
if (*q == '"')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("mask",token) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("pattern",token) == 0)
@@ -3386,38 +3388,38 @@
RectangleInfo
bounds;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) CopyMagickString(name,token,MagickPathExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
bounds.x=(ssize_t) ceil(StringToDouble(token,&next_token)-0.5);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
bounds.y=(ssize_t) ceil(StringToDouble(token,&next_token)-0.5);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
bounds.width=(size_t) floor(StringToDouble(token,&next_token)+
0.5);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
bounds.height=(size_t) floor(StringToDouble(token,&next_token)+
0.5);
if (token == next_token)
ThrowPointExpectedException(token,exception);
for (p=q; *q != '\0'; )
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare(token,"pop") != 0)
continue;
- GetNextToken(q,(const char **) NULL,extent,token);
+ (void) GetNextToken(q,(const char **) NULL,extent,token);
if (LocaleCompare(token,"pattern") != 0)
continue;
break;
@@ -3436,7 +3438,7 @@
"%.20gx%.20g%+.20g%+.20g",(double) bounds.width,(double)
bounds.height,(double) bounds.x,(double) bounds.y);
(void) SetImageArtifact(image,key,geometry);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("symbol",token) == 0)
@@ -3462,7 +3464,7 @@
}
if (LocaleCompare("rotate",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
angle=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -3485,13 +3487,13 @@
{
if (LocaleCompare("scale",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.sx=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.sy=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -3499,7 +3501,7 @@
}
if (LocaleCompare("skewX",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
angle=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -3508,7 +3510,7 @@
}
if (LocaleCompare("skewY",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
angle=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -3534,11 +3536,11 @@
image->filename);
break;
}
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
status&=QueryColorCompliance(token,AllCompliance,&stop_color,
exception);
stops[number_stops-1].color=stop_color;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
stops[number_stops-1].offset=factor*StringToDouble(token,
&next_token);
@@ -3548,7 +3550,7 @@
}
if (LocaleCompare("stroke",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (graphic_context[n]->clip_path != MagickFalse)
break;
(void) FormatLocaleString(pattern,MagickPathExtent,"%s",token);
@@ -3567,7 +3569,7 @@
}
if (LocaleCompare("stroke-antialias",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->stroke_antialias=StringToLong(token) != 0 ?
MagickTrue : MagickFalse;
break;
@@ -3583,14 +3585,14 @@
*r;
r=q;
- GetNextToken(r,&r,extent,token);
+ (void) GetNextToken(r,&r,extent,token);
if (*token == ',')
- GetNextToken(r,&r,extent,token);
+ (void) GetNextToken(r,&r,extent,token);
for (x=0; IsPoint(token) != MagickFalse; x++)
{
- GetNextToken(r,&r,extent,token);
+ (void) GetNextToken(r,&r,extent,token);
if (*token == ',')
- GetNextToken(r,&r,extent,token);
+ (void) GetNextToken(r,&r,extent,token);
}
graphic_context[n]->dash_pattern=(double *)
AcquireQuantumMemory((size_t) (2*x+2),
@@ -3607,9 +3609,9 @@
(2*x+2)*sizeof(*graphic_context[n]->dash_pattern));
for (j=0; j < x; j++)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->dash_pattern[j]=StringToDouble(token,
&next_token);
if (token == next_token)
@@ -3624,12 +3626,12 @@
graphic_context[n]->dash_pattern[j]=0.0;
break;
}
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("stroke-dashoffset",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->dash_offset=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -3640,7 +3642,7 @@
ssize_t
linecap;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
linecap=ParseCommandOption(MagickLineCapOptions,MagickFalse,token);
if (linecap == -1)
{
@@ -3655,7 +3657,7 @@
ssize_t
linejoin;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
linejoin=ParseCommandOption(MagickLineJoinOptions,MagickFalse,
token);
if (linejoin == -1)
@@ -3668,7 +3670,7 @@
}
if (LocaleCompare("stroke-miterlimit",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->miterlimit=StringToUnsignedLong(token);
break;
}
@@ -3677,7 +3679,7 @@
double
opacity;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (graphic_context[n]->clip_path != MagickFalse)
break;
factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
@@ -3695,7 +3697,7 @@
}
if (LocaleCompare("stroke-width",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (graphic_context[n]->clip_path != MagickFalse)
break;
graphic_context[n]->stroke_width=StringToDouble(token,&next_token);
@@ -3719,7 +3721,7 @@
ssize_t
align;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
align=ParseCommandOption(MagickAlignOptions,MagickFalse,token);
if (align == -1)
{
@@ -3734,7 +3736,7 @@
ssize_t
align;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
align=ParseCommandOption(MagickAlignOptions,MagickFalse,token);
if (align == -1)
{
@@ -3746,27 +3748,27 @@
}
if (LocaleCompare("text-antialias",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->text_antialias=StringToLong(token) != 0 ?
MagickTrue : MagickFalse;
break;
}
if (LocaleCompare("text-undercolor",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
status&=QueryColorCompliance(token,AllCompliance,
&graphic_context[n]->undercolor,exception);
break;
}
if (LocaleCompare("translate",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.tx=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.ty=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -3787,7 +3789,7 @@
/*
Get a macro from the MVG document, and "use" it here.
*/
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
use=(const char *) GetValueFromSplayTree(macros,token);
if (use != (const char *) NULL)
{
@@ -3805,28 +3807,28 @@
{
if (LocaleCompare("viewbox",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->viewbox.x=(ssize_t) ceil(StringToDouble(token,
&next_token)-0.5);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->viewbox.y=(ssize_t) ceil(StringToDouble(token,
&next_token)-0.5);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->viewbox.width=(size_t) floor(StringToDouble(
token,&next_token)+0.5);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->viewbox.height=(size_t) floor(StringToDouble(
token,&next_token)+0.5);
if (token == next_token)
@@ -3841,7 +3843,7 @@
{
if (LocaleCompare("word-spacing",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
graphic_context[n]->interword_spacing=StringToDouble(token,
&next_token);
if (token == next_token)
@@ -3919,19 +3921,19 @@
*/
if (IsPoint(q) == MagickFalse)
break;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
point.x=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
point.y=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(q,(const char **) NULL,extent,token);
+ (void) GetNextToken(q,(const char **) NULL,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
primitive_info[i].primitive=primitive_type;
primitive_info[i].point=point;
primitive_info[i].coordinates=0;
@@ -4016,7 +4018,7 @@
*s,
*t;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
coordinates=1.0;
t=token;
for (s=token; *s != '\0'; s=t)
@@ -4248,7 +4250,7 @@
status=MagickFalse;
break;
}
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
method=ParseCommandOption(MagickMethodOptions,MagickFalse,token);
if (method == -1)
{
@@ -4269,7 +4271,7 @@
break;
}
if (*token != ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) CloneString(&primitive_info[j].text,token);
/*
Compute text cursor offset.
@@ -4304,7 +4306,7 @@
status=MagickFalse;
break;
}
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) CloneString(&primitive_info[j].text,token);
break;
}
@@ -6411,43 +6413,43 @@
*/
do
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
arc.x=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
arc.y=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
angle=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
large_arc=StringToLong(token) != 0 ? MagickTrue : MagickFalse;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
sweep=StringToLong(token) != 0 ? MagickTrue : MagickFalse;
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -6477,15 +6479,15 @@
points[0]=point;
for (i=1; i < 4; i++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -6513,9 +6515,9 @@
{
do
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -6542,15 +6544,15 @@
*/
do
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -6587,15 +6589,15 @@
i=0;
do
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -6629,15 +6631,15 @@
points[0]=point;
for (i=1; i < 3; i++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -6675,15 +6677,15 @@
points[1].y=2.0*points[3].y-points[2].y;
for (i=2; i < 4; i++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -6727,15 +6729,15 @@
points[1].y=2.0*points[2].y-points[1].y;
for (i=2; i < 3; i++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
@@ -6774,9 +6776,9 @@
*/
do
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,&next_token);
if (token == next_token)
ThrowPointExpectedException(token,exception);
diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c
index 3534689..4f64887 100644
--- a/MagickCore/enhance.c
+++ b/MagickCore/enhance.c
@@ -1108,9 +1108,9 @@
p=(const char *) content;
for (i=0; (*p != '\0') && (i < 3); i++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
switch (i)
{
case 0:
@@ -1140,9 +1140,9 @@
p=(const char *) content;
for (i=0; (*p != '\0') && (i < 3); i++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
switch (i)
{
case 0:
@@ -1173,9 +1173,9 @@
p=(const char *) content;
for (i=0; (*p != '\0') && (i < 3); i++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
switch (i)
{
case 0:
@@ -1210,7 +1210,7 @@
{
content=GetXMLTreeContent(saturation);
p=(const char *) content;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
color_correction.saturation=StringToDouble(token,(char **) NULL);
}
}
diff --git a/MagickCore/geometry.c b/MagickCore/geometry.c
index 677de5a..660b0e0 100644
--- a/MagickCore/geometry.c
+++ b/MagickCore/geometry.c
@@ -764,9 +764,9 @@
p=(char *) geometry;
for (i=0; (*p != '\0') && (i < 6); i++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
switch (i)
{
case 0:
diff --git a/MagickCore/locale.c b/MagickCore/locale.c
index 356f452..a36880b 100644
--- a/MagickCore/locale.c
+++ b/MagickCore/locale.c
@@ -1220,7 +1220,7 @@
/*
Interpret XML.
*/
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickLocaleExtent);
@@ -1231,7 +1231,7 @@
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
while (isspace((int) ((unsigned char) *q)) != 0)
q++;
}
@@ -1244,7 +1244,7 @@
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
while (isspace((int) ((unsigned char) *q)) != 0)
q++;
}
@@ -1258,10 +1258,10 @@
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickLocaleExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"locale") == 0)
{
if (LocaleCompare(locale,token) != 0)
@@ -1308,10 +1308,10 @@
while ((*token != '>') && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickLocaleExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
}
continue;
}
@@ -1333,10 +1333,10 @@
while ((*token != '>') && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickLocaleExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"name") == 0)
{
(void) ConcatenateMagickString(tag,token,MagickLocaleExtent);
@@ -1393,7 +1393,7 @@
(void) ConcatenateMagickString(tag,"/",MagickLocaleExtent);
continue;
}
- GetNextToken(q,(const char **) NULL,extent,token);
+ (void) GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
}
diff --git a/MagickCore/log.c b/MagickCore/log.c
index a02c07b..5977189 100644
--- a/MagickCore/log.c
+++ b/MagickCore/log.c
@@ -1490,7 +1490,7 @@
/*
Interpret XML.
*/
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -1500,7 +1500,7 @@
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -1509,7 +1509,7 @@
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -1520,10 +1520,10 @@
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > MagickMaxRecursionDepth)
@@ -1578,11 +1578,11 @@
log_info=(LogInfo *) NULL;
continue;
}
- GetNextToken(q,(const char **) NULL,extent,token);
+ (void) GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'E':
diff --git a/MagickCore/morphology.c b/MagickCore/morphology.c
index 9a8becc..1fd4ed4 100644
--- a/MagickCore/morphology.c
+++ b/MagickCore/morphology.c
@@ -298,9 +298,9 @@
p++; /* ignore "'" chars for convolve filter usage - Cristy */
for (i=0; p < end; i++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) 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 @@
kernel->negative_range = kernel->positive_range = 0.0;
for (i=0; (i < (ssize_t) (kernel->width*kernel->height)) && (p < end); i++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) 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 @@
}
/* sanity check -- no more values in kernel definition */
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if ( *token != '\0' && *token != ';' && *token != '\'' )
return(DestroyKernelInfo(kernel));
@@ -393,7 +393,7 @@
type;
/* Parse special 'named' kernel */
- GetNextToken(kernel_string,&p,MagickPathExtent,token);
+ (void) GetNextToken(kernel_string,&p,MagickPathExtent,token);
type=ParseCommandOption(MagickKernelOptions,MagickFalse,token);
if ( type < 0 || type == UserDefinedKernel )
return((KernelInfo *) NULL); /* not a valid named kernel */
diff --git a/MagickCore/nt-feature.c b/MagickCore/nt-feature.c
index 0f756ed..513c4f8 100644
--- a/MagickCore/nt-feature.c
+++ b/MagickCore/nt-feature.c
@@ -266,7 +266,7 @@
for (q=value_name; *q != '\0'; )
{
- GetNextToken(q,(const char **) &q,MagickPathExtent,token);
+ (void) GetNextToken(q,(const char **) &q,MagickPathExtent,token);
if (*token == '\0')
break;
diff --git a/MagickCore/opencl.c b/MagickCore/opencl.c
index dd1b29a..7826722 100644
--- a/MagickCore/opencl.c
+++ b/MagickCore/opencl.c
@@ -766,7 +766,7 @@
/*
Interpret XML.
*/
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -776,7 +776,7 @@
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -785,7 +785,7 @@
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<device") == 0)
@@ -837,11 +837,11 @@
device_benchmark);
continue;
}
- GetNextToken(q,(const char **) NULL,extent,token);
+ (void) GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'M':
diff --git a/MagickCore/option.c b/MagickCore/option.c
index 0706249..0624647 100644
--- a/MagickCore/option.c
+++ b/MagickCore/option.c
@@ -3078,7 +3078,7 @@
ssize_t
channel;
- GetNextToken(channels,(const char **) NULL,MagickPathExtent,token);
+ (void) GetNextToken(channels,(const char **) NULL,MagickPathExtent,token);
if ((*token == ';') || (*token == '|'))
return(RedPixelChannel);
channel=ParseCommandOption(MagickPixelChannelOptions,MagickTrue,token);
diff --git a/MagickCore/policy.c b/MagickCore/policy.c
index 0723ac3..9b23d65 100644
--- a/MagickCore/policy.c
+++ b/MagickCore/policy.c
@@ -799,7 +799,7 @@
/*
Interpret XML.
*/
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -809,7 +809,7 @@
Docdomain element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -818,7 +818,7 @@
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -829,10 +829,10 @@
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > MagickMaxRecursionDepth)
@@ -889,11 +889,11 @@
policy_info=(PolicyInfo *) NULL;
continue;
}
- GetNextToken(q,(const char **) NULL,extent,token);
+ (void) GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'D':
diff --git a/MagickCore/threshold.c b/MagickCore/threshold.c
index 0c3a488..c315c4a 100644
--- a/MagickCore/threshold.c
+++ b/MagickCore/threshold.c
@@ -1736,14 +1736,14 @@
p=strchr((char *) threshold_map,',');
if ((p != (char *) NULL) && (isdigit((int) ((unsigned char) *(++p))) != 0))
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
for (i=0; (i < MaxPixelChannels); i++)
levels[i]=StringToDouble(token,(char **) NULL);
for (i=0; (*p != '\0') && (i < MaxPixelChannels); i++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
levels[i]=StringToDouble(token,(char **) NULL);
}
}
diff --git a/MagickCore/token.c b/MagickCore/token.c
index ca98b98..c7cc84b 100644
--- a/MagickCore/token.c
+++ b/MagickCore/token.c
@@ -151,11 +151,12 @@
% 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)). GetNextToken() also recognizes these
-% separator characters: ':', '=', ',', and ';'.
+% separator characters: ':', '=', ',', and ';'. GetNextToken() returns the
+% length of the consumed token.
%
% The format of the GetNextToken method is:
%
-% void GetNextToken(const char *start,const char **end,
+% size_t GetNextToken(const char *start,const char **end,
% const size_t extent,char *token)
%
% A description of each parameter follows:
@@ -169,7 +170,7 @@
% o token: copy the token to this buffer.
%
*/
-MagickExport void GetNextToken(const char *start,const char **end,
+MagickExport size_t GetNextToken(const char *start,const char **end,
const size_t extent,char *token)
{
double
@@ -304,16 +305,20 @@
}
}
token[i]='\0';
- q=strrchr(token,')');
- if ((LocaleNCompare(token,"url(#",5) == 0) && (q != (char *) NULL))
+ if (LocaleNCompare(token,"url(#",5) == 0)
{
- *q='\0';
- (void) memmove(token,token+5,(size_t) (q-token-4));
+ q=strrchr(token,')');
+ if (q != (char *) NULL)
+ {
+ *q='\0';
+ (void) memmove(token,token+5,(size_t) (q-token-4));
+ }
}
while (isspace((int) ((unsigned char) *p)) != 0)
p++;
if (end != (const char **) NULL)
*end=(const char *) p;
+ return(p-start+1);
}
/*
diff --git a/MagickCore/token.h b/MagickCore/token.h
index cccc141..8490870 100644
--- a/MagickCore/token.h
+++ b/MagickCore/token.h
@@ -36,13 +36,13 @@
GlobExpression(const char *,const char *,const MagickBooleanType)
magick_attribute((__pure__));
+extern MagickExport size_t
+ GetNextToken(const char *,const char **,const size_t,char *);
+
extern MagickExport TokenInfo
*AcquireTokenInfo(void),
*DestroyTokenInfo(TokenInfo *);
-extern MagickExport void
- GetNextToken(const char *,const char **,const size_t,char *);
-
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
diff --git a/MagickCore/type.c b/MagickCore/type.c
index e4b0fbc..0d9a1e5 100644
--- a/MagickCore/type.c
+++ b/MagickCore/type.c
@@ -1108,7 +1108,7 @@
/*
Interpret XML.
*/
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -1118,7 +1118,7 @@
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -1127,7 +1127,7 @@
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -1138,10 +1138,10 @@
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > MagickMaxRecursionDepth)
@@ -1202,11 +1202,11 @@
type_info=(TypeInfo *) NULL;
continue;
}
- GetNextToken(q,(const char **) NULL,extent,token);
+ (void) GetNextToken(q,(const char **) NULL,extent,token);
if (*token != '=')
continue;
- GetNextToken(q,&q,extent,token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
switch (*keyword)
{
case 'E':
diff --git a/MagickWand/convert.c b/MagickWand/convert.c
index b279767..a30b423 100644
--- a/MagickWand/convert.c
+++ b/MagickWand/convert.c
@@ -2223,7 +2223,7 @@
i++;
if (i == (ssize_t) argc)
ThrowConvertException(OptionError,"MissingArgument",option);
- GetNextToken(argv[i],(const char **) NULL,MagickPathExtent,token);
+ (void) GetNextToken(argv[i],(const char **) NULL,MagickPathExtent,token);
op=ParseCommandOption(MagickMorphologyOptions,MagickFalse,token);
if (op < 0)
ThrowConvertException(OptionError,"UnrecognizedMorphologyMethod",
diff --git a/MagickWand/drawing-wand.c b/MagickWand/drawing-wand.c
index b6c976d..23c495f 100644
--- a/MagickWand/drawing-wand.c
+++ b/MagickWand/drawing-wand.c
@@ -6463,14 +6463,14 @@
*p;
p=q;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
for (x=0; IsPoint(token) != MagickFalse; x++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
}
CurrentContext->dash_pattern=(double *) AcquireQuantumMemory(
(size_t) (2UL*x)+1UL,sizeof(*CurrentContext->dash_pattern));
@@ -6479,9 +6479,9 @@
"MemoryAllocationFailed",wand->name);
for (j=0; j < x; j++)
{
- GetNextToken(q,&q,MagickPathExtent,token);
+ (void) GetNextToken(q,&q,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(q,&q,MagickPathExtent,token);
+ (void) GetNextToken(q,&q,MagickPathExtent,token);
CurrentContext->dash_pattern[j]=StringToDouble(token,
(char **) NULL);
}
diff --git a/MagickWand/mogrify.c b/MagickWand/mogrify.c
index 9f7eb6b..f83bc5c 100644
--- a/MagickWand/mogrify.c
+++ b/MagickWand/mogrify.c
@@ -513,7 +513,7 @@
x=0;
while( *p != '\0' )
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if ( token[0] == ',' ) continue;
if ( isalpha((int) token[0]) || token[0] == '#' ) {
if ( color_from_image ) {
@@ -1411,9 +1411,9 @@
p=(char *) args;
for (x=0; *p != '\0'; x++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
}
number_arguments=(size_t) x;
arguments=(double *) AcquireQuantumMemory(number_arguments,
@@ -1426,9 +1426,9 @@
p=(char *) args;
for (x=0; (x < (ssize_t) number_arguments) && (*p != '\0'); x++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
arguments[x]=StringToDouble(token,(char **) NULL);
}
args=DestroyString(args);
@@ -1714,9 +1714,9 @@
p=(char *) arguments;
for (x=0; *p != '\0'; x++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
}
number_parameters=(size_t) x;
parameters=(double *) AcquireQuantumMemory(number_parameters,
@@ -1729,9 +1729,9 @@
p=(char *) arguments;
for (x=0; (x < (ssize_t) number_parameters) && (*p != '\0'); x++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
parameters[x]=StringToDouble(token,(char **) NULL);
}
arguments=DestroyString(arguments);
@@ -1998,7 +1998,7 @@
white_point;
p=(const char *) argv[i+1];
- GetNextToken(p,&p,MagickPathExtent,token); /* get black point color */
+ (void) GetNextToken(p,&p,MagickPathExtent,token); /* get black point color */
if ((isalpha((int) *token) != 0) || ((*token == '#') != 0))
(void) QueryColorCompliance(token,AllCompliance,
&black_point,exception);
@@ -2006,13 +2006,13 @@
(void) QueryColorCompliance("#000000",AllCompliance,
&black_point,exception);
if (isalpha((int) token[0]) || (token[0] == '#'))
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) 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))
- GetNextToken(p,&p,MagickPathExtent,token); /* Get white point color. */
+ (void) GetNextToken(p,&p,MagickPathExtent,token); /* Get white point color. */
if ((isalpha((int) *token) != 0) || ((*token == '#') != 0))
(void) QueryColorCompliance(token,AllCompliance,
&white_point,exception);
@@ -2241,13 +2241,13 @@
*/
(void) SyncImageSettings(mogrify_info,*image,exception);
p=argv[i+1];
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
method=(MorphologyMethod) ParseCommandOption(
MagickMorphologyOptions,MagickFalse,token);
iterations=1L;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if ((*p == ':') || (*p == ','))
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if ((*p != '\0'))
iterations=(ssize_t) StringToLong(p);
kernel=AcquireKernelInfo(argv[i+2],exception);
@@ -5503,7 +5503,7 @@
i++;
if (i == (ssize_t) argc)
ThrowMogrifyException(OptionError,"MissingArgument",option);
- GetNextToken(argv[i],(const char **) NULL,MagickPathExtent,token);
+ (void) GetNextToken(argv[i],(const char **) NULL,MagickPathExtent,token);
op=ParseCommandOption(MagickMorphologyOptions,MagickFalse,token);
if (op < 0)
ThrowMogrifyException(OptionError,"UnrecognizedMorphologyMethod",
@@ -8626,9 +8626,9 @@
p=(char *) args;
for (x=0; *p != '\0'; x++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
}
number_arguments=(size_t) x;
arguments=(double *) AcquireQuantumMemory(number_arguments,
@@ -8641,9 +8641,9 @@
p=(char *) args;
for (x=0; (x < (ssize_t) number_arguments) && (*p != '\0'); x++)
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
arguments[x]=StringToDouble(token,(char **) NULL);
}
args=DestroyString(args);
diff --git a/MagickWand/operation.c b/MagickWand/operation.c
index 57a29ac..dc1343e 100644
--- a/MagickWand/operation.c
+++ b/MagickWand/operation.c
@@ -235,9 +235,9 @@
x=0;
while( *p != '\0' )
{
- GetNextToken(p,&p,MagickPathExtent,token);
- if ( token[0] == ',' ) continue;
- if ( isalpha((int) token[0]) || token[0] == '#' )
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
+ if (*token == ',') continue;
+ if ( isalpha((int) ((unsigned char) *token)) || *token == '#' )
x += number_colors; /* color argument found */
else
x++; /* floating point argument */
@@ -267,9 +267,9 @@
x=0;
while( *p != '\0' && x < number_arguments ) {
/* X coordinate */
- token[0]=','; while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
- if ( token[0] == '\0' ) break;
- if ( isalpha((int) token[0]) || token[0] == '#' ) {
+ *token=','; while (*token == ',') GetNextToken(p,&p,MagickPathExtent,token);
+ if (*token == '\0') break;
+ if ( isalpha((int) ((unsigned char) *token)) || *token == '#' ) {
(void) ThrowMagickException(exception,GetMagickModule(),
OptionError, "InvalidArgument", "'%s': %s", "sparse-color",
"Color found, instead of X-coord");
@@ -278,9 +278,9 @@
}
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
/* Y coordinate */
- token[0]=','; while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
- if ( token[0] == '\0' ) break;
- if ( isalpha((int) token[0]) || token[0] == '#' ) {
+ *token=','; while (*token == ',') GetNextToken(p,&p,MagickPathExtent,token);
+ if ( *token == '\0' ) break;
+ if ( isalpha((int) ((unsigned char) *token)) || *token == '#' ) {
(void) ThrowMagickException(exception,GetMagickModule(),
OptionError, "InvalidArgument", "'%s': %s", "sparse-color",
"Color found, instead of Y-coord");
@@ -289,9 +289,9 @@
}
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
/* color name or function given in string argument */
- token[0]=','; while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
- if ( token[0] == '\0' ) break;
- if ( isalpha((int) token[0]) || token[0] == '#' ) {
+ *token=','; while (*token == ',') GetNextToken(p,&p,MagickPathExtent,token);
+ if ( *token == '\0' ) break;
+ if ( isalpha((int) ((unsigned char) *token)) || *token == '#' ) {
/* Color string given */
(void) QueryColorCompliance(token,AllCompliance,&color,
exception);
@@ -313,45 +313,45 @@
/* NB: token contains the first floating point value to use! */
if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
{
- while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
- if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
+ while (*token == ',') GetNextToken(p,&p,MagickPathExtent,token);
+ if ((*token == '\0') || isalpha((int)*token) || *token == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
- token[0] = ','; /* used this token - get another */
+ *token=','; /* used this token - get another */
}
if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
{
- while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
- if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
+ while (*token == ',') GetNextToken(p,&p,MagickPathExtent,token);
+ if ((*token == '\0') || isalpha((int)*token) || *token == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
- token[0] = ','; /* used this token - get another */
+ *token=','; /* used this token - get another */
}
if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
{
- while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
- if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
+ while (*token == ',') GetNextToken(p,&p,MagickPathExtent,token);
+ if ((*token == '\0') || isalpha((int)*token) || *token == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
- token[0] = ','; /* used this token - get another */
+ *token = ','; /* used this token - get another */
}
if (((GetPixelBlackTraits(image) & UpdatePixelTrait) != 0) &&
(image->colorspace == CMYKColorspace))
{
- while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
- if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
+ while (*token == ',') GetNextToken(p,&p,MagickPathExtent,token);
+ if ((*token == '\0') || isalpha((int)*token) || *token == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
- token[0] = ','; /* used this token - get another */
+ *token=','; /* used this token - get another */
}
if (((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) &&
image->alpha_trait != UndefinedPixelTrait)
{
- while ( token[0] == ',' ) GetNextToken(p,&p,MagickPathExtent,token);
- if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
+ while (*token == ',') GetNextToken(p,&p,MagickPathExtent,token);
+ if ( *token == '\0' || isalpha((int)*token) || *token == '#' )
break;
sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
- token[0] = ','; /* used this token - get another */
+ *token = ','; /* used this token - get another */
}
}
}
@@ -2619,22 +2619,22 @@
white_point;
p=(const char *) arg1;
- GetNextToken(p,&p,MagickPathExtent,token); /* get black point color */
- if ((isalpha((int) *token) != 0) || ((*token == '#') != 0))
+ (void) GetNextToken(p,&p,MagickPathExtent,token); /* get black point color */
+ if ((isalpha((int) ((unsigned char) *token)) != 0) || ((*token == '#') != 0))
(void) QueryColorCompliance(token,AllCompliance,
&black_point,_exception);
else
(void) QueryColorCompliance("#000000",AllCompliance,
&black_point,_exception);
- if (isalpha((int) token[0]) || (token[0] == '#'))
- GetNextToken(p,&p,MagickPathExtent,token);
+ if (isalpha((int) ((unsigned char) *token)) || (*token == '#'))
+ (void) 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))
- GetNextToken(p,&p,MagickPathExtent,token); /* Get white point color. */
- if ((isalpha((int) *token) != 0) || ((*token == '#') != 0))
+ if ((isalpha((int) ((unsigned char) *token)) == 0) && ((*token == '#') == 0))
+ (void) GetNextToken(p,&p,MagickPathExtent,token); /* Get white point color. */
+ if ((isalpha((int) ((unsigned char) *token)) != 0) || ((*token == '#') != 0))
(void) QueryColorCompliance(token,AllCompliance,
&white_point,_exception);
else
@@ -2807,15 +2807,15 @@
iterations;
p=arg1;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
parse=ParseCommandOption(MagickMorphologyOptions,MagickFalse,token);
if ( parse < 0 )
CLIWandExceptArgBreak(OptionError,"UnrecognizedFunction",option,
arg1);
iterations=1L;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if ((*p == ':') || (*p == ','))
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if ((*p != '\0'))
iterations=(ssize_t) StringToLong(p);
kernel=AcquireKernelInfo(arg2,exception);
diff --git a/coders/cube.c b/coders/cube.c
index f7639e2..a10a3ec 100644
--- a/coders/cube.c
+++ b/coders/cube.c
@@ -165,7 +165,7 @@
*q;
q=p;
- GetNextToken(q,&q,MagickPathExtent,token);
+ (void) GetNextToken(q,&q,MagickPathExtent,token);
if ((*token == '#') || (*token == '\0'))
continue;
if ((LocaleCompare(token,"LUT_1D_SIZE") == 0) ||
@@ -173,7 +173,7 @@
{
if (cube_info != (MemoryInfo *) NULL)
cube_info=RelinquishVirtualMemory(cube_info);
- GetNextToken(q,&q,MagickPathExtent,value);
+ (void) GetNextToken(q,&q,MagickPathExtent,value);
cube_level=(size_t) StringToLong(value);
if (LocaleCompare(token,"LUT_1D_SIZE") == 0)
cube_level=(size_t) ceil(pow((double) cube_level,1.0/3.0));
@@ -195,7 +195,7 @@
else
if (LocaleCompare(token,"TITLE ") == 0)
{
- GetNextToken(q,&q,MagickPathExtent,value);
+ (void) GetNextToken(q,&q,MagickPathExtent,value);
(void) SetImageProperty(image,"title",value,exception);
}
else
diff --git a/coders/svg.c b/coders/svg.c
index 0fe568c..a0dd964 100644
--- a/coders/svg.c
+++ b/coders/svg.c
@@ -399,7 +399,7 @@
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",string);
assert(string != (const char *) NULL);
p=(const char *) string;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
value=StringToDouble(token,&next_token);
if (strchr(token,'%') != (char *) NULL)
{
@@ -423,7 +423,7 @@
beta=value-svg_info->view_box.height;
return(hypot(alpha,beta)/sqrt(2.0)/100.0);
}
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (LocaleNCompare(token,"cm",2) == 0)
return(DefaultSVGDensity*svg_info->scale[0]/2.54*value);
if (LocaleNCompare(token,"em",2) == 0)
@@ -1670,9 +1670,9 @@
for (p=value; ; )
{
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token != '\0')
{
(void) FormatLocaleFile(svg_info->file,"class \"%s\"\n",
@@ -1866,27 +1866,27 @@
if (LocaleCompare(keyword,"matrix") == 0)
{
p=(const char *) value;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
affine.sx=StringToDouble(value,(char **) NULL);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
affine.rx=StringToDouble(token,&next_token);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
affine.ry=StringToDouble(token,&next_token);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
affine.sy=StringToDouble(token,&next_token);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
affine.tx=StringToDouble(token,&next_token);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
affine.ty=StringToDouble(token,&next_token);
break;
}
@@ -2264,27 +2264,27 @@
if (LocaleCompare(keyword,"matrix") == 0)
{
p=(const char *) value;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
affine.sx=StringToDouble(value,(char **) NULL);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
affine.rx=StringToDouble(token,&next_token);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
affine.ry=StringToDouble(token,&next_token);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
affine.sy=StringToDouble(token,&next_token);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
affine.tx=StringToDouble(token,&next_token);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
affine.ty=StringToDouble(token,&next_token);
break;
}
@@ -2301,19 +2301,19 @@
y;
p=(const char *) value;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
angle=StringToDouble(value,(char **) NULL);
affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
affine.sy=cos(DegreesToRadians(fmod(angle,360.0)));
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
x=StringToDouble(token,&next_token);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
y=StringToDouble(token,&next_token);
affine.tx=svg_info->bounds.x+x*
cos(DegreesToRadians(fmod(angle,360.0)))+y*
@@ -2415,22 +2415,22 @@
if (LocaleCompare(keyword,"viewBox") == 0)
{
p=(const char *) value;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
svg_info->view_box.x=StringToDouble(token,&next_token);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
svg_info->view_box.y=StringToDouble(token,&next_token);
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) 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;
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
if (*token == ',')
- GetNextToken(p,&p,MagickPathExtent,token);
+ (void) GetNextToken(p,&p,MagickPathExtent,token);
svg_info->view_box.height=StringToDouble(token,
(char **) NULL);
if (svg_info->bounds.height == 0)
@@ -4164,7 +4164,7 @@
/*
Interpret graphic primitive.
*/
- GetNextToken(q,&q,MagickPathExtent,keyword);
+ (void) GetNextToken(q,&q,MagickPathExtent,keyword);
if (*keyword == '\0')
break;
if (*keyword == '#')
@@ -4200,27 +4200,27 @@
{
if (LocaleCompare("affine",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.sx=StringToDouble(token,&next_token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.rx=StringToDouble(token,&next_token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.ry=StringToDouble(token,&next_token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.sy=StringToDouble(token,&next_token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.tx=StringToDouble(token,&next_token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.ty=StringToDouble(token,&next_token);
break;
}
@@ -4231,7 +4231,7 @@
}
if (LocaleCompare("angle",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.rx=StringToDouble(token,&next_token);
affine.ry=StringToDouble(token,&next_token);
break;
@@ -4260,7 +4260,7 @@
{
if (LocaleCompare("clip-path",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"clip-path:url(#%s);",token);
(void) WriteBlobString(image,message);
@@ -4268,7 +4268,7 @@
}
if (LocaleCompare("clip-rule",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"clip-rule:%s;",
token);
(void) WriteBlobString(image,message);
@@ -4276,7 +4276,7 @@
}
if (LocaleCompare("clip-units",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"clipPathUnits=%s;",token);
(void) WriteBlobString(image,message);
@@ -4300,7 +4300,7 @@
{
if (LocaleCompare("decorate",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"text-decoration:%s;",token);
(void) WriteBlobString(image,message);
@@ -4325,7 +4325,7 @@
{
if (LocaleCompare("fill",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"fill:%s;",
token);
(void) WriteBlobString(image,message);
@@ -4333,7 +4333,7 @@
}
if (LocaleCompare("fill-rule",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"fill-rule:%s;",token);
(void) WriteBlobString(image,message);
@@ -4341,7 +4341,7 @@
}
if (LocaleCompare("fill-opacity",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"fill-opacity:%s;",token);
(void) WriteBlobString(image,message);
@@ -4349,7 +4349,7 @@
}
if (LocaleCompare("font-family",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"font-family:%s;",token);
(void) WriteBlobString(image,message);
@@ -4357,7 +4357,7 @@
}
if (LocaleCompare("font-stretch",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"font-stretch:%s;",token);
(void) WriteBlobString(image,message);
@@ -4365,7 +4365,7 @@
}
if (LocaleCompare("font-style",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"font-style:%s;",token);
(void) WriteBlobString(image,message);
@@ -4373,7 +4373,7 @@
}
if (LocaleCompare("font-size",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"font-size:%s;",token);
(void) WriteBlobString(image,message);
@@ -4381,7 +4381,7 @@
}
if (LocaleCompare("font-weight",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"font-weight:%s;",token);
(void) WriteBlobString(image,message);
@@ -4395,12 +4395,12 @@
{
if (LocaleCompare("gradient-units",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
break;
}
if (LocaleCompare("text-align",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"text-align %s ",token);
(void) WriteBlobString(image,message);
@@ -4408,7 +4408,7 @@
}
if (LocaleCompare("text-anchor",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"text-anchor %s ",token);
(void) WriteBlobString(image,message);
@@ -4422,7 +4422,7 @@
{
if (LocaleCompare("image",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
primitive_type=ImagePrimitive;
break;
}
@@ -4434,7 +4434,7 @@
{
if (LocaleCompare("kerning",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"kerning:%s;",
token);
(void) WriteBlobString(image,message);
@@ -4446,7 +4446,7 @@
{
if (LocaleCompare("letter-spacing",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"letter-spacing:%s;",token);
(void) WriteBlobString(image,message);
@@ -4465,7 +4465,7 @@
{
if (LocaleCompare("opacity",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"opacity %s ",
token);
(void) WriteBlobString(image,message);
@@ -4499,7 +4499,7 @@
}
if (LocaleCompare("pop",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare("clip-path",token) == 0)
{
(void) WriteBlobString(image,"</clipPath>\n");
@@ -4542,10 +4542,10 @@
}
if (LocaleCompare("push",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare("clip-path",token) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"<clipPath id=\"%s\">\n",token);
(void) WriteBlobString(image,message);
@@ -4558,27 +4558,27 @@
}
if (LocaleCompare("gradient",token) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) CopyMagickString(name,token,MagickPathExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) CopyMagickString(type,token,MagickPathExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
svg_info.segment.x1=StringToDouble(token,&next_token);
svg_info.element.cx=StringToDouble(token,&next_token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
svg_info.segment.y1=StringToDouble(token,&next_token);
svg_info.element.cy=StringToDouble(token,&next_token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
svg_info.segment.x2=StringToDouble(token,&next_token);
svg_info.element.major=StringToDouble(token,
(char **) NULL);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
svg_info.segment.y2=StringToDouble(token,&next_token);
svg_info.element.minor=StringToDouble(token,
(char **) NULL);
@@ -4588,9 +4588,9 @@
svg_info.segment.y1,svg_info.segment.x2,svg_info.segment.y2);
if (LocaleCompare(type,"radial") == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
svg_info.element.angle=StringToDouble(token,
(char **) NULL);
(void) FormatLocaleString(message,MagickPathExtent,
@@ -4616,22 +4616,22 @@
}
if (LocaleCompare("pattern",token) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) CopyMagickString(name,token,MagickPathExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
svg_info.bounds.x=StringToDouble(token,&next_token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
svg_info.bounds.y=StringToDouble(token,&next_token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
svg_info.bounds.width=StringToDouble(token,
(char **) NULL);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
svg_info.bounds.height=StringToDouble(token,(char **) NULL);
(void) FormatLocaleString(message,MagickPathExtent,
"<pattern id=\"%s\" x=\"%g\" y=\"%g\" width=\"%g\" "
@@ -4665,7 +4665,7 @@
}
if (LocaleCompare("rotate",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"rotate(%s) ",
token);
(void) WriteBlobString(image,message);
@@ -4679,17 +4679,17 @@
{
if (LocaleCompare("scale",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.sx=StringToDouble(token,&next_token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.sy=StringToDouble(token,&next_token);
break;
}
if (LocaleCompare("skewX",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"skewX(%s) ",
token);
(void) WriteBlobString(image,message);
@@ -4697,7 +4697,7 @@
}
if (LocaleCompare("skewY",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"skewY(%s) ",
token);
(void) WriteBlobString(image,message);
@@ -4708,9 +4708,9 @@
char
color[MagickPathExtent];
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) CopyMagickString(color,token,MagickPathExtent);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
" <stop offset=\"%s\" stop-color=\"%s\" />\n",token,color);
(void) WriteBlobString(image,message);
@@ -4718,7 +4718,7 @@
}
if (LocaleCompare("stroke",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"stroke:%s;",
token);
(void) WriteBlobString(image,message);
@@ -4726,7 +4726,7 @@
}
if (LocaleCompare("stroke-antialias",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-antialias:%s;",token);
(void) WriteBlobString(image,message);
@@ -4740,13 +4740,13 @@
k;
p=q;
- GetNextToken(p,&p,extent,token);
+ (void) GetNextToken(p,&p,extent,token);
for (k=0; IsPoint(token); k++)
- GetNextToken(p,&p,extent,token);
+ (void) GetNextToken(p,&p,extent,token);
(void) WriteBlobString(image,"stroke-dasharray:");
for (j=0; j < k; j++)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,"%s ",
token);
(void) WriteBlobString(image,message);
@@ -4754,7 +4754,7 @@
(void) WriteBlobString(image,";");
break;
}
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-dasharray:%s;",token);
(void) WriteBlobString(image,message);
@@ -4762,7 +4762,7 @@
}
if (LocaleCompare("stroke-dashoffset",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-dashoffset:%s;",token);
(void) WriteBlobString(image,message);
@@ -4770,7 +4770,7 @@
}
if (LocaleCompare("stroke-linecap",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-linecap:%s;",token);
(void) WriteBlobString(image,message);
@@ -4778,7 +4778,7 @@
}
if (LocaleCompare("stroke-linejoin",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-linejoin:%s;",token);
(void) WriteBlobString(image,message);
@@ -4786,7 +4786,7 @@
}
if (LocaleCompare("stroke-miterlimit",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-miterlimit:%s;",token);
(void) WriteBlobString(image,message);
@@ -4794,7 +4794,7 @@
}
if (LocaleCompare("stroke-opacity",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-opacity:%s;",token);
(void) WriteBlobString(image,message);
@@ -4802,7 +4802,7 @@
}
if (LocaleCompare("stroke-width",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"stroke-width:%s;",token);
(void) WriteBlobString(image,message);
@@ -4821,7 +4821,7 @@
}
if (LocaleCompare("text-antialias",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
"text-antialias:%s;",token);
(void) WriteBlobString(image,message);
@@ -4834,11 +4834,11 @@
}
if (LocaleCompare("translate",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.tx=StringToDouble(token,&next_token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
affine.ty=StringToDouble(token,&next_token);
break;
}
@@ -4850,16 +4850,16 @@
{
if (LocaleCompare("viewbox",keyword) == 0)
{
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
break;
}
status=MagickFalse;
@@ -4887,15 +4887,15 @@
*/
if (IsPoint(q) == MagickFalse)
break;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
point.x=StringToDouble(token,&next_token);
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
point.y=StringToDouble(token,&next_token);
- GetNextToken(q,(const char **) NULL,extent,token);
+ (void) GetNextToken(q,(const char **) NULL,extent,token);
if (*token == ',')
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
primitive_info[i].primitive=primitive_type;
primitive_info[i].point=point;
primitive_info[i].coordinates=0;
@@ -5094,7 +5094,7 @@
int
number_attributes;
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
number_attributes=1;
for (p=token; *p != '\0'; p++)
if (isalpha((int) *p))
@@ -5125,7 +5125,7 @@
status=MagickFalse;
break;
}
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
if (LocaleCompare("point",token) == 0)
primitive_info[j].method=PointMethod;
if (LocaleCompare("replace",token) == 0)
@@ -5148,7 +5148,7 @@
status=MagickFalse;
break;
}
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
" <text x=\"%g\" y=\"%g\">",primitive_info[j].point.x,
primitive_info[j].point.y);
@@ -5171,7 +5171,7 @@
status=MagickFalse;
break;
}
- GetNextToken(q,&q,extent,token);
+ (void) GetNextToken(q,&q,extent,token);
(void) FormatLocaleString(message,MagickPathExtent,
" <image x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\" "
"href=\"%s\"/>\n",primitive_info[j].point.x,