return((int) count);
}
-static ssize_t BlobSeek(jas_stream_obj_t *object,ssize_t offset,int origin)
+static long BlobSeek(jas_stream_obj_t *object,long offset,int origin)
{
StreamManager
*source;
source=(StreamManager *) object;
- return((ssize_t) SeekBlob(source->image,offset,origin));
+ return((long) SeekBlob(source->image,offset,origin));
}
static int BlobClose(jas_stream_obj_t *object)
blob=(jas_stream_memobj_t *) icc_stream->obj_;
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- "Profile: ICC, %lu bytes",(size_t) blob->len_);
+ "Profile: ICC, %lu bytes",(unsigned long) blob->len_);
profile=AcquireStringInfo(blob->len_);
SetStringInfoDatum(profile,blob->buf_);
icc_profile=(StringInfo *) GetImageProfile(image,"icc");
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Skipping %c%c%c%c chunk, length=%lu.",
- *(p),*(p+1),*(p+2),*(p+3),len);
+ *(p),*(p+1),*(p+2),*(p+3),(unsigned long) len);
}
p+=(8+len);
}
/* Write JDAA chunk header */
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Write JDAA chunk, length=%lu.",
- (size_t) length);
+ " Write JDAA chunk, length=%lu.",(unsigned long) length);
(void) WriteBlobMSBULong(image,(size_t) length);
PNGType(chunk,mng_JDAA);
LogPNGChunk((int) logging,mng_JDAA,length);
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Created jpeg_image, %lu x %lu.",jpeg_image->columns,
- jpeg_image->rows);
+ " Created jpeg_image, %lu x %lu.",(unsigned long) jpeg_image->columns,
+ (unsigned long) jpeg_image->rows);
if (jng_color_type == 8 || jng_color_type == 12)
jpeg_image_info->type=GrayscaleType;
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Successfully read jpeg_image into a blob, length=%lu.",
- (size_t) length);
+ (unsigned long) length);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Write JDAT chunk, length=%lu.",
- (size_t) length);
+ " Write JDAT chunk, length=%lu.",(unsigned long) length);
}
/* Write JDAT chunk(s) */
(void) WriteBlobMSBULong(image,(size_t) length);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Optimize: FALSE");
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Image_info depth: %ld",image_info->depth);
+ " Image_info depth: %lu",(unsigned long) image_info->depth);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Type: %d",image_info->type);
for (p=image; p != (Image *) NULL; p=GetNextImageInList(p))
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Scene: %ld",scene++);
+ " Scene: %lu",(unsigned long) scene++);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Image depth: %lu",p->depth);
+ " Image depth: %lu",(unsigned long) p->depth);
if (p->matte)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Matte: True");
" Storage class: DirectClass");
if (p->colors)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Number of colors: %lu",p->colors);
+ " Number of colors: %lu",(unsigned long) p->colors);
else
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" Number of colors: unspecified");
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" TERM delay: %lu",
- (size_t) (mng_info->ticks_per_second*
+ (unsigned long) (mng_info->ticks_per_second*
final_delay/MagickMax(image->ticks_per_second,1)));
if (image->iterations == 0)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " TERM iterations: %lu",(size_t) PNG_UINT_31_MAX);
+ " TERM iterations: %lu",(unsigned long) PNG_UINT_31_MAX);
else
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Image iterations: %lu",image->iterations);
+ " Image iterations: %lu",(unsigned long) image->iterations);
}
(void) WriteBlob(image,14,chunk);
(void) WriteBlobMSBULong(image,crc32(0,chunk,14));
image->depth=(size_t) bits_per_sample;
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"Image depth: %lu",
- image->depth);
+ (unsigned long) image->depth);
lsb_first=1;
image->endian=MSBEndian;
if ((int) (*(char *) &lsb_first) != 0)
return(ReadBlobByte((Image *) image));
}
-static int WMFSeekBlob(void *image,ssize_t offset)
+static int WMFSeekBlob(void *image,long offset)
{
return((int) SeekBlob((Image *) image,(MagickOffsetType) offset,SEEK_SET));
}
-static ssize_t WMFTellBlob(void *image)
+static long WMFTellBlob(void *image)
{
- return((ssize_t) TellBlob((Image*) image));
+ return((long) TellBlob((Image*) image));
}
static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
(void) fprintf(stderr,
"\nUnsupported WPG2 unaligned token RST x=%lu, please report!\n"
- ,x);
+ ,(unsigned long) x);
return(-3);
}
{
value,
version;
+ unsigned long
+ height,
+ width;
+
/*
Open image file.
*/
/*
Read X bitmap header.
*/
+ width=0;
+ height=0;
while (ReadBlobString(image,buffer) != (char *) NULL)
- if (sscanf(buffer,"#define %s %lu",name,&image->columns) == 2)
+ if (sscanf(buffer,"#define %s %lu",name,&width) == 2)
if ((strlen(name) >= 6) &&
(LocaleCompare(name+strlen(name)-6,"_width") == 0))
- break;
+ break;
while (ReadBlobString(image,buffer) != (char *) NULL)
- if (sscanf(buffer,"#define %s %lu",name,&image->rows) == 2)
+ if (sscanf(buffer,"#define %s %lu",name,&height) == 2)
if ((strlen(name) >= 7) &&
(LocaleCompare(name+strlen(name)-7,"_height") == 0))
- break;
+ break;
+ image->columns=width;
+ image->rows=width;
image->depth=8;
image->storage_class=PseudoClass;
image->colors=2;
*/
GetPathComponent(image->filename,BasePath,basename);
(void) FormatMagickString(buffer,MaxTextExtent,"#define %s_width %lu\n",
- basename,image->columns);
+ basename,(unsigned long) image->columns);
(void) WriteBlob(image,strlen(buffer),(unsigned char *) buffer);
(void) FormatMagickString(buffer,MaxTextExtent,"#define %s_height %lu\n",
- basename,image->rows);
+ basename,(unsigned long) image->rows);
(void) WriteBlob(image,strlen(buffer),(unsigned char *) buffer);
(void) FormatMagickString(buffer,MaxTextExtent,
"static char %s_bits[] = {\n",basename);
if (image_info->page != (char *) NULL)
(void) ParseAbsoluteGeometry(image_info->page,&page);
(void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu",
- page.width,page.height);
+ (unsigned long) page.width,(unsigned long) page.height);
if (image_info->monochrome != MagickFalse)
delegate_info=GetDelegateInfo("xps:mono",(char *) NULL,exception);
else
page.height=(size_t) floor(page.height*image->y_resolution/delta.y+
0.5);
(void) FormatMagickString(options,MaxTextExtent,"-g%lux%lu ",
- page.width,page.height);
+ (unsigned long) page.width,(unsigned long) page.height);
image=DestroyImage(image);
read_info=CloneImageInfo(image_info);
*read_info->magick='\0';
{
if (read_info->number_scenes != 1)
(void) FormatMagickString(options,MaxTextExtent,"-dLastPage=%lu",
- read_info->scene+read_info->number_scenes);
+ (unsigned long) (read_info->scene+read_info->number_scenes));
else
(void) FormatMagickString(options,MaxTextExtent,
- "-dFirstPage=%lu -dLastPage=%lu",read_info->scene+1,read_info->scene+
- read_info->number_scenes);
+ "-dFirstPage=%lu -dLastPage=%lu",(unsigned long) read_info->scene+1,
+ (unsigned long) (read_info->scene+read_info->number_scenes));
read_info->number_scenes=0;
if (read_info->scenes != (char *) NULL)
*read_info->scenes='\0';
GetPathComponent(image->filename,ExtensionPath,extension);
if (*extension == '\0')
(void) FormatMagickString(filename,MaxTextExtent,"%s-%lu",
- path,image->scene);
+ path,(unsigned long) image->scene);
else
(void) FormatMagickString(filename,MaxTextExtent,
- "%s-%lu.%s",path,image->scene,extension);
+ "%s-%lu.%s",path,(unsigned long) image->scene,extension);
}
(void) CopyMagickString(image->filename,filename,MaxTextExtent);
#if defined(macintosh)
count=fread(magick,1,sizeof(magick),image->blob->file);
(void) rewind(image->blob->file);
(void) LogMagickEvent(BlobEvent,GetMagickModule(),
- " read %ld magic header bytes",(ssize_t) count);
+ " read %lu magic header bytes",(unsigned long) count);
#if defined(MAGICKCORE_ZLIB_DELEGATE)
if (((int) magick[0] == 0x1F) && ((int) magick[1] == 0x8B) &&
((int) magick[2] == 0x08))
cache_info=(CacheInfo *) image->cache;
source_info=(*cache_info);
source_info.file=(-1);
- (void) FormatMagickString(cache_info->filename,MaxTextExtent,"%s[%ld]",
- image->filename,GetImageIndexInList(image));
+ (void) FormatMagickString(cache_info->filename,MaxTextExtent,"%s[%lu]",
+ image->filename,(unsigned long) GetImageIndexInList(image));
cache_info->mode=mode;
cache_info->rows=image->rows;
cache_info->columns=image->columns;
(void) FormatMagickString(message,MaxTextExtent,
"open %s (%s memory, %lux%lu %sB)",cache_info->filename,
cache_info->mapped != MagickFalse ? "anonymous" : "heap",
- cache_info->columns,cache_info->rows,format);
+ (unsigned long) cache_info->columns,(unsigned long)
+ cache_info->rows,format);
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",
message);
}
(void) FormatMagickString(message,MaxTextExtent,
"open %s (%s[%d], memory-mapped, %lux%lu %sB)",
cache_info->filename,cache_info->cache_filename,
- cache_info->file,cache_info->columns,cache_info->rows,
- format);
+ cache_info->file,(unsigned long) cache_info->columns,
+ (unsigned long) cache_info->rows,format);
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",
message);
}
if ((cache_info->debug != MagickFalse) &&
(QuantumTick(nexus_info->region.y,cache_info->rows) != MagickFalse))
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s[%lux%lu%+ld%+ld]",
- cache_info->filename,nexus_info->region.width,nexus_info->region.height,
- nexus_info->region.x,nexus_info->region.y);
+ cache_info->filename,(unsigned long) nexus_info->region.width,
+ (unsigned long) nexus_info->region.height,(long) nexus_info->region.x,
+ (long) nexus_info->region.y);
return(MagickTrue);
}
\f
if ((cache_info->debug != MagickFalse) &&
(QuantumTick(nexus_info->region.y,cache_info->rows) != MagickFalse))
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s[%lux%lu%+ld%+ld]",
- cache_info->filename,nexus_info->region.width,nexus_info->region.height,
- nexus_info->region.x,nexus_info->region.y);
+ cache_info->filename,(unsigned long) nexus_info->region.width,
+ (unsigned long) nexus_info->region.height,(long) nexus_info->region.x,
+ (long) nexus_info->region.y);
return(MagickTrue);
}
\f
if ((cache_info->debug != MagickFalse) &&
(QuantumTick(nexus_info->region.y,cache_info->rows) != MagickFalse))
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s[%lux%lu%+ld%+ld]",
- cache_info->filename,nexus_info->region.width,nexus_info->region.height,
- nexus_info->region.x,nexus_info->region.y);
+ cache_info->filename,(unsigned long) nexus_info->region.width,
+ (unsigned long) nexus_info->region.height,(long) nexus_info->region.x,
+ (long) nexus_info->region.y);
return(MagickTrue);
}
if (pixel->depth > 16)
{
(void) FormatMagickString(component,MaxTextExtent,"%10lu",
- (size_t) ScaleQuantumToLong(ClampToQuantum(color)));
+ (unsigned long) ScaleQuantumToLong(ClampToQuantum(color)));
(void) ConcatenateMagickString(tuple,component,MaxTextExtent);
return;
}
if (pixel->depth > 32)
{
(void) FormatMagickString(component,MaxTextExtent,"%08lX",
- ScaleQuantumToLong(ClampToQuantum(color)));
+ (unsigned long) ScaleQuantumToLong(ClampToQuantum(color)));
(void) ConcatenateMagickString(tuple,component,MaxTextExtent);
return;
}
type="error";
if (severity >= FatalErrorException)
type="fatal";
- (void) FormatMagickString(message,MaxTextExtent,"%s @ %s/%s/%s/%ld",reason,
- type,path,function,line);
+ (void) FormatMagickString(message,MaxTextExtent,"%s @ %s/%s/%s/%lu",reason,
+ type,path,function,(unsigned long) line);
(void) ThrowException(exception,severity,message,(char *) NULL);
return(status);
}
for (v=0; v < 6; v++)
{
*message='\0';
- (void) FormatMagickString(format,MaxTextExtent,"%ld: ",v);
+ (void) FormatMagickString(format,MaxTextExtent,"%ld: ",(long) v);
(void) ConcatenateString(&message,format);
for (u=0; u < 6; u++)
{
default: break;
}
(void) FormatMagickString(key,MaxTextExtent,"%p.%ld.%s",(void *) image,
- (ssize_t) channel,symbol);
+ (long) channel,symbol);
value=(const char *) GetValueFromSplayTree(fx_info->symbols,key);
if (value != (const char *) NULL)
return(QuantumScale*StringToDouble(value));
depth;
depth=GetImageChannelDepth(image,channel,exception);
- (void) FormatMagickString(statistic,MaxTextExtent,"%lu",depth);
+ (void) FormatMagickString(statistic,MaxTextExtent,"%lu",
+ (unsigned long) depth);
}
if (LocaleNCompare(symbol,"kurtosis",8) == 0)
{
tag);
if (signature != MagickImageFilterSignature)
(void) ThrowMagickException(exception,GetMagickModule(),ModuleError,
- "ImageFilterSignatureMismatch","`%s': %8lx != %8lx",tag,signature,
- MagickImageFilterSignature);
+ "ImageFilterSignatureMismatch","`%s': %8lx != %8lx",tag,
+ (unsigned long) signature,(unsigned long) MagickImageFilterSignature);
}
/*
Close the module.
{
(void) ThrowMagickException(exception,GetMagickModule(),ModuleError,
"ImageCoderSignatureMismatch","`%s': %8lx != %8lx",module_name,
- signature,MagickImageCoderSignature);
+ (unsigned long) signature,(unsigned long) MagickImageCoderSignature);
return(MagickFalse);
}
return(MagickTrue);
/*
Start at the root and descend the color cube tree.
*/
- for (count=1; (x+count) < (ssize_t) image->columns; count++)
+ for (count=1; (x+count) < image->columns; count++)
if (IsSameColor(image,p,p+count) == MagickFalse)
break;
AssociateAlphaPixel(cube_info,p,&pixel);
/*
Start at the root and descend the color cube tree.
*/
- for (count=1; (x+count) < (ssize_t) image->columns; count++)
+ for (count=1; (x+count) < image->columns; count++)
if (IsSameColor(image,p,p+count) == MagickFalse)
break;
AssociateAlphaPixel(cube_info,p,&pixel);
(void) CopyMagickString(value,image->magick_filename,MaxTextExtent);
if (GetPathAttributes(image->filename,&attributes) != MagickFalse)
{
- (void) FormatMagickString(value,MaxTextExtent,"%ld",(ssize_t)
+ (void) FormatMagickString(value,MaxTextExtent,"%ld",(long)
attributes.st_mtime);
(void) SetImageProperty(thumbnail_image,"Thumb::MTime",value);
}
- (void) FormatMagickString(value,MaxTextExtent,"%ld",(ssize_t)
+ (void) FormatMagickString(value,MaxTextExtent,"%ld",(long)
attributes.st_mtime);
(void) FormatMagickSize(GetBlobSize(image),MagickFalse,value);
(void) ConcatenateMagickString(value,"B",MaxTextExtent);
(void) SetImageProperty(thumbnail_image,"Thumb::Mimetype",value);
(void) SetImageProperty(thumbnail_image,"software",
GetMagickVersion(&version));
- (void) FormatMagickString(value,MaxTextExtent,"%lu",image->magick_columns);
+ (void) FormatMagickString(value,MaxTextExtent,"%lu",
+ (unsigned long) image->magick_columns);
(void) SetImageProperty(thumbnail_image,"Thumb::Image::Width",value);
(void) FormatMagickString(value,MaxTextExtent,"%lu",image->magick_rows);
(void) SetImageProperty(thumbnail_image,"Thumb::Image::height",value);
(void) FormatMagickString(value,MaxTextExtent,"%lu",
- GetImageListLength(image));
+ (unsigned long) GetImageListLength(image));
(void) SetImageProperty(thumbnail_image,"Thumb::Document::Pages",value);
return(thumbnail_image);
}
(void) FormatMagickSize(resource_info.disk_limit,MagickFalse,disk_limit);
(void) CopyMagickString(time_limit,"unlimited",MaxTextExtent);
if (resource_info.time_limit != MagickResourceInfinity)
- (void) FormatMagickString(time_limit,MaxTextExtent,"%lu",(size_t)
+ (void) FormatMagickString(time_limit,MaxTextExtent,"%lu",(unsigned long)
resource_info.time_limit);
(void) fprintf(file,"File Area Memory Map"
" Disk Thread Time\n");
"-----------------------\n");
(void) fprintf(file,"%4lu %10sB %10sB %10sB %10sB %6lu %11s\n",
(size_t) resource_info.file_limit,area_limit,memory_limit,map_limit,
- disk_limit,(size_t) resource_info.thread_limit,time_limit);
+ disk_limit,(unsigned long) resource_info.thread_limit,time_limit);
(void) fflush(file);
UnlockSemaphoreInfo(resource_semaphore);
return(MagickTrue);
(void) fprintf(stdout,"\tWeighting Exponent = %g\n",(double)
weighting_exponent);
(void) fprintf(stdout,"\tTotal Number of Clusters = %lu\n\n",
- number_clusters);
+ (unsigned long) number_clusters);
/*
Print the total number of points per cluster.
*/
median_image=DestroyImage(median_image);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TransformEvent,GetMagickModule()," Deskew geometry: "
- "%lux%lu%+ld%+ld",geometry.width,geometry.height,geometry.x,geometry.y);
+ "%lux%lu%+ld%+ld",(unsigned long) geometry.width,(unsigned long)
+ geometry.height,(long) geometry.x,(long) geometry.y);
crop_image=CropImage(deskew_image,&geometry,exception);
deskew_image=DestroyImage(deskew_image);
return(crop_image);
count=FormatMagickString(timestamp,length,
"%04d-%02d-%02dT%02d:%02d:%02d%+03ld:00",local_time.tm_year+1900,
local_time.tm_mon+1,local_time.tm_mday,local_time.tm_hour,
- local_time.tm_min,local_time.tm_sec,(ssize_t) timezone);
+ local_time.tm_min,local_time.tm_sec,(long) timezone);
return(count);
}
\f
p=(char *) string_info->datum;
for (i=0; i < string_info->length; i+=0x14)
{
- (void) fprintf(file,"0x%08lx: ",(size_t) (0x14*i));
+ (void) fprintf(file,"0x%08lx: ",(unsigned long) (0x14*i));
for (j=1; j <= MagickMin(string_info->length-i,0x14); j++)
{
- (void) fprintf(file,"%02lx",(size_t) (*(p+j)) & 0xff);
+ (void) fprintf(file,"%02lx",(unsigned long) (*(p+j)) & 0xff);
if ((j % 0x04) == 0)
(void) fputc(' ',file);
}
sizeof(*textlist));
if (textlist[i] == (char *) NULL)
ThrowFatalException(ResourceLimitFatalError,"UnableToConvertText");
- (void) FormatMagickString(textlist[i],MaxTextExtent,"0x%08lx: ",0x14*i);
+ (void) FormatMagickString(textlist[i],MaxTextExtent,"0x%08lx: ",
+ (long) (0x14*i));
q=textlist[i]+strlen(textlist[i]);
for (j=1; j <= (ssize_t) MagickMin(strlen(p),0x14); j++)
{
if ( map->levels[i] < 0 || map->levels[i] > map->divisor ) {
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
"XmlInvalidContent", "<level> %ld out of range, map \"%s\"",
- map->levels[i], map_id);
+ (long) map->levels[i],map_id);
thresholds = DestroyXMLTree(thresholds);
map = DestroyThresholdMap(map);
return(map);
glyphs="unknown";
if (type_info[i]->glyphs != (char *) NULL)
glyphs=type_info[i]->glyphs;
- (void) FormatMagickString(weight,MaxTextExtent,"%lu",type_info[i]->weight);
+ (void) FormatMagickString(weight,MaxTextExtent,"%lu",
+ (unsigned long) type_info[i]->weight);
(void) fprintf(file," Font: %s\n",name);
(void) fprintf(file," family: %s\n",family);
(void) fprintf(file," style: %s\n",style);
count;
(void) FormatMagickString(link_path,MaxTextExtent,"/proc/%ld/exe",
- (ssize_t) getpid());
+ (long) getpid());
count=readlink(link_path,execution_path,PATH_MAX);
if (count == -1)
{
(void) FormatMagickString(link_path,MaxTextExtent,"/proc/%ld/file",
- (ssize_t) getpid());
+ (long) getpid());
count=readlink(link_path,execution_path,PATH_MAX);
}
if ((count > 0) && (count <= (ssize_t) PATH_MAX))