]> granicus.if.org Git - imagemagick/blobdiff - coders/wmf.c
(no commit message)
[imagemagick] / coders / wmf.c
index 7a36a1927ca840dd804c970fd8f999c736710839..7dd6b437d681436c738c5510d7d75f3aea93ee09 100644 (file)
@@ -17,7 +17,7 @@
 %                               December 2000                                 %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2011 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  %
@@ -126,7 +126,10 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
   ImageInfo
     *read_info;
 
-  unsigned long
+  MagickBooleanType
+    status;
+
+  size_t
     flags;
 
   wmfAPI
@@ -139,10 +142,10 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
     bounding_box;
 
   wmf_eps_t
-   *eps_info;
+    *eps_info;
 
   wmf_error_t
-    status;
+    wmf_status;
 
   /*
     Read WMF image.
@@ -159,16 +162,16 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
   flags|=WMF_OPT_IGNORE_NONFATAL;
   flags|=WMF_OPT_FUNCTION;
   options.function=wmf_eps_function;
-  status=wmf_api_create(&wmf_info,flags,&options);
-  if (status != wmf_E_None)
+  wmf_status=wmf_api_create(&wmf_info,(unsigned long) flags,&options);
+  if (wmf_status != wmf_E_None)
     {
       if (wmf_info != (wmfAPI *) NULL)
         wmf_api_destroy(wmf_info);
       ThrowReaderException(DelegateError,"UnableToInitializeWMFLibrary");
     }
-  status=wmf_bbuf_input(wmf_info,WMFReadBlob,WMFSeekBlob,WMFTellBlob,
+  wmf_status=wmf_bbuf_input(wmf_info,WMFReadBlob,WMFSeekBlob,WMFTellBlob,
     (void *) image);
-  if (status != wmf_E_None)
+  if (wmf_status != wmf_E_None)
     {
       wmf_api_destroy(wmf_info);
       ThrowFileException(exception,FileOpenError,"UnableToOpenFile",
@@ -176,8 +179,8 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
       image=DestroyImageList(image);
       return((Image *) NULL);
     }
-  status=wmf_scan(wmf_info,0,&bounding_box);
-  if (status != wmf_E_None)
+  wmf_status=wmf_scan(wmf_info,0,&bounding_box);
+  if (wmf_status != wmf_E_None)
     {
       wmf_api_destroy(wmf_info);
       ThrowReaderException(DelegateError,"FailedToScanFile");
@@ -194,8 +197,8 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
     }
   eps_info->out=wmf_stream_create(wmf_info,file);
   eps_info->bbox=bounding_box;
-  status=wmf_play(wmf_info,0,&bounding_box);
-  if (status != wmf_E_None)
+  wmf_status=wmf_play(wmf_info,0,&bounding_box);
+  if (wmf_status != wmf_E_None)
     {
       wmf_api_destroy(wmf_info);
       ThrowReaderException(DelegateError,"FailedToRenderFile");
@@ -208,7 +211,8 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
     Read EPS image.
   */
   read_info=CloneImageInfo(image_info);
-  (void) FormatMagickString(read_info->filename,MaxTextExtent,"eps:%.1024s",
+  SetImageInfoBlob(read_info,(void *) NULL,0);
+  (void) FormatMagickString(read_info->filename,MaxTextExtent,"eps:%s",
     filename);
   image=ReadImage(read_info,exception);
   read_info=DestroyImageInfo(read_info);
@@ -245,10 +249,10 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
 %
 %  The format of the RegisterWMFImage method is:
 %
-%      unsigned long RegisterWMFImage(void)
+%      size_t RegisterWMFImage(void)
 %
 */
-ModuleExport unsigned long RegisterWMFImage(void)
+ModuleExport size_t RegisterWMFImage(void)
 {
   MagickInfo
     *entry;