]> granicus.if.org Git - imagemagick/blobdiff - coders/cals.c
(no commit message)
[imagemagick] / coders / cals.c
index 75d3f9737f0da35efc363745ff749a4d1966bbfb..bba5409e7e7b5d85f1bdb5f45134509dd53b2bea 100644 (file)
@@ -17,7 +17,7 @@
 %                                 July 1992                                   %
 %                                                                             %
 %                                                                             %
-%  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  %
@@ -166,7 +166,7 @@ static Image *ReadCALSImage(const ImageInfo *image_info,
   register ssize_t
     i;
 
-  size_t
+  unsigned long
     density,
     direction,
     height,
@@ -262,7 +262,7 @@ static Image *ReadCALSImage(const ImageInfo *image_info,
   image=DestroyImage(image);
   read_info=CloneImageInfo(image_info);
   SetImageInfoBlob(read_info,(void *) NULL,0);
-  (void) FormatMagickString(read_info->filename,MaxTextExtent,"group4:%.1024s",
+  (void) FormatMagickString(read_info->filename,MaxTextExtent,"group4:%s",
     filename);
   (void) FormatMagickString(message,MaxTextExtent,"%lux%lu",width,height);
   read_info->size=ConstantString(message);
@@ -404,15 +404,15 @@ static ssize_t WriteCALSRecord(Image *image,const char *data)
   char
     pad[128];
 
-  ssize_t
-    count;
-
   register const char
     *p;
 
   register ssize_t
     i;
 
+  ssize_t
+    count;
+
   i=0;
   if (data != (const char *) NULL)
     {
@@ -447,20 +447,18 @@ static MagickBooleanType WriteCALSImage(const ImageInfo *image_info,
   register ssize_t
     i;
 
+  size_t
+    density,
+    length,
+    orient_x,
+    orient_y;
+
   ssize_t
     count;
 
-  size_t
-    length;
-
   unsigned char
     *group4;
 
-  size_t
-    density,
-    orient_x,
-    orient_y;
-
   /*
     Open output image file.
   */
@@ -477,6 +475,7 @@ static MagickBooleanType WriteCALSImage(const ImageInfo *image_info,
     Create standard CALS header.
   */
   count=WriteCALSRecord(image,"srcdocid: NONE");
+  (void) count;
   count=WriteCALSRecord(image,"dstdocid: NONE");
   count=WriteCALSRecord(image,"txtfilid: NONE");
   count=WriteCALSRecord(image,"figid: NONE");
@@ -532,10 +531,10 @@ static MagickBooleanType WriteCALSImage(const ImageInfo *image_info,
     }
   }
   (void) FormatMagickString(header,MaxTextExtent,"rorient: %03ld,%03ld",
-    orient_x,orient_y);
+    (long) orient_x,(long) orient_y);
   count=WriteCALSRecord(image,header);
   (void) FormatMagickString(header,MaxTextExtent,"rpelcnt: %06lu,%06lu",
-    image->columns,image->rows);
+    (unsigned long) image->columns,(unsigned long) image->rows);
   count=WriteCALSRecord(image,header);  
   density=200;
   if (image_info->density != (char *) NULL)
@@ -546,7 +545,8 @@ static MagickBooleanType WriteCALSImage(const ImageInfo *image_info,
       (void) ParseGeometry(image_info->density,&geometry_info);
       density=(size_t) floor(geometry_info.rho+0.5);
     }
-  (void) FormatMagickString(header,MaxTextExtent,"rdensty: %04lu",density);
+  (void) FormatMagickString(header,MaxTextExtent,"rdensty: %04lu",
+    (unsigned long) density);
   count=WriteCALSRecord(image,header);
   count=WriteCALSRecord(image,"notes: NONE");
   (void) ResetMagickMemory(header,' ',128);