]> granicus.if.org Git - imagemagick/blobdiff - coders/url.c
(no commit message)
[imagemagick] / coders / url.c
index 8873b5cb5a1e881add4e445418197d92cf31b833..3c3031a945d85ff982c64de3bc7299ff0d81864b 100644 (file)
 %                        Retrieve An Image Via URL.                           %
 %                                                                             %
 %                              Software Design                                %
-%                                John Cristy                                  %
+%                                   Cristy                                    %
 %                              Bill Radcliffe                                 %
 %                                March 2000                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2014 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  %
@@ -70,9 +70,9 @@
 #  include <libxml/nanoftp.h>
 #  include <libxml/nanohttp.h>
 #endif
-#if defined(MAGICKCORE_WINDOWS_SUPPORT) && \\r
-    !(defined(__MINGW32__) || defined(__MINGW64__))\r
-#  include <urlmon.h>\r
+#if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
+    !(defined(__MINGW32__) || defined(__MINGW64__))
+#  include <urlmon.h>
 #endif
 
 /*
@@ -173,17 +173,17 @@ static Image *ReadURLImage(const ImageInfo *image_info,ExceptionInfo *exception)
       (void) CopyMagickString(read_info->filename,image_info->filename+2,
         MaxTextExtent);
     }
-#if defined(MAGICKCORE_WINDOWS_SUPPORT) && \\r
-    !(defined(__MINGW32__) || defined(__MINGW64__))\r
-  (void) fclose(file);\r
-  if (URLDownloadToFile(NULL,filename,read_info->filename,NULL,NULL) != S_OK)\r
-    {\r
-      ThrowFileException(exception,FileOpenError,"UnableToOpenFile",\r
-        filename);\r
-      (void) RelinquishUniqueFileResource(read_info->filename);\r
-      read_info=DestroyImageInfo(read_info);\r
-      return((Image *) NULL);\r
-    }\r
+#if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
+    !(defined(__MINGW32__) || defined(__MINGW64__))
+  (void) fclose(file);
+  if (URLDownloadToFile(NULL,filename,read_info->filename,0,NULL) != S_OK)
+    {
+      ThrowFileException(exception,FileOpenError,"UnableToOpenFile",
+        filename);
+      (void) RelinquishUniqueFileResource(read_info->filename);
+      read_info=DestroyImageInfo(read_info);
+      return((Image *) NULL);
+    }
 #else
 #if defined(MAGICKCORE_XML_DELEGATE) && defined(LIBXML_FTP_ENABLED)
   if (LocaleCompare(read_info->magick,"ftp") == 0)
@@ -295,8 +295,8 @@ ModuleExport size_t RegisterURLImage(void)
     *entry;
 
   entry=SetMagickInfo("HTTP");
-#if (defined(MAGICKCORE_WINDOWS_SUPPORT) && \\r
-    !(defined(__MINGW32__) || defined(__MINGW64__))) || \\r
+#if (defined(MAGICKCORE_WINDOWS_SUPPORT) && \
+    !(defined(__MINGW32__) || defined(__MINGW64__))) || \
     (defined(MAGICKCORE_XML_DELEGATE) && defined(LIBXML_HTTP_ENABLED))
   entry->decoder=(DecodeImageHandler *) ReadURLImage;
 #endif
@@ -304,18 +304,18 @@ ModuleExport size_t RegisterURLImage(void)
   entry->module=ConstantString("URL");
   entry->stealth=MagickTrue;
   (void) RegisterMagickInfo(entry);
-  entry=SetMagickInfo("HTTPS");\r
-#if defined(MAGICKCORE_WINDOWS_SUPPORT) && \\r
-    !(defined(__MINGW32__) || defined(__MINGW64__))\r
-  entry->decoder=(DecodeImageHandler *) ReadURLImage;\r
-#endif\r
-  entry->description=ConstantString("Uniform Resource Locator (https://)");\r
-  entry->module=ConstantString("URL");\r
-  entry->stealth=MagickTrue;\r
+  entry=SetMagickInfo("HTTPS");
+#if defined(MAGICKCORE_WINDOWS_SUPPORT) && \
+    !(defined(__MINGW32__) || defined(__MINGW64__))
+  entry->decoder=(DecodeImageHandler *) ReadURLImage;
+#endif
+  entry->description=ConstantString("Uniform Resource Locator (https://)");
+  entry->module=ConstantString("URL");
+  entry->stealth=MagickTrue;
   (void) RegisterMagickInfo(entry);
   entry=SetMagickInfo("FTP");
-#if (defined(MAGICKCORE_WINDOWS_SUPPORT) && \\r
-    !(defined(__MINGW32__) || defined(__MINGW64__))) || \\r
+#if (defined(MAGICKCORE_WINDOWS_SUPPORT) && \
+    !(defined(__MINGW32__) || defined(__MINGW64__))) || \
     (defined(MAGICKCORE_XML_DELEGATE) && defined(LIBXML_FTP_ENABLED))
   entry->decoder=(DecodeImageHandler *) ReadURLImage;
 #endif