Changeset 130

Show
Ignore:
Timestamp:
09/15/09 18:01:10 (6 months ago)
Author:
cristy
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • ImageMagick/trunk/coders/msl.c

    r117 r130  
    153153static MagickBooleanType 
    154154  WriteMSLImage(const ImageInfo *,Image *); 
     155 
     156static MagickBooleanType 
     157  SetMSLAttributes(MSLInfo *,const xmlChar **); 
    155158#endif 
    156159 
    157160#if defined(MAGICKCORE_XML_DELEGATE) 
     161 
    158162/* 
    159163%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     
    181185%    o exception: return any errors or warnings in this structure. 
    182186% 
    183 % 
    184187*/ 
    185188 
     
    240243  (void) LogMagickEvent(CoderEvent,GetMagickModule(), 
    241244    "  SAX.internalSubset(%s %s %s)",name, 
    242     (external_id != (const xmlChar *) NULL ? (char *) external_id : " "), 
    243     (system_id != (const xmlChar *) NULL ? (char *) system_id : " ")); 
     245    (external_id != (const xmlChar *) NULL ? (const char *) external_id : " "), 
     246    (system_id != (const xmlChar *) NULL ? (const char *) system_id : " ")); 
    244247  msl_info=(MSLInfo *) context; 
    245248  (void) xmlCreateIntSubset(msl_info->document,name,external_id,system_id); 
     
    263266  (void) LogMagickEvent(CoderEvent,GetMagickModule(), 
    264267    "  SAX.resolveEntity(%s, %s)", 
    265     (public_id != (const xmlChar *) NULL ? (char *) public_id : "none"), 
    266     (system_id != (const xmlChar *) NULL ? (char *) system_id : "none")); 
     268    (public_id != (const xmlChar *) NULL ? (const char *) public_id : "none"), 
     269    (system_id != (const xmlChar *) NULL ? (const char *) system_id : "none")); 
    267270  msl_info=(MSLInfo *) context; 
    268271  stream=xmlLoadExternalEntity((const char *) system_id,(const char *) 
     
    280283  */ 
    281284  (void) LogMagickEvent(CoderEvent,GetMagickModule(), 
    282     "  SAX.MSLGetEntity(%s)",(char *) name); 
     285    "  SAX.MSLGetEntity(%s)",(const char *) name); 
    283286  msl_info=(MSLInfo *) context; 
    284287  return(xmlGetDocEntity(msl_info->document,name)); 
     
    294297  */ 
    295298  (void) LogMagickEvent(CoderEvent,GetMagickModule(), 
    296     "  SAX.getParameterEntity(%s)",(char *) name); 
     299    "  SAX.getParameterEntity(%s)",(const char *) name); 
    297300  msl_info=(MSLInfo *) context; 
    298301  return(xmlGetParameterEntity(msl_info->document,name)); 
     
    310313  (void) LogMagickEvent(CoderEvent,GetMagickModule(), 
    311314    "  SAX.entityDecl(%s, %d, %s, %s, %s)",name,type, 
    312     public_id != (const xmlChar *) NULL ? (char *) public_id : "none", 
    313     system_id != (const xmlChar *) NULL ? (char *) system_id : "none",content); 
     315    public_id != (const xmlChar *) NULL ? (const char *) public_id : "none", 
     316    system_id != (const xmlChar *) NULL ? (const char *) system_id : "none", 
     317    content); 
    314318  msl_info=(MSLInfo *) context; 
    315319  if (msl_info->parser->inSubset == 1) 
     
    401405  (void) LogMagickEvent(CoderEvent,GetMagickModule(), 
    402406    "  SAX.notationDecl(%s, %s, %s)",name, 
    403     public_id != (const xmlChar *) NULL ? (char *) public_id : "none", 
    404     system_id != (const xmlChar *) NULL ? (char *) system_id : "none"); 
     407    public_id != (const xmlChar *) NULL ? (const char *) public_id : "none", 
     408    system_id != (const xmlChar *) NULL ? (const char *) system_id : "none"); 
    405409  msl_info=(MSLInfo *) context; 
    406410  parser=msl_info->parser; 
     
    425429  (void) LogMagickEvent(CoderEvent,GetMagickModule(), 
    426430    "  SAX.unparsedEntityDecl(%s, %s, %s, %s)",name, 
    427     public_id != (const xmlChar *) NULL ? (char *) public_id : "none", 
    428     system_id != (const xmlChar *) NULL ? (char *) system_id : "none",notation); 
     431    public_id != (const xmlChar *) NULL ? (const char *) public_id : "none", 
     432    system_id != (const xmlChar *) NULL ? (const char *) system_id : "none", 
     433    notation); 
    429434  msl_info=(MSLInfo *) context; 
    430435  (void) xmlAddDocEntity(msl_info->document,name, 
     
    609614    case 'a': 
    610615    { 
    611       if (LocaleCompare((char *) tag,"add-noise") == 0) 
     616      if (LocaleCompare((const char *) tag,"add-noise") == 0) 
    612617        { 
    613618          Image 
     
    622627          if (msl_info->image[n] == (Image *) NULL) 
    623628            { 
    624               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     629              ThrowMSLException(OptionError,"NoImagesDefined", 
     630                (const char *) tag); 
    625631              break; 
    626632            } 
     
    631637              keyword=(const char *) attributes[i++]; 
    632638              attribute=InterpretImageProperties(msl_info->image_info[n], 
    633                 msl_info->attributes[n],(char *) attributes[i]); 
     639                msl_info->attributes[n],(const char *) attributes[i]); 
    634640              CloneString(&value,attribute); 
    635641              switch (*keyword) 
     
    684690          break; 
    685691        } 
    686       if (LocaleCompare((char *) tag,"annotate") == 0) 
     692      if (LocaleCompare((const char *) tag,"annotate") == 0) 
    687693        { 
    688694          char 
     
    694700          if (msl_info->image[n] == (Image *) NULL) 
    695701            { 
    696               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     702              ThrowMSLException(OptionError,"NoImagesDefined", 
     703                (const char *) tag); 
    697704              break; 
    698705            } 
     
    707714              keyword=(const char *) attributes[i++]; 
    708715              attribute=InterpretImageProperties(msl_info->image_info[n], 
    709                 msl_info->attributes[n],(char *) attributes[i]); 
     716                msl_info->attributes[n],(const char *) attributes[i]); 
    710717              CloneString(&value,attribute); 
    711718              switch (*keyword) 
     
    10171024          break; 
    10181025        } 
    1019       if (LocaleCompare((char *) tag,"append") == 0) 
     1026      if (LocaleCompare((const char *) tag,"append") == 0) 
    10201027        { 
    10211028          Image 
     
    10241031          MagickBooleanType 
    10251032            stack; 
    1026     
     1033 
    10271034          if (msl_info->image[n] == (Image *) NULL) 
    10281035            { 
    1029               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     1036              ThrowMSLException(OptionError,"NoImagesDefined", 
     1037                (const char *) tag); 
    10301038              break; 
    10311039            } 
     
    10361044              keyword=(const char *) attributes[i++]; 
    10371045              attribute=InterpretImageProperties(msl_info->image_info[n], 
    1038                 msl_info->attributes[n],(char *) attributes[i]); 
     1046                msl_info->attributes[n],(const char *) attributes[i]); 
    10391047              CloneString(&value,attribute); 
    10401048              switch (*keyword) 
     
    10791087    case 'b': 
    10801088    { 
    1081       if (LocaleCompare((char *) tag,"blur") == 0) 
     1089      if (LocaleCompare((const char *) tag,"blur") == 0) 
    10821090        { 
    10831091          Image 
     
    10891097          if (msl_info->image[n] == (Image *) NULL) 
    10901098            { 
    1091               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     1099              ThrowMSLException(OptionError,"NoImagesDefined", 
     1100                (const char *) tag); 
    10921101              break; 
    10931102            } 
     
    10971106              keyword=(const char *) attributes[i++]; 
    10981107              attribute=InterpretImageProperties(msl_info->image_info[n], 
    1099                 msl_info->attributes[n],(char *) attributes[i]); 
     1108                msl_info->attributes[n],(const char *) attributes[i]); 
    11001109              CloneString(&value,attribute); 
    11011110              switch (*keyword) 
     
    11721181          break; 
    11731182        } 
    1174       if (LocaleCompare((char *) tag,"border") == 0) 
     1183      if (LocaleCompare((const char *) tag,"border") == 0) 
    11751184        { 
    11761185          Image 
     
    11821191          if (msl_info->image[n] == (Image *) NULL) 
    11831192            { 
    1184               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     1193              ThrowMSLException(OptionError,"NoImagesDefined", 
     1194                (const char *) tag); 
    11851195              break; 
    11861196            } 
     
    11911201              keyword=(const char *) attributes[i++]; 
    11921202              attribute=InterpretImageProperties(msl_info->image_info[n], 
    1193                 msl_info->attributes[n],(char *) attributes[i]); 
     1203                msl_info->attributes[n],(const char *) attributes[i]); 
    11941204              CloneString(&value,attribute); 
    11951205              switch (*keyword) 
     
    12851295    case 'c': 
    12861296    { 
    1287       if (LocaleCompare((char *) tag,"colorize") == 0) 
     1297      if (LocaleCompare((const char *) tag,"colorize") == 0) 
    12881298        { 
    12891299          char 
     
    13011311          if (msl_info->image[n] == (Image *) NULL) 
    13021312            { 
    1303               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     1313              ThrowMSLException(OptionError,"NoImagesDefined", 
     1314                (const char *) tag); 
    13041315              break; 
    13051316            } 
     
    13111322              keyword=(const char *) attributes[i++]; 
    13121323              attribute=InterpretImageProperties(msl_info->image_info[n], 
    1313                 msl_info->attributes[n],(char *) attributes[i]); 
     1324                msl_info->attributes[n],(const char *) attributes[i]); 
    13141325              CloneString(&value,attribute); 
    13151326              switch (*keyword) 
     
    13561367          break; 
    13571368        } 
    1358       if (LocaleCompare((char *) tag, "charcoal") == 0) 
     1369      if (LocaleCompare((const char *) tag, "charcoal") == 0) 
    13591370      { 
    13601371        double  radius = 0.0, 
     
    13631374        if (msl_info->image[n] == (Image *) NULL) 
    13641375        { 
    1365           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     1376          ThrowMSLException(OptionError,"NoImagesDefined", 
     1377            (const char *) tag); 
    13661378          break; 
    13671379        } 
     
    13751387          keyword=(const char *) attributes[i++]; 
    13761388          CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    1377             msl_info->attributes[n],(char *) attributes[i])); 
     1389            msl_info->attributes[n],(const char *) attributes[i])); 
    13781390          switch (*keyword) 
    13791391          { 
     
    14251437        } 
    14261438      } 
    1427       if (LocaleCompare((char *) tag,"chop") == 0) 
     1439      if (LocaleCompare((const char *) tag,"chop") == 0) 
    14281440        { 
    14291441          Image 
     
    14351447          if (msl_info->image[n] == (Image *) NULL) 
    14361448            { 
    1437               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     1449              ThrowMSLException(OptionError,"NoImagesDefined", 
     1450                (const char *) tag); 
    14381451              break; 
    14391452            } 
     
    14441457              keyword=(const char *) attributes[i++]; 
    14451458              attribute=InterpretImageProperties(msl_info->image_info[n], 
    1446                 msl_info->attributes[n],(char *) attributes[i]); 
     1459                msl_info->attributes[n],(const char *) attributes[i]); 
    14471460              CloneString(&value,attribute); 
    14481461              switch (*keyword) 
     
    15271540          break; 
    15281541        } 
    1529       if (LocaleCompare((char *) tag,"color-floodfill") == 0) 
     1542      if (LocaleCompare((const char *) tag,"color-floodfill") == 0) 
    15301543        { 
    15311544          PaintMethod 
     
    15401553          if (msl_info->image[n] == (Image *) NULL) 
    15411554            { 
    1542               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     1555              ThrowMSLException(OptionError,"NoImagesDefined", 
     1556                (const char *) tag); 
    15431557              break; 
    15441558            } 
     
    15521566              keyword=(const char *) attributes[i++]; 
    15531567              attribute=InterpretImageProperties(msl_info->image_info[n], 
    1554                 msl_info->attributes[n],(char *) attributes[i]); 
     1568                msl_info->attributes[n],(const char *) attributes[i]); 
    15551569              CloneString(&value,attribute); 
    15561570              switch (*keyword) 
     
    16461660          break; 
    16471661        } 
    1648       if (LocaleCompare((char *) tag,"comment") == 0) 
     1662      if (LocaleCompare((const char *) tag,"comment") == 0) 
    16491663        break; 
    1650       if (LocaleCompare((char *) tag,"composite") == 0) 
     1664      if (LocaleCompare((const char *) tag,"composite") == 0) 
    16511665        { 
    16521666          char 
     
    16681682          if (msl_info->image[n] == (Image *) NULL) 
    16691683            { 
    1670               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     1684              ThrowMSLException(OptionError,"NoImagesDefined", 
     1685                (const char *) tag); 
    16711686              break; 
    16721687            } 
     
    16781693              keyword=(const char *) attributes[i++]; 
    16791694              attribute=InterpretImageProperties(msl_info->image_info[n], 
    1680                 msl_info->attributes[n],(char *) attributes[i]); 
     1695                msl_info->attributes[n],(const char *) attributes[i]); 
    16811696              CloneString(&value,attribute); 
    16821697              switch (*keyword) 
     
    17051720                      const char 
    17061721                        *attribute; 
    1707      
     1722 
    17081723                      attribute=GetImageProperty(msl_info->attributes[j],"id"); 
    17091724                      if ((attribute != (const char *) NULL)  && 
     
    17301745              keyword=(const char *) attributes[i++]; 
    17311746              attribute=InterpretImageProperties(msl_info->image_info[n], 
    1732                 msl_info->attributes[n],(char *) attributes[i]); 
     1747                msl_info->attributes[n],(const char *) attributes[i]); 
    17331748              CloneString(&value,attribute); 
    17341749              switch (*keyword) 
     
    18381853                        opacity, 
    18391854                        y; 
    1840                      
     1855 
    18411856                      register long 
    18421857                        x; 
    1843                      
     1858 
    18441859                      register PixelPacket 
    18451860                        *q; 
    1846                      
     1861 
    18471862                      CacheView 
    18481863                        *composite_view; 
     
    18511866                      if (compose != DissolveCompositeOp) 
    18521867                        { 
    1853                           (void) SetImageOpacity(composite_image,(Quantum) opacity); 
     1868                          (void) SetImageOpacity(composite_image,(Quantum) 
     1869                            opacity); 
    18541870                          break; 
    18551871                        } 
     
    18601876                      composite_view=AcquireCacheView(composite_image); 
    18611877                      for (y=0; y < (long) composite_image->rows ; y++) 
    1862                       {  
     1878                      { 
    18631879                        q=GetCacheViewAuthenticPixels(composite_view,0,y,(long) 
    18641880                          composite_image->columns,1,&exception); 
    18651881                        for (x=0; x < (long) composite_image->columns; x++) 
    1866                         {  
     1882                        { 
    18671883                          if (q->opacity == OpaqueOpacity) 
    18681884                            q->opacity=RoundToQuantum(opacity); 
     
    19932009          break; 
    19942010        } 
    1995       if (LocaleCompare((char *) tag,"contrast") == 0) 
     2011      if (LocaleCompare((const char *) tag,"contrast") == 0) 
    19962012        { 
    19972013          MagickBooleanType 
     
    20032019          if (msl_info->image[n] == (Image *) NULL) 
    20042020            { 
    2005               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2021              ThrowMSLException(OptionError,"NoImagesDefined", 
     2022                (const char *) tag); 
    20062023              break; 
    20072024            } 
     
    20122029              keyword=(const char *) attributes[i++]; 
    20132030              attribute=InterpretImageProperties(msl_info->image_info[n], 
    2014                 msl_info->attributes[n],(char *) attributes[i]); 
     2031                msl_info->attributes[n],(const char *) attributes[i]); 
    20152032              CloneString(&value,attribute); 
    20162033              switch (*keyword) 
     
    20442061          break; 
    20452062        } 
    2046       if (LocaleCompare((char *) tag,"crop") == 0) 
     2063      if (LocaleCompare((const char *) tag,"crop") == 0) 
    20472064        { 
    20482065          Image 
     
    20542071          if (msl_info->image[n] == (Image *) NULL) 
    20552072            { 
    2056               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2073              ThrowMSLException(OptionError,"NoImagesDefined", 
     2074                (const char *) tag); 
    20572075              break; 
    20582076            } 
     
    20632081              keyword=(const char *) attributes[i++]; 
    20642082              attribute=InterpretImageProperties(msl_info->image_info[n], 
    2065                 msl_info->attributes[n],(char *) attributes[i]); 
     2083                msl_info->attributes[n],(const char *) attributes[i]); 
    20662084              CloneString(&value,attribute); 
    20672085              switch (*keyword) 
     
    21462164          break; 
    21472165        } 
    2148       if (LocaleCompare((char *) tag,"cycle-colormap") == 0) 
     2166      if (LocaleCompare((const char *) tag,"cycle-colormap") == 0) 
    21492167        { 
    21502168          long 
     
    21562174          if (msl_info->image[n] == (Image *) NULL) 
    21572175            { 
    2158               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2176              ThrowMSLException(OptionError,"NoImagesDefined", 
     2177                (const char *) tag); 
    21592178              break; 
    21602179            } 
     
    21652184              keyword=(const char *) attributes[i++]; 
    21662185              attribute=InterpretImageProperties(msl_info->image_info[n], 
    2167                 msl_info->attributes[n],(char *) attributes[i]); 
     2186                msl_info->attributes[n],(const char *) attributes[i]); 
    21682187              CloneString(&value,attribute); 
    21692188              switch (*keyword) 
     
    21972216    case 'd': 
    21982217    { 
    2199       if (LocaleCompare((char *) tag,"despeckle") == 0) 
     2218      if (LocaleCompare((const char *) tag,"despeckle") == 0) 
    22002219        { 
    22012220          Image 
     
    22072226          if (msl_info->image[n] == (Image *) NULL) 
    22082227            { 
    2209               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2228              ThrowMSLException(OptionError,"NoImagesDefined", 
     2229                (const char *) tag); 
    22102230              break; 
    22112231            } 
     
    22152235              keyword=(const char *) attributes[i++]; 
    22162236              attribute=InterpretImageProperties(msl_info->image_info[n], 
    2217                 msl_info->attributes[n],(char *) attributes[i]); 
     2237                msl_info->attributes[n],(const char *) attributes[i]); 
    22182238              CloneString(&value,attribute); 
    22192239              ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
     
    22272247          break; 
    22282248        } 
    2229       if (LocaleCompare((char *) tag,"display") == 0) 
     2249      if (LocaleCompare((const char *) tag,"display") == 0) 
    22302250        { 
    22312251          if (msl_info->image[n] == (Image *) NULL) 
    22322252            { 
    2233               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2253              ThrowMSLException(OptionError,"NoImagesDefined", 
     2254                (const char *) tag); 
    22342255              break; 
    22352256            } 
     
    22392260              keyword=(const char *) attributes[i++]; 
    22402261              attribute=InterpretImageProperties(msl_info->image_info[n], 
    2241                 msl_info->attributes[n],(char *) attributes[i]); 
     2262                msl_info->attributes[n],(const char *) attributes[i]); 
    22422263              CloneString(&value,attribute); 
    22432264              switch (*keyword) 
     
    22542275          break; 
    22552276        } 
    2256       if (LocaleCompare((char *) tag,"draw") == 0) 
     2277      if (LocaleCompare((const char *) tag,"draw") == 0) 
    22572278        { 
    22582279          char 
     
    22642285          if (msl_info->image[n] == (Image *) NULL) 
    22652286            { 
    2266               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2287              ThrowMSLException(OptionError,"NoImagesDefined", 
     2288                (const char *) tag); 
    22672289              break; 
    22682290            } 
     
    22772299              keyword=(const char *) attributes[i++]; 
    22782300              attribute=InterpretImageProperties(msl_info->image_info[n], 
    2279                 msl_info->attributes[n],(char *) attributes[i]); 
     2301                msl_info->attributes[n],(const char *) attributes[i]); 
    22802302              CloneString(&value,attribute); 
    22812303              switch (*keyword) 
     
    24092431                { 
    24102432                  if (LocaleCompare(keyword,"primitive") == 0) 
    2411                     {  
     2433                    { 
    24122434                      CloneString(&draw_info->primitive,value); 
    24132435                      break; 
     
    25952617    case 'e': 
    25962618    { 
    2597       if (LocaleCompare((char *) tag,"edge") == 0) 
     2619      if (LocaleCompare((const char *) tag,"edge") == 0) 
    25982620        { 
    25992621          Image 
     
    26052627          if (msl_info->image[n] == (Image *) NULL) 
    26062628            { 
    2607               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2629              ThrowMSLException(OptionError,"NoImagesDefined", 
     2630                (const char *) tag); 
    26082631              break; 
    26092632            } 
     
    26132636              keyword=(const char *) attributes[i++]; 
    26142637              attribute=InterpretImageProperties(msl_info->image_info[n], 
    2615                 msl_info->attributes[n],(char *) attributes[i]); 
     2638                msl_info->attributes[n],(const char *) attributes[i]); 
    26162639              CloneString(&value,attribute); 
    26172640              switch (*keyword) 
     
    26592682          break; 
    26602683        } 
    2661       if (LocaleCompare((char *) tag,"emboss") == 0) 
     2684      if (LocaleCompare((const char *) tag,"emboss") == 0) 
    26622685        { 
    26632686          Image 
     
    26692692          if (msl_info->image[n] == (Image *) NULL) 
    26702693            { 
    2671               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2694              ThrowMSLException(OptionError,"NoImagesDefined", 
     2695                (const char *) tag); 
    26722696              break; 
    26732697            } 
     
    26772701              keyword=(const char *) attributes[i++]; 
    26782702              attribute=InterpretImageProperties(msl_info->image_info[n], 
    2679                 msl_info->attributes[n],(char *) attributes[i]); 
     2703                msl_info->attributes[n],(const char *) attributes[i]); 
    26802704              CloneString(&value,attribute); 
    26812705              switch (*keyword) 
     
    27352759          break; 
    27362760        } 
    2737       if (LocaleCompare((char *) tag,"enhance") == 0) 
     2761      if (LocaleCompare((const char *) tag,"enhance") == 0) 
    27382762        { 
    27392763          Image 
     
    27452769          if (msl_info->image[n] == (Image *) NULL) 
    27462770            { 
    2747               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2771              ThrowMSLException(OptionError,"NoImagesDefined", 
     2772                (const char *) tag); 
    27482773              break; 
    27492774            } 
     
    27532778              keyword=(const char *) attributes[i++]; 
    27542779              attribute=InterpretImageProperties(msl_info->image_info[n], 
    2755                 msl_info->attributes[n],(char *) attributes[i]); 
     2780                msl_info->attributes[n],(const char *) attributes[i]); 
    27562781              CloneString(&value,attribute); 
    27572782              ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
     
    27652790          break; 
    27662791        } 
    2767       if (LocaleCompare((char *) tag,"equalize") == 0) 
     2792      if (LocaleCompare((const char *) tag,"equalize") == 0) 
    27682793        { 
    27692794          /* 
     
    27722797          if (msl_info->image[n] == (Image *) NULL) 
    27732798            { 
    2774               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2799              ThrowMSLException(OptionError,"NoImagesDefined", 
     2800                (const char *) tag); 
    27752801              break; 
    27762802            } 
     
    27802806              keyword=(const char *) attributes[i++]; 
    27812807              attribute=InterpretImageProperties(msl_info->image_info[n], 
    2782                 msl_info->attributes[n],(char *) attributes[i]); 
     2808                msl_info->attributes[n],(const char *) attributes[i]); 
    27832809              CloneString(&value,attribute); 
    27842810              switch (*keyword) 
     
    28002826    case 'f': 
    28012827    { 
    2802       if (LocaleCompare((char *) tag, "flatten") == 0) 
     2828      if (LocaleCompare((const char *) tag, "flatten") == 0) 
    28032829      { 
    28042830        if (msl_info->image[n] == (Image *) NULL) 
    28052831        { 
    2806           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2832          ThrowMSLException(OptionError,"NoImagesDefined", 
     2833            (const char *) tag); 
    28072834          break; 
    28082835        } 
     
    28242851        } 
    28252852      } 
    2826       if (LocaleCompare((char *) tag,"flip") == 0) 
     2853      if (LocaleCompare((const char *) tag,"flip") == 0) 
    28272854        { 
    28282855          Image 
     
    28342861          if (msl_info->image[n] == (Image *) NULL) 
    28352862            { 
    2836               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2863              ThrowMSLException(OptionError,"NoImagesDefined", 
     2864                (const char *) tag); 
    28372865              break; 
    28382866            } 
     
    28422870              keyword=(const char *) attributes[i++]; 
    28432871              attribute=InterpretImageProperties(msl_info->image_info[n], 
    2844                 msl_info->attributes[n],(char *) attributes[i]); 
     2872                msl_info->attributes[n],(const char *) attributes[i]); 
    28452873              CloneString(&value,attribute); 
    28462874              ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
     
    28542882          break; 
    28552883        } 
    2856       if (LocaleCompare((char *) tag,"flop") == 0) 
     2884      if (LocaleCompare((const char *) tag,"flop") == 0) 
    28572885        { 
    28582886          Image 
     
    28642892          if (msl_info->image[n] == (Image *) NULL) 
    28652893            { 
    2866               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2894              ThrowMSLException(OptionError,"NoImagesDefined", 
     2895                (const char *) tag); 
    28672896              break; 
    28682897            } 
     
    28722901              keyword=(const char *) attributes[i++]; 
    28732902              attribute=InterpretImageProperties(msl_info->image_info[n], 
    2874                 msl_info->attributes[n],(char *) attributes[i]); 
     2903                msl_info->attributes[n],(const char *) attributes[i]); 
    28752904              CloneString(&value,attribute); 
    28762905              ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
     
    28842913          break; 
    28852914        } 
    2886       if (LocaleCompare((char *) tag,"frame") == 0) 
     2915      if (LocaleCompare((const char *) tag,"frame") == 0) 
    28872916        { 
    28882917          FrameInfo 
     
    28972926          if (msl_info->image[n] == (Image *) NULL) 
    28982927            { 
    2899               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     2928              ThrowMSLException(OptionError,"NoImagesDefined", 
     2929                (const char *) tag); 
    29002930              break; 
    29012931            } 
     
    29062936              keyword=(const char *) attributes[i++]; 
    29072937              attribute=InterpretImageProperties(msl_info->image_info[n], 
    2908                 msl_info->attributes[n],(char *) attributes[i]); 
     2938                msl_info->attributes[n],(const char *) attributes[i]); 
    29092939              CloneString(&value,attribute); 
    29102940              switch (*keyword) 
     
    30323062    case 'g': 
    30333063    { 
    3034       if (LocaleCompare((char *) tag,"gamma") == 0) 
     3064      if (LocaleCompare((const char *) tag,"gamma") == 0) 
    30353065        { 
    30363066          char 
     
    30453075          if (msl_info->image[n] == (Image *) NULL) 
    30463076            { 
    3047               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     3077              ThrowMSLException(OptionError,"NoImagesDefined", 
     3078                (const char *) tag); 
    30483079              break; 
    30493080            } 
     
    30583089              keyword=(const char *) attributes[i++]; 
    30593090              attribute=InterpretImageProperties(msl_info->image_info[n], 
    3060                 msl_info->attributes[n],(char *) attributes[i]); 
     3091                msl_info->attributes[n],(const char *) attributes[i]); 
    30613092              CloneString(&value,attribute); 
    30623093              switch (*keyword) 
     
    31303161            (void) FormatMagickString(gamma,MaxTextExtent,"%g,%g,%g", 
    31313162              (double) pixel.red,(double) pixel.green,(double) pixel.blue); 
    3132           switch (channel)           
     3163          switch (channel) 
    31333164          { 
    31343165            default: 
     
    31573188          break; 
    31583189        } 
    3159       else if (LocaleCompare((char *) tag,"get") == 0) 
     3190      else if (LocaleCompare((const char *) tag,"get") == 0) 
    31603191        { 
    31613192          if (msl_info->image[n] == (Image *) NULL) 
    31623193            { 
    3163               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     3194              ThrowMSLException(OptionError,"NoImagesDefined", 
     3195                (const char *) tag); 
    31643196              break; 
    31653197            } 
     
    31693201          { 
    31703202            keyword=(const char *) attributes[i++]; 
    3171             CloneString(&value,(char *) attributes[i]); 
     3203            CloneString(&value,(const char *) attributes[i]); 
    31723204            (void) CopyMagickString(key,value,MaxTextExtent); 
    31733205            switch (*keyword) 
     
    32063238          break; 
    32073239        } 
    3208     else if (LocaleCompare((char *) tag, "group") == 0) 
     3240    else if (LocaleCompare((const char *) tag, "group") == 0) 
    32093241    { 
    32103242      msl_info->number_groups++; 
     
    32193251    case 'i': 
    32203252    { 
    3221       if (LocaleCompare((char *) tag,"image") == 0) 
     3253      if (LocaleCompare((const char *) tag,"image") == 0) 
    32223254        { 
    32233255          long 
     
    32253257 
    32263258          MSLPushImage(msl_info,(Image *) NULL); 
    3227           n=msl_info->n; 
    32283259          if (attributes == (const xmlChar **) NULL) 
    32293260            break; 
     3261          (void) SetMSLAttributes(msl_info,attributes); 
    32303262          for (i=0; (attributes[i] != (const xmlChar *) NULL); i++) 
    32313263          { 
    32323264            keyword=(const char *) attributes[i++]; 
    32333265            CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    3234               msl_info->attributes[n],(char *) attributes[i])); 
     3266              msl_info->attributes[n],(const char *) attributes[i])); 
    32353267            switch (*keyword) 
    32363268            { 
    3237       case 'B': 
    3238       case 'b': 
    3239         { 
    3240           if (LocaleCompare(keyword,"background") == 0) 
    3241           { 
    3242             (void) QueryColorDatabase(value, 
    3243               &msl_info->image_info[n]->background_color,&exception); 
    3244             break; 
    3245           } 
    3246           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
    3247           break; 
    3248         } 
    3249  
    3250       case 'C': 
    3251       case 'c': 
    3252         { 
    3253           if (LocaleCompare(keyword,"color") == 0) 
    3254           { 
    3255             Image 
    3256               *next_image; 
    3257  
    3258             (void) CopyMagickString(msl_info->image_info[n]->filename,"xc:", 
    3259               MaxTextExtent); 
    3260             (void) ConcatenateMagickString(msl_info->image_info[n]->filename, 
    3261               value,MaxTextExtent); 
    3262             next_image=ReadImage(msl_info->image_info[n],&exception); 
    3263             CatchException(&exception); 
    3264             if (next_image == (Image *) NULL) 
    3265               continue; 
    3266             if (msl_info->image[n] == (Image *) NULL) 
    3267               msl_info->image[n]=next_image; 
    3268             else 
    3269               { 
    3270               register Image 
    3271                 *p; 
    3272  
    3273               /* 
    3274                 Link image into image list. 
    3275               */ 
    3276               p=msl_info->image[n]; 
    3277               for ( ; p->next != (Image *) NULL; p=GetNextImageInList(p)) ; 
    3278               next_image->previous=p; 
    3279               p->next=next_image; 
    3280               } 
    3281             break; 
    3282           } 
    3283           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
    3284           break; 
    3285         } 
    3286  
    3287       case 'I': 
    3288       case 'i': 
    3289         { 
    3290           if (LocaleCompare(keyword,"id") == 0) 
    3291           { 
    3292             (void) SetImageProperty(msl_info->attributes[n],keyword,NULL);  /* make sure to clear it! */ 
    3293             (void) SetImageProperty(msl_info->attributes[n],keyword,value); 
    3294             break; 
    3295           } 
    3296           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
    3297           break; 
    3298         } 
    3299               case 'S': 
    3300               case 's': 
    3301               { 
    3302                 if (LocaleCompare(keyword,"size") == 0) 
    3303                 { 
    3304           CloneString(&msl_info->image_info[n]->size,value); 
    3305           break; 
    3306         } 
     3269              case 'C': 
     3270              case 'c': 
     3271              { 
     3272                if (LocaleCompare(keyword,"color") == 0) 
     3273                  { 
     3274                    Image 
     3275                      *next_image; 
     3276 
     3277                    (void) CopyMagickString(msl_info->image_info[n]->filename, 
     3278                      "xc:",MaxTextExtent); 
     3279                    (void) ConcatenateMagickString(msl_info->image_info[n]-> 
     3280                      filename,value,MaxTextExtent); 
     3281                    next_image=ReadImage(msl_info->image_info[n],&exception); 
     3282                    CatchException(&exception); 
     3283                    if (next_image == (Image *) NULL) 
     3284                      continue; 
     3285                    if (msl_info->image[n] == (Image *) NULL) 
     3286                      msl_info->image[n]=next_image; 
     3287                    else 
     3288                      { 
     3289                        register Image 
     3290                          *p; 
     3291 
     3292                        /* 
     3293                          Link image into image list. 
     3294                        */ 
     3295                        p=msl_info->image[n]; 
     3296                        while (p->next != (Image *) NULL) 
     3297                          p=GetNextImageInList(p); 
     3298                        next_image->previous=p; 
     3299                        p->next=next_image; 
     3300                      } 
     3301                    break; 
     3302                  } 
    33073303                ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
    33083304                break; 
     
    33173313          break; 
    33183314        } 
    3319       if (LocaleCompare((char *) tag,"implode") == 0) 
     3315      if (LocaleCompare((const char *) tag,"implode") == 0) 
    33203316        { 
    33213317          Image 
     
    33273323          if (msl_info->image[n] == (Image *) NULL) 
    33283324            { 
    3329               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     3325              ThrowMSLException(OptionError,"NoImagesDefined", 
     3326                (const char *) tag); 
    33303327              break; 
    33313328            } 
     
    33353332              keyword=(const char *) attributes[i++]; 
    33363333              attribute=InterpretImageProperties(msl_info->image_info[n], 
    3337                 msl_info->attributes[n],(char *) attributes[i]); 
     3334                msl_info->attributes[n],(const char *) attributes[i]); 
    33383335              CloneString(&value,attribute); 
    33393336              switch (*keyword) 
     
    33863383    case 'l': 
    33873384    { 
    3388       if (LocaleCompare((char *) tag,"label") == 0) 
     3385      if (LocaleCompare((const char *) tag,"label") == 0) 
    33893386        break; 
    3390       if (LocaleCompare((char *) tag, "level") == 0) 
     3387      if (LocaleCompare((const char *) tag, "level") == 0) 
    33913388      { 
    33923389        double 
     
    33953392        if (msl_info->image[n] == (Image *) NULL) 
    33963393        { 
    3397           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     3394          ThrowMSLException(OptionError,"NoImagesDefined", 
     3395            (const char *) tag); 
    33983396          break; 
    33993397        } 
     
    34033401        { 
    34043402          keyword=(const char *) attributes[i++]; 
    3405           CloneString(&value,(char *) attributes[i]); 
     3403          CloneString(&value,(const char *) attributes[i]); 
    34063404          (void) CopyMagickString(key,value,MaxTextExtent); 
    34073405          switch (*keyword) 
     
    34613459    case 'm': 
    34623460    { 
    3463       if (LocaleCompare((char *) tag,"magnify") == 0) 
     3461      if (LocaleCompare((const char *) tag,"magnify") == 0) 
    34643462        { 
    34653463          Image 
     
    34713469          if (msl_info->image[n] == (Image *) NULL) 
    34723470            { 
    3473               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     3471              ThrowMSLException(OptionError,"NoImagesDefined", 
     3472                (const char *) tag); 
    34743473              break; 
    34753474            } 
     
    34793478              keyword=(const char *) attributes[i++]; 
    34803479              attribute=InterpretImageProperties(msl_info->image_info[n], 
    3481                 msl_info->attributes[n],(char *) attributes[i]); 
     3480                msl_info->attributes[n],(const char *) attributes[i]); 
    34823481              CloneString(&value,attribute); 
    34833482              ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
     
    34913490          break; 
    34923491        } 
    3493       if (LocaleCompare((char *) tag,"map") == 0) 
     3492      if (LocaleCompare((const char *) tag,"map") == 0) 
    34943493        { 
    34953494          Image 
     
    35073506          if (msl_info->image[n] == (Image *) NULL) 
    35083507            { 
    3509               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     3508              ThrowMSLException(OptionError,"NoImagesDefined", 
     3509                (const char *) tag); 
    35103510              break; 
    35113511            } 
     
    35173517              keyword=(const char *) attributes[i++]; 
    35183518              attribute=InterpretImageProperties(msl_info->image_info[n], 
    3519                 msl_info->attributes[n],(char *) attributes[i]); 
     3519                msl_info->attributes[n],(const char *) attributes[i]); 
    35203520              CloneString(&value,attribute); 
    35213521              switch (*keyword) 
     
    35463546                      const char 
    35473547                        *attribute; 
    3548      
     3548 
    35493549                      attribute=GetImageProperty(msl_info->attributes[j],"id"); 
    35503550                      if ((attribute != (const char *) NULL)  && 
     
    35743574          break; 
    35753575        } 
    3576       if (LocaleCompare((char *) tag,"matte-floodfill") == 0) 
     3576      if (LocaleCompare((const char *) tag,"matte-floodfill") == 0) 
    35773577        { 
    35783578          double 
     
    35913591          if (msl_info->image[n] == (Image *) NULL) 
    35923592            { 
    3593               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     3593              ThrowMSLException(OptionError,"NoImagesDefined", 
     3594                (const char *) tag); 
    35943595              break; 
    35953596            } 
     
    36013602              keyword=(const char *) attributes[i++]; 
    36023603              attribute=InterpretImageProperties(msl_info->image_info[n], 
    3603                 msl_info->attributes[n],(char *) attributes[i]); 
     3604                msl_info->attributes[n],(const char *) attributes[i]); 
    36043605              CloneString(&value,attribute); 
    36053606              switch (*keyword) 
     
    37043705          break; 
    37053706        } 
    3706       if (LocaleCompare((char *) tag,"median-filter") == 0) 
     3707      if (LocaleCompare((const char *) tag,"median-filter") == 0) 
    37073708        { 
    37083709          Image 
     
    37143715          if (msl_info->image[n] == (Image *) NULL) 
    37153716            { 
    3716               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     3717              ThrowMSLException(OptionError,"NoImagesDefined", 
     3718                (const char *) tag); 
    37173719              break; 
    37183720            } 
     
    37223724              keyword=(const char *) attributes[i++]; 
    37233725              attribute=InterpretImageProperties(msl_info->image_info[n], 
    3724                 msl_info->attributes[n],(char *) attributes[i]); 
     3726                msl_info->attributes[n],(const char *) attributes[i]); 
    37253727              CloneString(&value,attribute); 
    37263728              switch (*keyword) 
     
    37683770          break; 
    37693771        } 
    3770       if (LocaleCompare((char *) tag,"minify") == 0) 
     3772      if (LocaleCompare((const char *) tag,"minify") == 0) 
    37713773        { 
    37723774          Image 
     
    37783780          if (msl_info->image[n] == (Image *) NULL) 
    37793781            { 
    3780               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     3782              ThrowMSLException(OptionError,"NoImagesDefined", 
     3783                (const char *) tag); 
    37813784              break; 
    37823785            } 
     
    37863789              keyword=(const char *) attributes[i++]; 
    37873790              attribute=InterpretImageProperties(msl_info->image_info[n], 
    3788                 msl_info->attributes[n],(char *) attributes[i]); 
     3791                msl_info->attributes[n],(const char *) attributes[i]); 
    37893792              CloneString(&value,attribute); 
    37903793              ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
     
    37983801          break; 
    37993802        } 
    3800       if (LocaleCompare((char *) tag,"msl") == 0 ) 
     3803      if (LocaleCompare((const char *) tag,"msl") == 0 ) 
    38013804        break; 
    3802       if (LocaleCompare((char *) tag,"modulate") == 0) 
     3805      if (LocaleCompare((const char *) tag,"modulate") == 0) 
    38033806        { 
    38043807          char 
     
    38103813          if (msl_info->image[n] == (Image *) NULL) 
    38113814            { 
    3812               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     3815              ThrowMSLException(OptionError,"NoImagesDefined", 
     3816                (const char *) tag); 
    38133817              break; 
    38143818            } 
     
    38213825              keyword=(const char *) attributes[i++]; 
    38223826              attribute=InterpretImageProperties(msl_info->image_info[n], 
    3823                 msl_info->attributes[n],(char *) attributes[i]); 
     3827                msl_info->attributes[n],(const char *) attributes[i]); 
    38243828              CloneString(&value,attribute); 
    38253829              switch (*keyword) 
     
    39203924    case 'n': 
    39213925    { 
    3922       if (LocaleCompare((char *) tag,"negate") == 0) 
     3926      if (LocaleCompare((const char *) tag,"negate") == 0) 
    39233927        { 
    39243928          MagickBooleanType 
     
    39303934          if (msl_info->image[n] == (Image *) NULL) 
    39313935            { 
    3932               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     3936              ThrowMSLException(OptionError,"NoImagesDefined", 
     3937                (const char *) tag); 
    39333938              break; 
    39343939            } 
     
    39393944              keyword=(const char *) attributes[i++]; 
    39403945              attribute=InterpretImageProperties(msl_info->image_info[n], 
    3941                 msl_info->attributes[n],(char *) attributes[i]); 
     3946                msl_info->attributes[n],(const char *) attributes[i]); 
    39423947              CloneString(&value,attribute); 
    39433948              switch (*keyword) 
     
    39873992          break; 
    39883993        } 
    3989       if (LocaleCompare((char *) tag,"normalize") == 0) 
     3994      if (LocaleCompare((const char *) tag,"normalize") == 0) 
    39903995        { 
    39913996          /* 
     
    39943999          if (msl_info->image[n] == (Image *) NULL) 
    39954000            { 
    3996               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     4001              ThrowMSLException(OptionError,"NoImagesDefined", 
     4002                (const char *) tag); 
    39974003              break; 
    39984004            } 
     
    40024008              keyword=(const char *) attributes[i++]; 
    40034009              attribute=InterpretImageProperties(msl_info->image_info[n], 
    4004                 msl_info->attributes[n],(char *) attributes[i]); 
     4010                msl_info->attributes[n],(const char *) attributes[i]); 
    40054011              CloneString(&value,attribute); 
    40064012              switch (*keyword) 
     
    40384044    case 'o': 
    40394045    { 
    4040       if (LocaleCompare((char *) tag,"oil-paint") == 0) 
     4046      if (LocaleCompare((const char *) tag,"oil-paint") == 0) 
    40414047        { 
    40424048          Image 
     
    40484054          if (msl_info->image[n] == (Image *) NULL) 
    40494055            { 
    4050               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     4056              ThrowMSLException(OptionError,"NoImagesDefined", 
     4057                (const char *) tag); 
    40514058              break; 
    40524059            } 
     
    40564063              keyword=(const char *) attributes[i++]; 
    40574064              attribute=InterpretImageProperties(msl_info->image_info[n], 
    4058                 msl_info->attributes[n],(char *) attributes[i]); 
     4065                msl_info->attributes[n],(const char *) attributes[i]); 
    40594066              CloneString(&value,attribute); 
    40604067              switch (*keyword) 
     
    41024109          break; 
    41034110        } 
    4104       if (LocaleCompare((char *) tag,"opaque") == 0) 
     4111      if (LocaleCompare((const char *) tag,"opaque") == 0) 
    41054112        { 
    41064113          MagickPixelPacket 
     
    41134120          if (msl_info->image[n] == (Image *) NULL) 
    41144121            { 
    4115               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     4122              ThrowMSLException(OptionError,"NoImagesDefined", 
     4123                (const char *) tag); 
    41164124              break; 
    41174125            } 
     
    41234131              keyword=(const char *) attributes[i++]; 
    41244132              attribute=InterpretImageProperties(msl_info->image_info[n], 
    4125                 msl_info->attributes[n],(char *) attributes[i]); 
     4133                msl_info->attributes[n],(const char *) attributes[i]); 
    41264134              CloneString(&value,attribute); 
    41274135              switch (*keyword) 
     
    41774185    case 'p': 
    41784186    { 
    4179       if (LocaleCompare((char *) tag,"print") == 0) 
     4187      if (LocaleCompare((const char *) tag,"print") == 0) 
    41804188        { 
    41814189          if (attributes == (const xmlChar **) NULL) 
     
    41854193            keyword=(const char *) attributes[i++]; 
    41864194            attribute=InterpretImageProperties(msl_info->image_info[n], 
    4187               msl_info->attributes[n],(char *) attributes[i]); 
     4195              msl_info->attributes[n],(const char *) attributes[i]); 
    41884196            CloneString(&value,attribute); 
    41894197            switch (*keyword) 
     
    42144222    case 'q': 
    42154223    { 
    4216       if (LocaleCompare((char *) tag,"quantize") == 0) 
     4224      if (LocaleCompare((const char *) tag,"quantize") == 0) 
    42174225        { 
    42184226          QuantizeInfo 
     
    42244232          if (msl_info->image[n] == (Image *) NULL) 
    42254233            { 
    4226               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     4234              ThrowMSLException(OptionError,"NoImagesDefined", 
     4235                (const char *) tag); 
    42274236              break; 
    42284237            } 
     
    42334242              keyword=(const char *) attributes[i++]; 
    42344243              attribute=InterpretImageProperties(msl_info->image_info[n], 
    4235                 msl_info->attributes[n],(char *) attributes[i]); 
     4244                msl_info->attributes[n],(const char *) attributes[i]); 
    42364245              CloneString(&value,attribute); 
    42374246              switch (*keyword) 
     
    43164325          break; 
    43174326        } 
    4318       if (LocaleCompare((char *) tag,"query-font-metrics") == 0) 
     4327      if (LocaleCompare((const char *) tag,"query-font-metrics") == 0) 
    43194328        { 
    43204329          char 
     
    43404349              keyword=(const char *) attributes[i++]; 
    43414350              attribute=InterpretImageProperties(msl_info->image_info[n], 
    4342                 msl_info->attributes[n],(char *) attributes[i]); 
     4351                msl_info->attributes[n],(const char *) attributes[i]); 
    43434352              CloneString(&value,attribute); 
    43444353              switch (*keyword) 
     
    46864695    case 'r': 
    46874696    { 
    4688       if (LocaleCompare((char *) tag,"raise") == 0) 
     4697      if (LocaleCompare((const char *) tag,"raise") == 0) 
    46894698        { 
    46904699          MagickBooleanType 
     
    46964705          if (msl_info->image[n] == (Image *) NULL) 
    46974706            { 
    4698               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     4707              ThrowMSLException(OptionError,"NoImagesDefined", 
     4708                (const char *) tag); 
    46994709              break; 
    47004710            } 
     
    47064716              keyword=(const char *) attributes[i++]; 
    47074717              attribute=InterpretImageProperties(msl_info->image_info[n], 
    4708                 msl_info->attributes[n],(char *) attributes[i]); 
     4718                msl_info->attributes[n],(const char *) attributes[i]); 
    47094719              CloneString(&value,attribute); 
    47104720              switch (*keyword) 
     
    47774787          break; 
    47784788        } 
    4779       if (LocaleCompare((char *) tag,"read") == 0) 
     4789      if (LocaleCompare((const char *) tag,"read") == 0) 
    47804790        { 
    47814791          if (attributes == (const xmlChar **) NULL) 
     
    47854795            keyword=(const char *) attributes[i++]; 
    47864796            CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    4787               msl_info->attributes[n],(char *) attributes[i])); 
     4797              msl_info->attributes[n],(const char *) attributes[i])); 
    47884798            switch (*keyword) 
    47894799            { 
     
    48564866          break; 
    48574867        } 
    4858       if (LocaleCompare((char *) tag,"reduce-noise") == 0) 
     4868      if (LocaleCompare((const char *) tag,"reduce-noise") == 0) 
    48594869        { 
    48604870          Image 
     
    48664876          if (msl_info->image[n] == (Image *) NULL) 
    48674877            { 
    4868               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     4878              ThrowMSLException(OptionError,"NoImagesDefined", 
     4879                (const char *) tag); 
    48694880              break; 
    48704881            } 
     
    48744885              keyword=(const char *) attributes[i++]; 
    48754886              attribute=InterpretImageProperties(msl_info->image_info[n], 
    4876                 msl_info->attributes[n],(char *) attributes[i]); 
     4887                msl_info->attributes[n],(const char *) attributes[i]); 
    48774888              CloneString(&value,attribute); 
    48784889              switch (*keyword) 
     
    49204931          break; 
    49214932        } 
    4922       else if (LocaleCompare((char *) tag,"repage") == 0) 
     4933      else if (LocaleCompare((const char *) tag,"repage") == 0) 
    49234934      { 
    49244935        /* init the values */ 
     
    49304941        if (msl_info->image[n] == (Image *) NULL) 
    49314942        { 
    4932           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     4943          ThrowMSLException(OptionError,"NoImagesDefined", 
     4944            (const char *) tag); 
    49334945          break; 
    49344946        } 
     
    49394951        keyword=(const char *) attributes[i++]; 
    49404952        CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    4941           msl_info->attributes[n],(char *) attributes[i])); 
     4953          msl_info->attributes[n],(const char *) attributes[i])); 
    49424954        switch (*keyword) 
    49434955        { 
     
    50405052        } 
    50415053 
    5042          msl_info->image[n]->page.width=width;         
    5043          msl_info->image[n]->page.height=height;         
    5044          msl_info->image[n]->page.x=x;         
    5045          msl_info->image[n]->page.y=y;         
     5054         msl_info->image[n]->page.width=width; 
     5055         msl_info->image[n]->page.height=height; 
     5056         msl_info->image[n]->page.x=x; 
     5057         msl_info->image[n]->page.y=y; 
    50465058        break; 
    50475059      } 
    5048     else if (LocaleCompare((char *) tag,"resample") == 0) 
     5060    else if (LocaleCompare((const char *) tag,"resample") == 0) 
    50495061    { 
    50505062      double 
     
    50545066      if (msl_info->image[n] == (Image *) NULL) 
    50555067        { 
    5056           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     5068          ThrowMSLException(OptionError,"NoImagesDefined", 
     5069            (const char *) tag); 
    50575070          break; 
    50585071        } 
     
    50655078        keyword=(const char *) attributes[i++]; 
    50665079        CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    5067           msl_info->attributes[n],(char *) attributes[i])); 
     5080          msl_info->attributes[n],(const char *) attributes[i])); 
    50685081        switch (*keyword) 
    50695082        { 
     
    51545167      break; 
    51555168    } 
    5156       if (LocaleCompare((char *) tag,"resize") == 0) 
     5169      if (LocaleCompare((const char *) tag,"resize") == 0) 
    51575170        { 
    51585171          double 
     
    51705183          if (msl_info->image[n] == (Image *) NULL) 
    51715184            { 
    5172               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     5185              ThrowMSLException(OptionError,"NoImagesDefined", 
     5186                (const char *) tag); 
    51735187              break; 
    51745188            } 
     
    51805194              keyword=(const char *) attributes[i++]; 
    51815195              attribute=InterpretImageProperties(msl_info->image_info[n], 
    5182                 msl_info->attributes[n],(char *) attributes[i]); 
     5196                msl_info->attributes[n],(const char *) attributes[i]); 
    51835197              CloneString(&value,attribute); 
    51845198              switch (*keyword) 
     
    52665280          break; 
    52675281        } 
    5268       if (LocaleCompare((char *) tag,"roll") == 0) 
     5282      if (LocaleCompare((const char *) tag,"roll") == 0) 
    52695283        { 
    52705284          Image 
     
    52765290          if (msl_info->image[n] == (Image *) NULL) 
    52775291            { 
    5278               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     5292              ThrowMSLException(OptionError,"NoImagesDefined", 
     5293                (const char *) tag); 
    52795294              break; 
    52805295            } 
     
    52855300              keyword=(const char *) attributes[i++]; 
    52865301              attribute=InterpretImageProperties(msl_info->image_info[n], 
    5287                 msl_info->attributes[n],(char *) attributes[i]); 
     5302                msl_info->attributes[n],(const char *) attributes[i]); 
    52885303              CloneString(&value,attribute); 
    52895304              switch (*keyword) 
     
    53445359          break; 
    53455360        } 
    5346       else if (LocaleCompare((char *) tag,"roll") == 0) 
     5361      else if (LocaleCompare((const char *) tag,"roll") == 0) 
    53475362      { 
    53485363        /* init the values */ 
     
    53535368        if (msl_info->image[n] == (Image *) NULL) 
    53545369        { 
    5355           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     5370          ThrowMSLException(OptionError,"NoImagesDefined", 
     5371            (const char *) tag); 
    53565372          break; 
    53575373        } 
     
    53625378        keyword=(const char *) attributes[i++]; 
    53635379        CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    5364           msl_info->attributes[n],(char *) attributes[i])); 
     5380          msl_info->attributes[n],(const char *) attributes[i])); 
    53655381        switch (*keyword) 
    53665382        { 
     
    54225438        break; 
    54235439      } 
    5424       if (LocaleCompare((char *) tag,"rotate") == 0) 
     5440      if (LocaleCompare((const char *) tag,"rotate") == 0) 
    54255441        { 
    54265442          Image 
     
    54325448          if (msl_info->image[n] == (Image *) NULL) 
    54335449            { 
    5434               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     5450              ThrowMSLException(OptionError,"NoImagesDefined", 
     5451                (const char *) tag); 
    54355452              break; 
    54365453            } 
     
    54405457              keyword=(const char *) attributes[i++]; 
    54415458              attribute=InterpretImageProperties(msl_info->image_info[n], 
    5442                 msl_info->attributes[n],(char *) attributes[i]); 
     5459                msl_info->attributes[n],(const char *) attributes[i]); 
    54435460              CloneString(&value,attribute); 
    54445461              switch (*keyword) 
     
    54865503          break; 
    54875504        } 
    5488       else if (LocaleCompare((char *) tag,"rotate") == 0) 
     5505      else if (LocaleCompare((const char *) tag,"rotate") == 0) 
    54895506      { 
    54905507        /* init the values */ 
     
    54935510        if (msl_info->image[n] == (Image *) NULL) 
    54945511        { 
    5495           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     5512          ThrowMSLException(OptionError,"NoImagesDefined", 
     5513            (const char *) tag); 
    54965514          break; 
    54975515        } 
     
    55025520        keyword=(const char *) attributes[i++]; 
    55035521        CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    5504           msl_info->attributes[n],(char *) attributes[i])); 
     5522          msl_info->attributes[n],(const char *) attributes[i])); 
    55055523        switch (*keyword) 
    55065524        { 
     
    55455563    case 's': 
    55465564    { 
    5547       if (LocaleCompare((char *) tag,"sample") == 0) 
     5565      if (LocaleCompare((const char *) tag,"sample") == 0) 
    55485566        { 
    55495567          Image 
     
    55555573          if (msl_info->image[n] == (Image *) NULL) 
    55565574            { 
    5557               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     5575              ThrowMSLException(OptionError,"NoImagesDefined", 
     5576                (const char *) tag); 
    55585577              break; 
    55595578            } 
     
    55635582              keyword=(const char *) attributes[i++]; 
    55645583              attribute=InterpretImageProperties(msl_info->image_info[n], 
    5565                 msl_info->attributes[n],(char *) attributes[i]); 
     5584                msl_info->attributes[n],(const char *) attributes[i]); 
    55665585              CloneString(&value,attribute); 
    55675586              switch (*keyword) 
     
    56205639          break; 
    56215640        } 
    5622       if (LocaleCompare((char *) tag,"scale") == 0) 
     5641      if (LocaleCompare((const char *) tag,"scale") == 0) 
    56235642        { 
    56245643          Image 
     
    56305649          if (msl_info->image[n] == (Image *) NULL) 
    56315650            { 
    5632               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     5651              ThrowMSLException(OptionError,"NoImagesDefined", 
     5652                (const char *) tag); 
    56335653              break; 
    56345654            } 
     
    56385658              keyword=(const char *) attributes[i++]; 
    56395659              attribute=InterpretImageProperties(msl_info->image_info[n], 
    5640                 msl_info->attributes[n],(char *) attributes[i]); 
     5660                msl_info->attributes[n],(const char *) attributes[i]); 
    56415661              CloneString(&value,attribute); 
    56425662              switch (*keyword) 
     
    56955715          break; 
    56965716        } 
    5697       if (LocaleCompare((char *) tag,"segment") == 0) 
     5717      if (LocaleCompare((const char *) tag,"segment") == 0) 
    56985718        { 
    56995719          ColorspaceType 
     
    57025722          MagickBooleanType 
    57035723            verbose; 
    5704              
     5724 
    57055725          /* 
    57065726            Segment image. 
     
    57085728          if (msl_info->image[n] == (Image *) NULL) 
    57095729            { 
    5710               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     5730              ThrowMSLException(OptionError,"NoImagesDefined", 
     5731                (const char *) tag); 
    57115732              break; 
    57125733            } 
     
    57205741              keyword=(const char *) attributes[i++]; 
    57215742              attribute=InterpretImageProperties(msl_info->image_info[n], 
    5722                 msl_info->attributes[n],(char *) attributes[i]); 
     5743                msl_info->attributes[n],(const char *) attributes[i]); 
    57235744              CloneString(&value,attribute); 
    57245745              switch (*keyword) 
     
    57845805          break; 
    57855806        } 
    5786       else if (LocaleCompare((char *) tag, "set") == 0) 
     5807      else if (LocaleCompare((const char *) tag, "set") == 0) 
    57875808      { 
    57885809        if (msl_info->image[n] == (Image *) NULL) 
    57895810        { 
    5790           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     5811          ThrowMSLException(OptionError,"NoImagesDefined", 
     5812            (const char *) tag); 
    57915813          break; 
    57925814        } 
     
    57985820          keyword=(const char *) attributes[i++]; 
    57995821          CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    5800             msl_info->attributes[n],(char *) attributes[i])); 
     5822            msl_info->attributes[n],(const char *) attributes[i])); 
    58015823          switch (*keyword) 
    58025824          { 
     
    59775999        break; 
    59786000      } 
    5979       if (LocaleCompare((char *) tag,"shade") == 0) 
     6001      if (LocaleCompare((const char *) tag,"shade") == 0) 
    59806002        { 
    59816003          Image 
     
    59906012          if (msl_info->image[n] == (Image *) NULL) 
    59916013            { 
    5992               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     6014              ThrowMSLException(OptionError,"NoImagesDefined", 
     6015                (const char *) tag); 
    59936016              break; 
    59946017            } 
     
    59996022              keyword=(const char *) attributes[i++]; 
    60006023              attribute=InterpretImageProperties(msl_info->image_info[n], 
    6001                 msl_info->attributes[n],(char *) attributes[i]); 
     6024                msl_info->attributes[n],(const char *) attributes[i]); 
    60026025              CloneString(&value,attribute); 
    60036026              switch (*keyword) 
     
    60676090          break; 
    60686091        } 
    6069       if (LocaleCompare((char *) tag,"shadow") == 0) 
     6092      if (LocaleCompare((const char *) tag,"shadow") == 0) 
    60706093        { 
    60716094          Image 
     
    60776100          if (msl_info->image[n] == (Image *) NULL) 
    60786101            { 
    6079               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     6102              ThrowMSLException(OptionError,"NoImagesDefined", 
     6103                (const char *) tag); 
    60806104              break; 
    60816105            } 
     
    60856109              keyword=(const char *) attributes[i++]; 
    60866110              attribute=InterpretImageProperties(msl_info->image_info[n], 
    6087                 msl_info->attributes[n],(char *) attributes[i]); 
     6111                msl_info->attributes[n],(const char *) attributes[i]); 
    60886112              CloneString(&value,attribute); 
    60896113              switch (*keyword) 
     
    61666190          break; 
    61676191        } 
    6168       if (LocaleCompare((char *) tag,"sharpen") == 0) 
     6192      if (LocaleCompare((const char *) tag,"sharpen") == 0) 
    61696193      { 
    61706194        double  radius = 0.0, 
     
    61726196 
    61736197        if (msl_info->image[n] == (Image *) NULL) 
    6174         { 
    6175           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
    6176           break; 
    6177         } 
     6198          { 
     6199            ThrowMSLException(OptionError,"NoImagesDefined", 
     6200              (const char *) tag); 
     6201            break; 
     6202          } 
    61786203        /* 
    61796204        NOTE: sharpen can have no attributes, since we use all the defaults! 
     
    61856210          keyword=(const char *) attributes[i++]; 
    61866211          CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    6187             msl_info->attributes[n],(char *) attributes[i])); 
     6212            msl_info->attributes[n],(const char *) attributes[i])); 
    61886213          switch (*keyword) 
    61896214          { 
     
    62346259        } 
    62356260      } 
    6236       else if (LocaleCompare((char *) tag,"shave") == 0) 
     6261      else if (LocaleCompare((const char *) tag,"shave") == 0) 
    62376262      { 
    62386263        /* init the values */ 
     
    62426267        if (msl_info->image[n] == (Image *) NULL) 
    62436268        { 
    6244           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     6269          ThrowMSLException(OptionError,"NoImagesDefined", 
     6270            (const char *) tag); 
    62456271          break; 
    62466272        } 
     
    62516277        keyword=(const char *) attributes[i++]; 
    62526278        CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    6253           msl_info->attributes[n],(char *) attributes[i])); 
     6279          msl_info->attributes[n],(const char *) attributes[i])); 
    62546280        switch (*keyword) 
    62556281        { 
     
    63206346        break; 
    63216347      } 
    6322       if (LocaleCompare((char *) tag,"shear") == 0) 
     6348      if (LocaleCompare((const char *) tag,"shear") == 0) 
    63236349        { 
    63246350          Image 
     
    63306356          if (msl_info->image[n] == (Image *) NULL) 
    63316357            { 
    6332               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     6358              ThrowMSLException(OptionError,"NoImagesDefined", 
     6359                (const char *) tag); 
    63336360              break; 
    63346361            } 
     
    63386365              keyword=(const char *) attributes[i++]; 
    63396366              attribute=InterpretImageProperties(msl_info->image_info[n], 
    6340                 msl_info->attributes[n],(char *) attributes[i]); 
     6367                msl_info->attributes[n],(const char *) attributes[i]); 
    63416368              CloneString(&value,attribute); 
    63426369              switch (*keyword) 
     
    64096436          break; 
    64106437        } 
    6411       if (LocaleCompare((char *) tag,"signature") == 0) 
     6438      if (LocaleCompare((const char *) tag,"signature") == 0) 
    64126439        { 
    64136440          /* 
     
    64166443          if (msl_info->image[n] == (Image *) NULL) 
    64176444            { 
    6418               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     6445              ThrowMSLException(OptionError,"NoImagesDefined", 
     6446                (const char *) tag); 
    64196447              break; 
    64206448            } 
     
    64246452              keyword=(const char *) attributes[i++]; 
    64256453              attribute=InterpretImageProperties(msl_info->image_info[n], 
    6426                 msl_info->attributes[n],(char *) attributes[i]); 
     6454                msl_info->attributes[n],(const char *) attributes[i]); 
    64276455              CloneString(&value,attribute); 
    64286456              switch (*keyword) 
     
    64396467          break; 
    64406468        } 
    6441       if (LocaleCompare((char *) tag,"solarize") == 0) 
     6469      if (LocaleCompare((const char *) tag,"solarize") == 0) 
    64426470        { 
    64436471          /* 
     
    64466474          if (msl_info->image[n] == (Image *) NULL) 
    64476475            { 
    6448               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     6476              ThrowMSLException(OptionError,"NoImagesDefined", 
     6477                (const char *) tag); 
    64496478              break; 
    64506479            } 
     
    64556484              keyword=(const char *) attributes[i++]; 
    64566485              attribute=InterpretImageProperties(msl_info->image_info[n], 
    6457                 msl_info->attributes[n],(char *) attributes[i]); 
     6486                msl_info->attributes[n],(const char *) attributes[i]); 
    64586487              CloneString(&value,attribute); 
    64596488              switch (*keyword) 
     
    64946523          break; 
    64956524        } 
    6496       if (LocaleCompare((char *) tag,"spread") == 0) 
     6525      if (LocaleCompare((const char *) tag,"spread") == 0) 
    64976526        { 
    64986527          Image 
     
    65046533          if (msl_info->image[n] == (Image *) NULL) 
    65056534            { 
    6506               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     6535              ThrowMSLException(OptionError,"NoImagesDefined", 
     6536                (const char *) tag); 
    65076537              break; 
    65086538            } 
     
    65126542              keyword=(const char *) attributes[i++]; 
    65136543              attribute=InterpretImageProperties(msl_info->image_info[n], 
    6514                 msl_info->attributes[n],(char *) attributes[i]); 
     6544                msl_info->attributes[n],(const char *) attributes[i]); 
    65156545              CloneString(&value,attribute); 
    65166546              switch (*keyword) 
     
    65586588          break; 
    65596589        } 
    6560       else if (LocaleCompare((char *) tag,"stegano") == 0) 
     6590      else if (LocaleCompare((const char *) tag,"stegano") == 0) 
    65616591      { 
    65626592        Image * 
     
    65646594 
    65656595        if (msl_info->image[n] == (Image *) NULL) 
    6566         { 
    6567           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
    6568           break; 
    6569         } 
     6596          { 
     6597            ThrowMSLException(OptionError,"NoImagesDefined", 
     6598              (const char *) tag); 
     6599            break; 
     6600          } 
    65706601        if (attributes == (const xmlChar **) NULL) 
    65716602        break; 
     
    65746605        keyword=(const char *) attributes[i++]; 
    65756606        CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    6576           msl_info->attributes[n],(char *) attributes[i])); 
     6607          msl_info->attributes[n],(const char *) attributes[i])); 
    65776608        switch (*keyword) 
    65786609        { 
     
    66226653          ThrowMSLException(OptionError,"MissingWatermarkImage",keyword); 
    66236654      } 
    6624       else if (LocaleCompare((char *) tag,"stereo") == 0) 
     6655      else if (LocaleCompare((const char *) tag,"stereo") == 0) 
    66256656      { 
    66266657        Image * 
     
    66286659 
    66296660        if (msl_info->image[n] == (Image *) NULL) 
    6630         { 
    6631           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
    6632           break; 
    6633         } 
     6661          { 
     6662            ThrowMSLException(OptionError,"NoImagesDefined",(const char *) tag); 
     6663            break; 
     6664          } 
    66346665        if (attributes == (const xmlChar **) NULL) 
    66356666        break; 
     
    66386669        keyword=(const char *) attributes[i++]; 
    66396670        CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    6640           msl_info->attributes[n],(char *) attributes[i])); 
     6671          msl_info->attributes[n],(const char *) attributes[i])); 
    66416672        switch (*keyword) 
    66426673        { 
     
    66866717          ThrowMSLException(OptionError,"Missing stereo image",keyword); 
    66876718      } 
    6688       if (LocaleCompare((char *) tag,"swap") == 0) 
     6719      if (LocaleCompare((const char *) tag,"swap") == 0) 
    66896720        { 
    66906721          Image 
     
    66996730          if (msl_info->image[n] == (Image *) NULL) 
    67006731            { 
    6701               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     6732              ThrowMSLException(OptionError,"NoImagesDefined", 
     6733                (const char *) tag); 
    67026734              break; 
    67036735            } 
     
    67096741              keyword=(const char *) attributes[i++]; 
    67106742              attribute=InterpretImageProperties(msl_info->image_info[n], 
    6711                 msl_info->attributes[n],(char *) attributes[i]); 
     6743                msl_info->attributes[n],(const char *) attributes[i]); 
    67126744              CloneString(&value,attribute); 
    67136745              switch (*keyword) 
     
    67436775          if ((p == (Image *) NULL) || (q == (Image *) NULL)) 
    67446776            { 
    6745               ThrowMSLException(OptionError,"NoSuchImage",(char *) tag); 
     6777              ThrowMSLException(OptionError,"NoSuchImage",(const char *) tag); 
    67466778              break; 
    67476779            } 
     
    67526784          break; 
    67536785        } 
    6754       if (LocaleCompare((char *) tag,"swirl") == 0) 
     6786      if (LocaleCompare((const char *) tag,"swirl") == 0) 
    67556787        { 
    67566788          Image 
     
    67626794          if (msl_info->image[n] == (Image *) NULL) 
    67636795            { 
    6764               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     6796              ThrowMSLException(OptionError,"NoImagesDefined", 
     6797                (const char *) tag); 
    67656798              break; 
    67666799            } 
     
    67706803              keyword=(const char *) attributes[i++]; 
    67716804              attribute=InterpretImageProperties(msl_info->image_info[n], 
    6772                 msl_info->attributes[n],(char *) attributes[i]); 
     6805                msl_info->attributes[n],(const char *) attributes[i]); 
    67736806              CloneString(&value,attribute); 
    67746807              switch (*keyword) 
     
    68166849          break; 
    68176850        } 
    6818       if (LocaleCompare((char *) tag,"sync") == 0) 
     6851      if (LocaleCompare((const char *) tag,"sync") == 0) 
    68196852        { 
    68206853          /* 
     
    68236856          if (msl_info->image[n] == (Image *) NULL) 
    68246857            { 
    6825               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     6858              ThrowMSLException(OptionError,"NoImagesDefined", 
     6859                (const char *) tag); 
    68266860              break; 
    68276861            } 
     
    68316865              keyword=(const char *) attributes[i++]; 
    68326866              attribute=InterpretImageProperties(msl_info->image_info[n], 
    6833                 msl_info->attributes[n],(char *) attributes[i]); 
     6867                msl_info->attributes[n],(const char *) attributes[i]); 
    68346868              CloneString(&value,attribute); 
    68356869              switch (*keyword) 
     
    68516885    case 't': 
    68526886    { 
    6853       if (LocaleCompare((char *) tag,"map") == 0) 
     6887      if (LocaleCompare((const char *) tag,"map") == 0) 
    68546888        { 
    68556889          Image 
     
    68616895          if (msl_info->image[n] == (Image *) NULL) 
    68626896            { 
    6863               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     6897              ThrowMSLException(OptionError,"NoImagesDefined", 
     6898                (const char *) tag); 
    68646899              break; 
    68656900            } 
     
    68706905              keyword=(const char *) attributes[i++]; 
    68716906              attribute=InterpretImageProperties(msl_info->image_info[n], 
    6872                 msl_info->attributes[n],(char *) attributes[i]); 
     6907                msl_info->attributes[n],(const char *) attributes[i]); 
    68736908              CloneString(&value,attribute); 
    68746909              switch (*keyword) 
     
    68826917                      const char 
    68836918                        *attribute; 
    6884      
     6919 
    68856920                      attribute=GetImageProperty(msl_info->attributes[j],"id"); 
    68866921                      if ((attribute != (const char *) NULL)  && 
     
    69066941          break; 
    69076942        } 
    6908       else if (LocaleCompare((char *) tag,"threshold") == 0) 
     6943      else if (LocaleCompare((const char *) tag,"threshold") == 0) 
    69096944      { 
    69106945        /* init the values */ 
     
    69126947 
    69136948        if (msl_info->image[n] == (Image *) NULL) 
    6914         { 
    6915           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
    6916           break; 
    6917         } 
     6949          { 
     6950            ThrowMSLException(OptionError,"NoImagesDefined",(const char *) tag); 
     6951            break; 
     6952          } 
    69186953        if (attributes == (const xmlChar **) NULL) 
    69196954        break; 
     
    69226957        keyword=(const char *) attributes[i++]; 
    69236958        CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    6924           msl_info->attributes[n],(char *) attributes[i])); 
     6959          msl_info->attributes[n],(const char *) attributes[i])); 
    69256960        switch (*keyword) 
    69266961        { 
     
    69546989        } 
    69556990      } 
    6956       else if (LocaleCompare((char *) tag, "transparent") == 0) 
     6991      else if (LocaleCompare((const char *) tag, "transparent") == 0) 
    69576992      { 
    69586993        if (msl_info->image[n] == (Image *) NULL) 
    6959         { 
    6960           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
    6961           break; 
    6962         } 
     6994          { 
     6995            ThrowMSLException(OptionError,"NoImagesDefined",(const char *) tag); 
     6996            break; 
     6997          } 
    69636998        if (attributes == (const xmlChar **) NULL) 
    69646999          break; 
     
    69677002          keyword=(const char *) attributes[i++]; 
    69687003          CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    6969                 msl_info->attributes[n],(char *) attributes[i])); 
     7004            msl_info->attributes[n],(const char *) attributes[i])); 
    69707005          switch (*keyword) 
    69717006          { 
     
    69957030        break; 
    69967031      } 
    6997       else if (LocaleCompare((char *) tag, "trim") == 0) 
     7032      else if (LocaleCompare((const char *) tag, "trim") == 0) 
    69987033      { 
    69997034        if (msl_info->image[n] == (Image *) NULL) 
    7000         { 
    7001           ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
    7002           break; 
    7003         } 
     7035          { 
     7036            ThrowMSLException(OptionError,"NoImagesDefined",(const char *) tag); 
     7037            break; 
     7038          } 
    70047039 
    70057040        /* no attributes here */ 
     
    70297064    case 'w': 
    70307065    { 
    7031       if (LocaleCompare((char *) tag,"write") == 0) 
     7066      if (LocaleCompare((const char *) tag,"write") == 0) 
    70327067        { 
    70337068          if (msl_info->image[n] == (Image *) NULL) 
    70347069            { 
    7035               ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 
     7070              ThrowMSLException(OptionError,"NoImagesDefined", 
     7071                (const char *) tag); 
    70367072              break; 
    70377073            } 
     
    70427078            keyword=(const char *) attributes[i++]; 
    70437079            CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
    7044               msl_info->attributes[n],(char *) attributes[i])); 
     7080              msl_info->attributes[n],(const char *) attributes[i])); 
    70457081            switch (*keyword) 
    70467082            { 
     
    71157151    case 'c': 
    71167152    { 
    7117       if (LocaleCompare((char *) tag,"comment") == 0 ) 
     7153      if (LocaleCompare((const char *) tag,"comment") == 0 ) 
    71187154        { 
    71197155          (void) DeleteImageProperty(msl_info->image[n],"comment"); 
     
    71307166    case 'g': 
    71317167    { 
    7132       if (LocaleCompare((char *) tag, "group") == 0 ) 
     7168      if (LocaleCompare((const char *) tag, "group") == 0 ) 
    71337169      { 
    71347170        if (msl_info->group_info[msl_info->number_groups-1].numImages > 0 ) 
     
    71527188    case 'i': 
    71537189    { 
    7154       if (LocaleCompare((char *) tag, "image") == 0) 
     7190      if (LocaleCompare((const char *) tag, "image") == 0) 
    71557191        MSLPopImage(msl_info); 
    71567192       break; 
     
    71597195    case 'l': 
    71607196    { 
    7161       if (LocaleCompare((char *) tag,"label") == 0 ) 
     7197      if (LocaleCompare((const char *) tag,"label") == 0 ) 
    71627198        { 
    71637199          (void) DeleteImageProperty(msl_info->image[n],"label"); 
     
    71747210    case 'm': 
    71757211    { 
    7176       if (LocaleCompare((char *) tag, "msl") == 0 ) 
     7212      if (LocaleCompare((const char *) tag, "msl") == 0 ) 
    71777213      { 
    71787214        /* 
     
    73977433  (void) LogMagickEvent(CoderEvent,GetMagickModule(), 
    73987434    "  SAX.externalSubset(%s %s %s)",name, 
    7399     (external_id != (const xmlChar *) NULL ? (char *) external_id : " "), 
    7400     (system_id != (const xmlChar *) NULL ? (char *) system_id : " ")); 
     7435    (external_id != (const xmlChar *) NULL ? (const char *) external_id : " "), 
     7436    (system_id != (const xmlChar *) NULL ? (const char *) system_id : " ")); 
    74017437  msl_info=(MSLInfo *) context; 
    74027438  parser=msl_info->parser; 
     
    76417677%                                                                             % 
    76427678%                                                                             % 
     7679%   S e t M S L A t t r i b u t e s                                           % 
     7680%                                                                             % 
     7681%                                                                             % 
     7682%                                                                             % 
     7683%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     7684% 
     7685%  SetMSLAttributes() ... 
     7686% 
     7687%  The format of the SetMSLAttributes method is: 
     7688% 
     7689%      MagickBooleanType SetMSLAttributes(MSLInfo *msl_info, 
     7690%        const xmlChar **attributes) 
     7691% 
     7692%  A description of each parameter follows: 
     7693% 
     7694%    o msl_info: the MSL info. 
     7695% 
     7696%    o attributes: the attribute list. 
     7697% 
     7698*/ 
     7699static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info, 
     7700  const xmlChar **attributes) 
     7701{ 
     7702  char 
     7703    *value; 
     7704 
     7705  const char 
     7706    *keyword; 
     7707 
     7708  ExceptionInfo 
     7709    *exception; 
     7710 
     7711  long 
     7712    n; 
     7713 
     7714  register long 
     7715    i; 
     7716 
     7717  assert(msl_info != (MSLInfo *) NULL); 
     7718  assert(exception != (ExceptionInfo *) NULL); 
     7719  if (attributes == (const xmlChar **) NULL) 
     7720    return(MagickTrue); 
     7721  exception=msl_info->exception; 
     7722  n=msl_info->n; 
     7723  for (i=0; (attributes[i] != (const xmlChar *) NULL); i++) 
     7724  { 
     7725    keyword=(const char *) attributes[i++]; 
     7726    CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 
     7727      msl_info->attributes[n],(const char *) attributes[i])); 
     7728    switch (*keyword) 
     7729    { 
     7730      case 'B': 
     7731      case 'b': 
     7732      { 
     7733        if (LocaleCompare(keyword,"background") == 0) 
     7734          { 
     7735            (void) QueryColorDatabase(value, 
     7736              &msl_info->image_info[n]->background_color,exception); 
     7737            break; 
     7738          } 
     7739        ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
     7740        break; 
     7741      } 
     7742      case 'F': 
     7743      case 'f': 
     7744      { 
     7745        if (LocaleCompare(keyword,"fill") == 0) 
     7746          { 
     7747            (void) QueryColorDatabase(value,&msl_info->draw_info[n]->fill, 
     7748              exception); 
     7749            break; 
     7750          } 
     7751        ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
     7752        break; 
     7753      } 
     7754      case 'I': 
     7755      case 'i': 
     7756      { 
     7757        if (LocaleCompare(keyword,"id") == 0) 
     7758          { 
     7759            (void) SetImageProperty(msl_info->attributes[n],keyword,NULL); 
     7760            (void) SetImageProperty(msl_info->attributes[n],keyword,value); 
     7761            break; 
     7762          } 
     7763        ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
     7764        break; 
     7765      } 
     7766      case 'S': 
     7767      case 's': 
     7768      { 
     7769        if (LocaleCompare(keyword,"size") == 0) 
     7770          { 
     7771            CloneString(&msl_info->image_info[n]->size,value); 
     7772            break; 
     7773          } 
     7774        ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 
     7775        break; 
     7776      } 
     7777      default: 
     7778        break; 
     7779    } 
     7780  } 
     7781  return(MagickTrue); 
     7782} 
     7783 
     7784/* 
     7785%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
     7786%                                                                             % 
     7787%                                                                             % 
     7788%                                                                             % 
    76437789%   U n r e g i s t e r M S L I m a g e                                       % 
    76447790%                                                                             %