From b0af14f41c0cb866176f7a0931879afde6b890a7 Mon Sep 17 00:00:00 2001 From: cristy Date: Thu, 26 Sep 2013 12:22:34 +0000 Subject: [PATCH] --- coders/url.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/coders/url.c b/coders/url.c index 8873b5cb5..8372dfdac 100644 --- a/coders/url.c +++ b/coders/url.c @@ -70,9 +70,9 @@ # include # include #endif -#if defined(MAGICKCORE_WINDOWS_SUPPORT) && \ - !(defined(__MINGW32__) || defined(__MINGW64__)) -# include +#if defined(MAGICKCORE_WINDOWS_SUPPORT) && \ + !(defined(__MINGW32__) || defined(__MINGW64__)) +# include #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) && \ - !(defined(__MINGW32__) || defined(__MINGW64__)) - (void) fclose(file); - if (URLDownloadToFile(NULL,filename,read_info->filename,NULL,NULL) != S_OK) - { - ThrowFileException(exception,FileOpenError,"UnableToOpenFile", - filename); - (void) RelinquishUniqueFileResource(read_info->filename); - read_info=DestroyImageInfo(read_info); - return((Image *) NULL); - } +#if defined(MAGICKCORE_WINDOWS_SUPPORT) && \ + !(defined(__MINGW32__) || defined(__MINGW64__)) + (void) fclose(file); + if (URLDownloadToFile(NULL,filename,read_info->filename,NULL,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) && \ - !(defined(__MINGW32__) || defined(__MINGW64__))) || \ +#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"); -#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; + 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) && \ - !(defined(__MINGW32__) || defined(__MINGW64__))) || \ +#if (defined(MAGICKCORE_WINDOWS_SUPPORT) && \ + !(defined(__MINGW32__) || defined(__MINGW64__))) || \ (defined(MAGICKCORE_XML_DELEGATE) && defined(LIBXML_FTP_ENABLED)) entry->decoder=(DecodeImageHandler *) ReadURLImage; #endif -- 2.40.0