]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/utility.c
(no commit message)
[imagemagick] / MagickCore / utility.c
index 7183bd7030106862d99c233bfae37544bbb13436..57f35b38393e3711027ea09ed55198344aa082a2 100644 (file)
@@ -17,7 +17,7 @@
 %                              January 1993                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -50,6 +50,7 @@
 #include "MagickCore/log.h"
 #include "MagickCore/magick-private.h"
 #include "MagickCore/memory_.h"
+#include "MagickCore/nt-base-private.h"
 #include "MagickCore/option.h"
 #include "MagickCore/policy.h"
 #include "MagickCore/resource_.h"
@@ -767,6 +768,7 @@ MagickExport MagickBooleanType ExpandFilenames(int *number_arguments,
     GetPathComponent(option,MagickPath,magick);
     if ((LocaleCompare(magick,"CAPTION") == 0) ||
         (LocaleCompare(magick,"LABEL") == 0) ||
+        (LocaleCompare(magick,"PANGO") == 0) ||
         (LocaleCompare(magick,"VID") == 0))
       continue;
     if ((IsGlob(filename) == MagickFalse) && (*filename != '@'))
@@ -1452,47 +1454,6 @@ static int IsPathDirectory(const char *path)
 %                                                                             %
 %                                                                             %
 %                                                                             %
-%   I s M a g i c k T r u e                                                   %
-%                                                                             %
-%                                                                             %
-%                                                                             %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-%  IsMagickTrue() returns MagickTrue if the value is "true", "on", "yes" or
-%  "1".
-%
-%  The format of the IsMagickTrue method is:
-%
-%      MagickBooleanType IsMagickTrue(const char *value)
-%
-%  A description of each parameter follows:
-%
-%    o option: either MagickTrue or MagickFalse depending on the value
-%      parameter.
-%
-%    o value: Specifies a pointer to a character array.
-%
-*/
-MagickExport MagickBooleanType IsMagickTrue(const char *value)
-{
-  if (value == (const char *) NULL)
-    return(MagickFalse);
-  if (LocaleCompare(value,"true") == 0)
-    return(MagickTrue);
-  if (LocaleCompare(value,"on") == 0)
-    return(MagickTrue);
-  if (LocaleCompare(value,"yes") == 0)
-    return(MagickTrue);
-  if (LocaleCompare(value,"1") == 0)
-    return(MagickTrue);
-  return(MagickFalse);
-}
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%                                                                             %
-%                                                                             %
-%                                                                             %
 %   L i s t F i l e s                                                         %
 %                                                                             %
 %                                                                             %
@@ -1842,7 +1803,8 @@ MagickExport int SystemCommand(const MagickBooleanType asynchronous,
 #if !defined(MAGICKCORE_HAVE_EXECVP)
   status=system(shell_command);
 #else
-  if ((asynchronous != MagickFalse) || (strspn(shell_command,"&;<>|") == 0))
+  if ((asynchronous != MagickFalse) ||
+      (strpbrk(shell_command,"&;<>|") != (char *) NULL))
     status=system(shell_command);
   else
     {
@@ -1852,7 +1814,7 @@ MagickExport int SystemCommand(const MagickBooleanType asynchronous,
       /*
         Call application directly rather than from a shell.
       */
-      child_pid=fork();
+      child_pid=(pid_t) fork();
       if (child_pid == (pid_t) -1)
         status=system(command);
       else
@@ -1870,7 +1832,7 @@ MagickExport int SystemCommand(const MagickBooleanType asynchronous,
               pid;
 
             child_status=0;
-            pid=waitpid(child_pid,&child_status,0);
+            pid=(pid_t) waitpid(child_pid,&child_status,0);
             if (pid == -1)
               status=(-1);
             else
@@ -1885,15 +1847,7 @@ MagickExport int SystemCommand(const MagickBooleanType asynchronous,
     }
 #endif
 #elif defined(MAGICKCORE_WINDOWS_SUPPORT)
-  {
-    int
-      mode;
-
-    mode=_P_WAIT;
-    if (asynchronous != MagickFalse)
-      mode=_P_NOWAIT;
-    status=spawnvp(mode,arguments[1],(const char **) (arguments+1));
-  }
+  status=NTSystemCommand(shell_command);
 #elif defined(macintosh)
   status=MACSystemCommand(shell_command);
 #elif defined(vms)