Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
- struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
/* It is OK for the unwind data to be local to this function,
because the unwind-protect is always executed when this
stack frame is still valid. */
/* #### This is a definite problem under Mule due to the amount of
stack data it might allocate. Need to be able to convert and
write out to a file. */
- GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len);
+ TO_EXTERNAL_FORMAT (LISP_STRING, data, ALLOCA, (bytes, len), Qbinary);
jpeg_memory_src (&cinfo, (JOCTET *) bytes, len);
}
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
- struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
/* It is OK for the unwind data to be local to this function,
because the unwind-protect is always executed when this
stack frame is still valid. */
assert (!NILP (data));
if (!(unwind.giffile = GifSetup()))
- signal_image_error ("Insufficent memory to instantiate GIF image", instantiator);
+ signal_image_error ("Insufficient memory to instantiate GIF image", instantiator);
/* set up error facilities */
if (setjmp(gif_err.setjmp_buffer))
}
GifSetErrorFunc(unwind.giffile, (Gif_error_func)gif_error_func, (VoidPtr)&gif_err);
- GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len);
+ TO_EXTERNAL_FORMAT (LISP_STRING, data, ALLOCA, (bytes, len), Qbinary);
mem_struct.bytes = bytes;
mem_struct.len = len;
mem_struct.index = 0;
height = unwind.giffile->SHeight;
width = unwind.giffile->SWidth;
- unwind.eimage = (unsigned char*)
+ unwind.eimage = (unsigned char*)
xmalloc (width * height * 3 * unwind.giffile->ImageCount);
if (!unwind.eimage)
signal_image_error("Unable to allocate enough memory for image", instantiator);
eip = unwind.eimage + (width * height * 3 * slice) + (row * width * 3);
for (j = 0; j < width; j++)
{
- unsigned char pixel =
+ unsigned char pixel =
unwind.giffile->SavedImages[slice].RasterBits[(i * width) + j];
*eip++ = cmo->Colors[pixel].Red;
*eip++ = cmo->Colors[pixel].Green;
unwind.giffile->SavedImages[0].ExtensionBlockCount)
{
timeout = (unsigned short)
- ((unwind.giffile->SavedImages[0].ExtensionBlocks[0].Bytes[2] << 8) +
+ ((unwind.giffile->SavedImages[0].ExtensionBlocks[0].Bytes[2] << 8) +
unwind.giffile-> SavedImages[0].ExtensionBlocks[0].Bytes[1]) * 10;
}
if (!NILP (tid))
IMAGE_INSTANCE_PIXMAP_TIMEOUT (ii) = XINT (tid);
}
-
+
unbind_to (speccount, Qnil);
}
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
- struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
struct png_unwind_data unwind;
int speccount = specpdl_depth ();
int height, width;
/* #### This is a definite problem under Mule due to the amount of
stack data it might allocate. Need to think about using Lstreams */
- GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len);
+ TO_EXTERNAL_FORMAT (LISP_STRING, data, ALLOCA, (bytes, len), Qbinary);
tbr.bytes = bytes;
tbr.len = len;
tbr.index = 0;
}
else
{
- struct Lisp_Color_Instance *c;
+ Lisp_Color_Instance *c;
Lisp_Object rgblist;
c = XCOLOR_INSTANCE (bkgd);
struct tiff_error_struct
{
-#if HAVE_VSNPRINTF
+#ifdef HAVE_VSNPRINTF
char err_str[256];
#else
char err_str[1024]; /* return the error string */
va_list vargs;
va_start (vargs, fmt);
-#if HAVE_VSNPRINTF
+#ifdef HAVE_VSNPRINTF
vsnprintf (tiff_err_data.err_str, 255, fmt, vargs);
#else
/* pray this doesn't overflow... */
tiff_warning_func(CONST char *module, CONST char *fmt, ...)
{
va_list vargs;
-#if HAVE_VSNPRINTF
+#ifdef HAVE_VSNPRINTF
char warn_str[256];
#else
char warn_str[1024];
#endif
va_start (vargs, fmt);
-#if HAVE_VSNPRINTF
+#ifdef HAVE_VSNPRINTF
vsnprintf (warn_str, 255, fmt, vargs);
#else
vsprintf (warn_str, fmt, vargs);
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
- struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
tiff_memory_storage mem_struct;
/* It is OK for the unwind data to be local to this function,
because the unwind-protect is always executed when this
/* #### This is a definite problem under Mule due to the amount of
stack data it might allocate. Think about Lstreams... */
- GET_STRING_BINARY_DATA_ALLOCA (data, bytes, len);
+ TO_EXTERNAL_FORMAT (LISP_STRING, data,
+ ALLOCA, (bytes, len),
+ Qbinary);
mem_struct.bytes = bytes;
mem_struct.len = len;
mem_struct.index = 0;
tiff_memory_seek, tiff_memory_close, tiff_memory_size,
tiff_map_noop, tiff_unmap_noop);
if (!unwind.tiff)
- signal_image_error ("Insufficent memory to instantiate TIFF image", instantiator);
+ signal_image_error ("Insufficient memory to instantiate TIFF image", instantiator);
TIFFGetField (unwind.tiff, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField (unwind.tiff, TIFFTAG_IMAGELENGTH, &height);
unwind.eimage = (unsigned char *) xmalloc (width * height * 3);
- /* ### This is little more than proof-of-concept/function testing.
+ /* #### This is little more than proof-of-concept/function testing.
It needs to be reimplemented via scanline reads for both memory
compactness. */
raster = (uint32*) _TIFFmalloc (width * height * sizeof (uint32));