]> granicus.if.org Git - imagemagick/blobdiff - coders/pwp.c
(no commit message)
[imagemagick] / coders / pwp.c
index 2e4eb210e2fbca7d9ef77f38baa112940cc6cfc0..d6b83cfaf59d61d74b5f37c9734555c046f19116 100644 (file)
@@ -17,7 +17,7 @@
 %                                 July 1992                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2010 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  %
 /*
   Include declarations.
 */
-#include "magick/studio.h"
-#include "magick/blob.h"
-#include "magick/blob-private.h"
-#include "magick/constitute.h"
-#include "magick/exception.h"
-#include "magick/exception-private.h"
-#include "magick/image.h"
-#include "magick/image-private.h"
-#include "magick/list.h"
-#include "magick/magick.h"
-#include "magick/memory_.h"
-#include "magick/monitor.h"
-#include "magick/monitor-private.h"
-#include "magick/resource_.h"
-#include "magick/quantum-private.h"
-#include "magick/static.h"
-#include "magick/string_.h"
-#include "magick/module.h"
+#include "MagickCore/studio.h"
+#include "MagickCore/blob.h"
+#include "MagickCore/blob-private.h"
+#include "MagickCore/constitute.h"
+#include "MagickCore/exception.h"
+#include "MagickCore/exception-private.h"
+#include "MagickCore/image.h"
+#include "MagickCore/image-private.h"
+#include "MagickCore/list.h"
+#include "MagickCore/magick.h"
+#include "MagickCore/memory_.h"
+#include "MagickCore/monitor.h"
+#include "MagickCore/monitor-private.h"
+#include "MagickCore/resource_.h"
+#include "MagickCore/quantum-private.h"
+#include "MagickCore/static.h"
+#include "MagickCore/string_.h"
+#include "MagickCore/module.h"
 \f
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -142,18 +142,19 @@ static Image *ReadPWPImage(const ImageInfo *image_info,ExceptionInfo *exception)
   register Image
     *p;
 
-  register long
+  register ssize_t
     i;
 
+  size_t
+    filesize,
+    length;
+
   ssize_t
     count;
 
   unsigned char
     magick[MaxTextExtent];
 
-  unsigned long
-    filesize;
-
   /*
     Open image file.
   */
@@ -164,7 +165,7 @@ static Image *ReadPWPImage(const ImageInfo *image_info,ExceptionInfo *exception)
       image_info->filename);
   assert(exception != (ExceptionInfo *) NULL);
   assert(exception->signature == MagickSignature);
-  pwp_image=AcquireImage(image_info);
+  pwp_image=AcquireImage(image_info,exception);
   image=pwp_image;
   status=OpenBlob(image_info,pwp_image,ReadBinaryBlobMode,exception);
   if (status == MagickFalse)
@@ -204,9 +205,10 @@ static Image *ReadPWPImage(const ImageInfo *image_info,ExceptionInfo *exception)
         image=DestroyImageList(image);
         return((Image *) NULL);
       }
-    (void) fwrite("SFW94A",1,6,file);
+    length=fwrite("SFW94A",1,6,file);
+    (void) length;
     filesize=65535UL*magick[2]+256L*magick[1]+magick[0];
-    for (i=0; i < (long) filesize; i++)
+    for (i=0; i < (ssize_t) filesize; i++)
     {
       c=ReadBlobByte(pwp_image);
       (void) fputc(c,file);
@@ -215,8 +217,8 @@ static Image *ReadPWPImage(const ImageInfo *image_info,ExceptionInfo *exception)
     next_image=ReadImage(read_info,exception);
     if (next_image == (Image *) NULL)
       break;
-    (void) FormatMagickString(next_image->filename,MaxTextExtent,
-      "slide_%02ld.sfw",next_image->scene);
+    (void) FormatLocaleString(next_image->filename,MaxTextExtent,
+      "slide_%02ld.sfw",(long) next_image->scene);
     if (image == (Image *) NULL)
       image=next_image;
     else
@@ -275,10 +277,10 @@ static Image *ReadPWPImage(const ImageInfo *image_info,ExceptionInfo *exception)
 %
 %  The format of the RegisterPWPImage method is:
 %
-%      unsigned long RegisterPWPImage(void)
+%      size_t RegisterPWPImage(void)
 %
 */
-ModuleExport unsigned long RegisterPWPImage(void)
+ModuleExport size_t RegisterPWPImage(void)
 {
   MagickInfo
     *entry;