%
*/
MagickExport CustomStreamInfo *AcquireCustomStreamInfo(
- ExceptionInfo *exception)
+ ExceptionInfo *magick_unused(exception))
{
CustomStreamInfo
*custom_stream;
+ magick_unreferenced(exception);
custom_stream=(CustomStreamInfo *) AcquireMagickMemory(
sizeof(*custom_stream));
if (custom_stream == (CustomStreamInfo *) NULL)
break;
}
case CustomStream:
+ {
+ if ((image->blob->custom_stream->teller != (CustomStreamTeller) NULL) &&
+ (image->blob->custom_stream->seeker != (CustomStreamSeeker) NULL))
+ {
+ MagickOffsetType
+ offset;
+
+ offset=image->blob->custom_stream->teller(
+ image->blob->custom_stream->data);
+ extent=image->blob->custom_stream->seeker(0,SEEK_END,
+ image->blob->custom_stream->data);
+ image->blob->custom_stream->seeker(offset,SEEK_SET,
+ image->blob->custom_stream->data);
+ }
break;
+ }
}
return(extent);
}
}
case CustomStream:
{
- count=image->blob->custom_stream->reader(q,length,
- image->blob->custom_stream->data);
+ if (image->blob->custom_stream->reader != (CustomStreamHandler) NULL)
+ count=image->blob->custom_stream->reader(q,length,
+ image->blob->custom_stream->data);
break;
}
}
{
if (i == 0)
return((char *) NULL);
+ string[i]='\0';
break;
}
string[i]=(char) (*p);
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
- assert(data != (const void *) NULL);
assert(image->blob != (BlobInfo *) NULL);
assert(image->blob->type != UndefinedStream);
if (length == 0)
return(0);
+ assert(data != (const void *) NULL);
count=0;
p=(const unsigned char *) data;
switch (image->blob->type)
}
case CustomStream:
{
- count=image->blob->custom_stream->writer((const unsigned char *) data,
- length,image->blob->custom_stream->data);
+ if (image->blob->custom_stream->writer != (CustomStreamHandler) NULL)
+ count=image->blob->custom_stream->writer((const unsigned char *) data,
+ length,image->blob->custom_stream->data);
break;
}
}