GetNextToken(q,&q,extent,token);
if (*token == '\0')
break;
- if (*token == '#')
- {
- /*
- Skip comment.
- */
- while ((*q != '\n') && (*q != '\0'))
- q++;
- continue;
- }
if (LocaleCompare("push",token) == 0)
{
register const char
start=q;
end=q;
(void) CopyMagickString(name,token,MagickPathExtent);
- n=0;
- for (p=q; *q != '\0'; )
+ n=1;
+ for (p=q; *p != '\0'; )
{
GetNextToken(p,&p,extent,token);
if (*token == '\0')
break;
- if (*token == '#')
- {
- /*
- Skip comment.
- */
- while ((*p != '\n') && (*p != '\0'))
- p++;
- continue;
- }
if (LocaleCompare(token,"pop") == 0)
{
end=p-strlen(token)-1;
}
if (LocaleCompare(token,"push") == 0)
n++;
- if ((n < 0) && (end > start))
+ if ((n == 0) && (end > start))
{
char
*macro;
SVGProcessStyleElement(context,name,value);
(void) FormatLocaleFile(svg_info->file,"pop class\n");
}
- (void) FormatLocaleFile(svg_info->file,"push class \"\"\n");
- (void) FormatLocaleFile(svg_info->file,"pop class\n");
break;
}
if (LocaleCompare((const char *) name,"svg") == 0)