]> granicus.if.org Git - imagemagick/blobdiff - utilities/mogrify.c
(no commit message)
[imagemagick] / utilities / mogrify.c
index cb547a65277973961cb7cbb81060a4c5f271cdab..2f49ac183c7774c0cd39842e6b4bff72cb5196ff 100644 (file)
@@ -17,7 +17,7 @@
 %                            December 1992                                    %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2013 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  %
@@ -43,8 +43,8 @@
 /*
   Include declarations.
 */
-#include "wand/studio.h"
-#include "wand/MagickWand.h"
+#include "MagickWand/studio.h"
+#include "MagickWand/MagickWand.h"
 \f
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -59,7 +59,8 @@
 %
 %
 */
-int main(int argc,char **argv)
+
+static int MogrifyMain(int argc,char **argv)
 {
   ExceptionInfo
     *exception;
@@ -80,3 +81,29 @@ int main(int argc,char **argv)
   MagickCoreTerminus();
   return(status);
 }
+
+#if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__)
+int main(int argc,char **argv)
+{
+  return(MogrifyMain(argc,argv));
+}
+#else
+int wmain(int argc,wchar_t *argv[])
+{
+  char
+    **utf8;
+
+  int
+    status;
+
+  register int
+    i;
+
+  utf8=NTArgvToUTF8(argc,argv);
+  status=MogrifyMain(argc,utf8);
+  for (i=0; i < argc; i++)
+    utf8[i]=DestroyString(utf8[i]);
+  utf8=(char **) RelinquishMagickMemory(utf8);
+  return(status);
+}
+#endif