]> granicus.if.org Git - imagemagick/commitdiff
Renamed IsStringNotFalse to IsStringFalse and changed the implementation.
authordirk <dirk@git.imagemagick.org>
Sat, 25 Jul 2015 16:51:01 +0000 (16:51 +0000)
committerdirk <dirk@git.imagemagick.org>
Sat, 25 Jul 2015 16:51:01 +0000 (16:51 +0000)
MagickCore/magick-type.h
MagickCore/string.c
MagickCore/string_.h
MagickWand/mogrify.c
MagickWand/operation.c
coders/tiff.c

index 0def0727c8e752e24de600d487d1bd7af8402764..da553bd3de5d68f3704986f7a5c9e05f66380157 100644 (file)
@@ -180,7 +180,6 @@ typedef enum
 #  define IsMagickNot(v)   (IfMagickTrue(v)?MagickFalse:MagickTrue)
 #endif
 #define IfStringTrue(v)       IfMagickTrue(IsStringTrue(v))
-#define IfStringNotFalse(v)   IfMagickTrue(IsStringNotFalse(v))
 #define IsMagickNULL(v)       (((void *)(v) == NULL)?MagickTrue:MagickFalse)
 #define IsMagickNotNULL(v)    (((void *)(v) != NULL)?MagickTrue:MagickFalse)
 
index 0160c0413644621531eec89f557fadfada885ae1..b82fa841847c1b1f48f4cf7385dba3576d476a84 100644 (file)
@@ -1469,41 +1469,40 @@ MagickExport MagickBooleanType IsStringTrue(const char *value)
 %                                                                             %
 %                                                                             %
 %                                                                             %
-%   I s S t r i n g N o t F a l s e                                           %
+%   I s S t r i n g F a l s e                                                 %
 %                                                                             %
 %                                                                             %
 %                                                                             %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-%  IsStringNotFalse() returns MagickTrue, unless the string specifically
-%  has a value that makes this false.  that is if it has a value of
-%  "false", "off", "no" or "0".
+%  IsStringFalse() returns MagickTrue if the value is "false", "off", "no" or
+%  "0". Any other string or undefined returns MagickFalse.
 %
 %  Typically this is used to look at strings (options or artifacts) which
 %  has a default value of "true", when it has not been defined.
 %
-%  The format of the IsStringNotFalse method is:
+%  The format of the IsStringFalse method is:
 %
-%      MagickBooleanType IsStringNotFalse(const char *value)
+%      MagickBooleanType IsStringFalse(const char *value)
 %
 %  A description of each parameter follows:
 %
 %    o value: Specifies a pointer to a character array.
 %
 */
-MagickExport MagickBooleanType IsStringNotFalse(const char *value)
+MagickExport MagickBooleanType IsStringFalse(const char *value)
 {
   if (value == (const char *) NULL)
-    return(MagickTrue);
-  if (LocaleCompare(value,"false") == 0)
     return(MagickFalse);
+  if (LocaleCompare(value,"false") == 0)
+    return(MagickTrue);
   if (LocaleCompare(value,"off") == 0)
-    return(MagickFalse);
+    return(MagickTrue);
   if (LocaleCompare(value,"no") == 0)
-    return(MagickFalse);
+    return(MagickTrue);
   if (LocaleCompare(value,"0") == 0)
-    return(MagickFalse);
-  return(MagickTrue);
+    return(MagickTrue);
+  return(MagickFalse);
 }
 \f
 /*
index 921718797ffa3b005fbb3a4d83088c9d915fda33..18bc6e5991c07233282ff81eb53398d46346b0b7 100644 (file)
@@ -67,7 +67,7 @@ extern MagickExport int
 extern MagickExport MagickBooleanType
   ConcatenateString(char **,const char *),
   IsStringTrue(const char *),
-  IsStringNotFalse(const char *),
+  IsStringFalse(const char *),
   SubstituteString(char **,const char *,const char *);
 
 extern MagickExport size_t
index 8003e154d5da93c35285741a3377188fdfd0a321..7a449893310b0cf73a4475fe0a290e094ed92bd0 100644 (file)
@@ -7797,10 +7797,9 @@ WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,
             else
               clip_to_self=IsStringTrue(GetImageOption(mogrify_info,
                 "compose:clip-to-self")); /* if this is true */
-            if (IsMagickFalse(clip_to_self)) /* or */
-              clip_to_self=IfMagickFalse(IsStringNotFalse(GetImageOption(
-                mogrify_info,"compose:outside-overlay"))) ? MagickTrue :
-                MagickFalse; /* this false */
+            if (clip_to_self == MagickFalse) /* or */
+              clip_to_self=IsStringFalse(GetImageOption(mogrify_info,
+                "compose:outside-overlay"));
             image=RemoveFirstImageFromList(images);
             composite_image=RemoveFirstImageFromList(images);
             if (composite_image == (Image *) NULL)
index 76b3da60f47a717e3beddba76a5623af69bcbcf9..fc8dd30ccaf65a02c423b29cad3c3f9e3f311574 100644 (file)
@@ -3823,7 +3823,7 @@ WandPrivate MagickBooleanType CLIListOperatorImages(MagickCLI *cli_wand,
           value=GetImageOption(_image_info,"compose:outside-overlay");
           if (value != (const char *) NULL) {   /* or this false */
             /* FUTURE: depreciate warning for "compose:outside-overlay"*/
-            clip_to_self= IsMagickFalse(IsStringNotFalse(value));
+            clip_to_self=IsStringFalse(value);
           }
 
           new_images=RemoveFirstImageFromList(&_images);
index 468b9ee01f3cbb7beb142868337df429226b3cde..b39db42ee9249ff09e33e9b807a4974561d33339 100644 (file)
@@ -1281,7 +1281,7 @@ RestoreMSCWarning
     TIFFGetProfiles(tiff,image,image_info->ping,exception);
     TIFFGetProperties(tiff,image,exception);
     option=GetImageOption(image_info,"tiff:exif-properties");
-    if (IfMagickTrue(IsStringNotFalse(option))) /* enabled by default */
+    if (IsStringFalse(option) == MagickFalse) /* enabled by default */
       TIFFGetEXIFProperties(tiff,image,exception);
     (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_SAMPLESPERPIXEL,
       &samples_per_pixel);