assert(image->blob->type != UndefinedStream);
assert(data != NULL);
if (image->blob->type != BlobStream)
- return(WriteBlob(image,length,data));
+ return(WriteBlob(image,length,(const unsigned char *) data));
extent=(MagickSizeType) (image->blob->offset+(MagickOffsetType) length);
if (extent >= image->blob->extent)
{
MagickBooleanType
status;
- unsigned char
+ void
*blob;
assert(image_info != (const ImageInfo *) NULL);
*length=image->blob->length;
blob=DetachBlob(image->blob);
if (status == MagickFalse)
- blob=(unsigned char *) RelinquishMagickMemory(blob);
+ blob=RelinquishMagickMemory(blob);
else
- blob=(unsigned char *) ResizeQuantumMemory(blob,*length+1,
- sizeof(*blob));
+ blob=ResizeQuantumMemory(blob,*length+1,sizeof(unsigned char));
}
}
else
blob_info->file=fdopen(file,"wb");
if (blob_info->file != (FILE *) NULL)
{
- (void) FormatLocaleString(image->filename,MagickPathExtent,"%s:%s",
- image->magick,unique);
+ (void) FormatLocaleString(image->filename,MagickPathExtent,
+ "%s:%s",image->magick,unique);
status=WriteImage(blob_info,image,exception);
(void) CloseBlob(image);
(void) fclose(blob_info->file);
return(MagickFalse);
}
length=0;
- p=ReadBlobStream(image,quantum,buffer,&count);
- for (i=0; count > 0; p=ReadBlobStream(image,quantum,buffer,&count))
+ p=(const unsigned char *) ReadBlobStream(image,quantum,buffer,&count);
+ for (i=0; count > 0; p=(const unsigned char *) ReadBlobStream(image,quantum,buffer,&count))
{
length=(size_t) count;
for (i=0; i < length; i+=count)
MagickBooleanType
status;
- unsigned char
+ void
*blob;
assert(image_info != (const ImageInfo *) NULL);
*length=images->blob->length;
blob=DetachBlob(images->blob);
if (status == MagickFalse)
- blob=(unsigned char *) RelinquishMagickMemory(blob);
+ blob=RelinquishMagickMemory(blob);
else
- blob=(unsigned char *) ResizeQuantumMemory(blob,*length+1,
- sizeof(*blob));
+ blob=ResizeQuantumMemory(blob,*length+1,sizeof(unsigned char));
}
}
else
return(0);
assert(data != (void *) NULL);
count=0;
- q=data;
+ q=(unsigned char *) data;
switch (image->blob->type)
{
case UndefinedStream:
break;
}
p=image->blob->data+image->blob->offset;
- count=(ssize_t) MagickMin((MagickOffsetType) length,image->blob->length-
- image->blob->offset);
+ count=(ssize_t) MagickMin((MagickOffsetType) length,(MagickOffsetType)
+ image->blob->length-image->blob->offset);
image->blob->offset+=count;
if (count != (ssize_t) length)
image->blob->eof=MagickTrue;
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
- p=ReadBlobStream(image,1,buffer,&count);
+ p=(const unsigned char *) ReadBlobStream(image,1,buffer,&count);
if (count != 1)
return(EOF);
return((int) (*p));
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
*buffer='\0';
- p=ReadBlobStream(image,4,buffer,&count);
+ p=(const unsigned char *) ReadBlobStream(image,4,buffer,&count);
if (count != 4)
return(0UL);
if (image->endian == LSBEndian)
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
*buffer='\0';
- p=ReadBlobStream(image,8,buffer,&count);
+ p=(const unsigned char *) ReadBlobStream(image,8,buffer,&count);
if (count != 8)
return(MagickULLConstant(0));
if (image->endian == LSBEndian)
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
*buffer='\0';
- p=ReadBlobStream(image,2,buffer,&count);
+ p=(const unsigned char *) ReadBlobStream(image,2,buffer,&count);
if (count != 2)
return((unsigned short) 0U);
if (image->endian == LSBEndian)
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
*buffer='\0';
- p=ReadBlobStream(image,4,buffer,&count);
+ p=(const unsigned char *) ReadBlobStream(image,4,buffer,&count);
if (count != 4)
return(0U);
value=(unsigned int) (*p++);
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
*buffer='\0';
- p=ReadBlobStream(image,2,buffer,&count);
+ p=(const unsigned char *) ReadBlobStream(image,2,buffer,&count);
if (count != 2)
return((unsigned short) 0U);
value=(unsigned int) (*p++);
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
*buffer='\0';
- p=ReadBlobStream(image,4,buffer,&count);
+ p=(const unsigned char *) ReadBlobStream(image,4,buffer,&count);
if (count != 4)
return(0UL);
value=((unsigned int) (*p++) << 24);
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
*buffer='\0';
- p=ReadBlobStream(image,8,buffer,&count);
+ p=(const unsigned char *) ReadBlobStream(image,8,buffer,&count);
if (count != 8)
return(MagickULLConstant(0));
value=((MagickSizeType) (*p++)) << 56;
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
*buffer='\0';
- p=ReadBlobStream(image,2,buffer,&count);
+ p=(const unsigned char *) ReadBlobStream(image,2,buffer,&count);
if (count != 2)
return((unsigned short) 0U);
value=(unsigned int) ((*p++) << 8);
if (image->blob->type != BlobStream)
{
assert(data != NULL);
- *count=ReadBlob(image,length,data);
+ *count=ReadBlob(image,length,(unsigned char *) data);
return(data);
}
if (image->blob->offset >= (MagickOffsetType) image->blob->length)
return(data);
}
data=image->blob->data+image->blob->offset;
- *count=(ssize_t) MagickMin((MagickOffsetType) length,image->blob->length-
- image->blob->offset);
+ *count=(ssize_t) MagickMin((MagickOffsetType) length,(MagickOffsetType)
+ image->blob->length-image->blob->offset);
image->blob->offset+=(*count);
if (*count != (ssize_t) length)
image->blob->eof=MagickTrue;
assert(image->signature == MagickSignature);
for (i=0; i < (MagickPathExtent-1L); i++)
{
- p=ReadBlobStream(image,1,buffer,&count);
+ p=(const unsigned char *) ReadBlobStream(image,1,buffer,&count);
if (count != 1)
{
if (i == 0)