assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
assert(user_info != (UserBlobInfo *) NULL);
- assert(user_info->handler != (BlobHandler) NULL);
+ assert(user_info->reader != (BlobHandler) NULL);
+ assert(user_info->writer != (BlobHandler) NULL);
assert(exception != (ExceptionInfo *) NULL);
blob_info=CloneImageInfo(image_info);
blob_info->adjoin=MagickFalse;
{
count=(ssize_t) fread(blob,sizeof(*blob),MagickMaxBufferExtent,
blob_info->file);
- user_info->handler(blob,count,user_info->data);
+ user_info->writer(blob,count,user_info->data);
}
}
(void) fclose(blob_info->file);
assert(images != (Image *) NULL);
assert(images->signature == MagickCoreSignature);
assert(user_info != (UserBlobInfo *) NULL);
- assert(user_info->handler != (BlobHandler) NULL);
+ assert(user_info->reader != (BlobHandler) NULL);
+ assert(user_info->writer != (BlobHandler) NULL);
assert(exception != (ExceptionInfo *) NULL);
blob_info=CloneImageInfo(image_info);
blob_info->user_info=user_info;
{
count=(ssize_t) fread(blob,sizeof(*blob),MagickMaxBufferExtent,
blob_info->file);
- user_info->handler(blob,count,user_info->data);
+ user_info->writer(blob,count,user_info->data);
}
}
(void) fclose(blob_info->file);
}
case UserStream:
{
- count=image->blob->user_info->handler(q,length,
+ count=image->blob->user_info->reader(q,length,
image->blob->user_info->data);
+ if (count != (ssize_t) length)
+ image->blob->eof=MagickTrue;
break;
}
}
{
if (image->blob->user_info->seeker == (BlobSeeker) NULL)
return(-1);
- image->blob->user_info->seeker(offset,whence,
+ image->blob->offset=image->blob->user_info->seeker(offset,whence,
image->blob->user_info->data);
- image->blob->offset=TellBlob(image);
break;
}
}
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
image_info->filename);
assert(user_info != (UserBlobInfo *) NULL);
- assert(user_info->handler != (BlobHandler) NULL);
+ assert(user_info->reader != (BlobHandler) NULL);
+ assert(user_info->writer != (BlobHandler) NULL);
assert(exception != (ExceptionInfo *) NULL);
blob_info=CloneImageInfo(image_info);
blob_info->user_info=user_info;
count=(ssize_t) MagickMaxBufferExtent;
while (count == (ssize_t) MagickMaxBufferExtent)
{
- count=user_info->handler(blob,MagickMaxBufferExtent,
+ count=user_info->reader(blob,MagickMaxBufferExtent,
user_info->data);
count=(ssize_t) write(file,(const char *) blob,count);
}
}
case UserStream:
{
- count=image->blob->user_info->handler((const unsigned char *) data,
+ count=image->blob->user_info->writer((const unsigned char *) data,
length,image->blob->user_info->data);
break;
}