/* Functions to access the contents of a bitmap, given an id. */
int
-x_bitmap_height (f, id)
- FRAME_PTR f;
- int id;
+x_bitmap_height (FRAME_PTR f, int id)
{
return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].height;
}
int
-x_bitmap_width (f, id)
- FRAME_PTR f;
- int id;
+x_bitmap_width (FRAME_PTR f, int id)
{
return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].width;
}
#if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
int
-x_bitmap_pixmap (f, id)
- FRAME_PTR f;
- int id;
+x_bitmap_pixmap (FRAME_PTR f, int id)
{
return (int) FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap;
}
#ifdef HAVE_X_WINDOWS
int
-x_bitmap_mask (f, id)
- FRAME_PTR f;
- int id;
+x_bitmap_mask (FRAME_PTR f, int id)
{
return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].mask;
}
/* Allocate a new bitmap record. Returns index of new record. */
static int
-x_allocate_bitmap_record (f)
- FRAME_PTR f;
+x_allocate_bitmap_record (FRAME_PTR f)
{
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
int i;
/* Add one reference to the reference count of the bitmap with id ID. */
void
-x_reference_bitmap (f, id)
- FRAME_PTR f;
- int id;
+x_reference_bitmap (FRAME_PTR f, int id)
{
++FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].refcount;
}
/* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS. */
int
-x_create_bitmap_from_data (f, bits, width, height)
- struct frame *f;
- char *bits;
- unsigned int width, height;
+x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsigned int height)
{
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
int id;
/* Create bitmap from file FILE for frame F. */
int
-x_create_bitmap_from_file (f, file)
- struct frame *f;
- Lisp_Object file;
+x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
{
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
/* Free bitmap B. */
static void
-free_bitmap_record (dpyinfo, bm)
- Display_Info *dpyinfo;
- Bitmap_Record *bm;
+free_bitmap_record (Display_Info *dpyinfo, Bitmap_Record *bm)
{
#ifdef HAVE_X_WINDOWS
XFreePixmap (dpyinfo->display, bm->pixmap);
/* Remove reference to bitmap with id number ID. */
void
-x_destroy_bitmap (f, id)
- FRAME_PTR f;
- int id;
+x_destroy_bitmap (FRAME_PTR f, int id)
{
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
/* Free all the bitmaps for the display specified by DPYINFO. */
void
-x_destroy_all_bitmaps (dpyinfo)
- Display_Info *dpyinfo;
+x_destroy_all_bitmaps (Display_Info *dpyinfo)
{
int i;
Bitmap_Record *bm = dpyinfo->bitmaps;
It's nicer with some borders in this context */
int
-x_create_bitmap_mask (f, id)
- struct frame *f;
- int id;
+x_create_bitmap_mask (struct frame *f, int id)
{
Pixmap pixmap, mask;
XImagePtr ximg, mask_img;
image_types and caches the loading status of TYPE. */
static Lisp_Object
-define_image_type (type, loaded)
- struct image_type *type;
- int loaded;
+define_image_type (struct image_type *type, int loaded)
{
Lisp_Object success;
structure. Value is null if SYMBOL is not a known image type. */
static INLINE struct image_type *
-lookup_image_type (symbol)
- Lisp_Object symbol;
+lookup_image_type (Lisp_Object symbol)
{
struct image_type *type;
image type. */
int
-valid_image_p (object)
- Lisp_Object object;
+valid_image_p (Lisp_Object object)
{
int valid_p = 0;
therefore simply displays a message. */
static void
-image_error (format, arg1, arg2)
- char *format;
- Lisp_Object arg1, arg2;
+image_error (char *format, Lisp_Object arg1, Lisp_Object arg2)
{
add_to_log (format, arg1, arg2);
}
allowed keyword/value pairs. Value is non-zero if SPEC is valid. */
static int
-parse_image_spec (spec, keywords, nkeywords, type)
- Lisp_Object spec;
- struct image_keyword *keywords;
- int nkeywords;
- Lisp_Object type;
+parse_image_spec (Lisp_Object spec, struct image_keyword *keywords,
+ int nkeywords, Lisp_Object type)
{
int i;
Lisp_Object plist;
to 1 if KEY was found in SPEC, set it to 0 otherwise. */
static Lisp_Object
-image_spec_value (spec, key, found)
- Lisp_Object spec, key;
- int *found;
+image_spec_value (Lisp_Object spec, Lisp_Object key, int *found)
{
Lisp_Object tail;
SPEC. SPEC has a hash value of HASH. */
static struct image *
-make_image (spec, hash)
- Lisp_Object spec;
- unsigned hash;
+make_image (Lisp_Object spec, unsigned int hash)
{
struct image *img = (struct image *) xmalloc (sizeof *img);
Lisp_Object file = image_spec_value (spec, QCfile, NULL);
/* Free image IMG which was used on frame F, including its resources. */
static void
-free_image (f, img)
- struct frame *f;
- struct image *img;
+free_image (struct frame *f, struct image *img)
{
if (img)
{
otherwise, return 0. */
int
-check_image_size (f, width, height)
- struct frame *f;
- int width;
- int height;
+check_image_size (struct frame *f, int width, int height)
{
int w, h;
drawing an image. */
void
-prepare_image_for_display (f, img)
- struct frame *f;
- struct image *img;
+prepare_image_for_display (struct frame *f, struct image *img)
{
EMACS_TIME t;
drawn in face FACE. */
int
-image_ascent (img, face, slice)
- struct image *img;
- struct face *face;
- struct glyph_slice *slice;
+image_ascent (struct image *img, struct face *face, struct glyph_slice *slice)
{
int height;
int ascent;
On W32, XIMG is assumed to a device context with the bitmap selected. */
static RGB_PIXEL_COLOR
-four_corners_best (ximg, corners, width, height)
- XImagePtr_or_DC ximg;
- int *corners;
- unsigned long width, height;
+four_corners_best (XImagePtr_or_DC ximg, int *corners,
+ unsigned long width, unsigned long height)
{
RGB_PIXEL_COLOR corner_pixels[4], best;
int i, best_count;
use for the heuristic. */
RGB_PIXEL_COLOR
-image_background (img, f, ximg)
- struct image *img;
- struct frame *f;
- XImagePtr_or_DC ximg;
+image_background (struct image *img, struct frame *f, XImagePtr_or_DC ximg)
{
if (! img->background_valid)
/* IMG doesn't have a background yet, try to guess a reasonable value. */
existing XImage object to use for the heuristic. */
int
-image_background_transparent (img, f, mask)
- struct image *img;
- struct frame *f;
- XImagePtr_or_DC mask;
+image_background_transparent (struct image *img, struct frame *f, XImagePtr_or_DC mask)
{
if (! img->background_transparent_valid)
/* IMG doesn't have a background yet, try to guess a reasonable value. */
the image, if any. */
static void
-x_clear_image_1 (f, img, pixmap_p, mask_p, colors_p)
- struct frame *f;
- struct image *img;
- int pixmap_p, mask_p, colors_p;
+x_clear_image_1 (struct frame *f, struct image *img, int pixmap_p, int mask_p,
+ int colors_p)
{
if (pixmap_p && img->pixmap)
{
/* Free X resources of image IMG which is used on frame F. */
static void
-x_clear_image (f, img)
- struct frame *f;
- struct image *img;
+x_clear_image (struct frame *f, struct image *img)
{
BLOCK_INPUT;
x_clear_image_1 (f, img, 1, 1, 1);
color. */
static unsigned long
-x_alloc_image_color (f, img, color_name, dflt)
- struct frame *f;
- struct image *img;
- Lisp_Object color_name;
- unsigned long dflt;
+x_alloc_image_color (struct frame *f, struct image *img, Lisp_Object color_name,
+ unsigned long dflt)
{
XColor color;
unsigned long result;
heap. Call free_image_cache to free an image cache. */
struct image_cache *
-make_image_cache ()
+make_image_cache (void)
{
struct image_cache *c = (struct image_cache *) xmalloc (sizeof *c);
int size;
/* Find an image matching SPEC in the cache, and return it. If no
image is found, return NULL. */
static struct image *
-search_image_cache (f, spec, hash)
- struct frame *f;
- Lisp_Object spec;
- unsigned hash;
+search_image_cache (struct frame *f, Lisp_Object spec, unsigned int hash)
{
struct image *img;
struct image_cache *c = FRAME_IMAGE_CACHE (f);
/* Search frame F for an image with spec SPEC, and free it. */
static void
-uncache_image (f, spec)
- struct frame *f;
- Lisp_Object spec;
+uncache_image (struct frame *f, Lisp_Object spec)
{
struct image *img = search_image_cache (f, spec, sxhash (spec, 0));
if (img)
caches. */
void
-free_image_cache (f)
- struct frame *f;
+free_image_cache (struct frame *f)
{
struct image_cache *c = FRAME_IMAGE_CACHE (f);
if (c)
by the image's specification, */
static void
-postprocess_image (f, img)
- struct frame *f;
- struct image *img;
+postprocess_image (struct frame *f, struct image *img)
{
/* Manipulation of the image's mask. */
if (img->pixmap)
SPEC must be a valid Lisp image specification (see valid_image_p). */
int
-lookup_image (f, spec)
- struct frame *f;
- Lisp_Object spec;
+lookup_image (struct frame *f, Lisp_Object spec)
{
struct image_cache *c;
struct image *img;
/* Cache image IMG in the image cache of frame F. */
static void
-cache_image (f, img)
- struct frame *f;
- struct image *img;
+cache_image (struct frame *f, struct image *img)
{
struct image_cache *c = FRAME_IMAGE_CACHE (f);
int i;
/* Mark Lisp objects in image IMG. */
static void
-mark_image (img)
- struct image *img;
+mark_image (struct image *img)
{
mark_object (img->spec);
mark_object (img->dependencies);
should indicate the bit depth of the image. */
static int
-x_create_x_image_and_pixmap (f, width, height, depth, ximg, pixmap)
- struct frame *f;
- int width, height, depth;
- XImagePtr *ximg;
- Pixmap *pixmap;
+x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth,
+ XImagePtr *ximg, Pixmap *pixmap)
{
#ifdef HAVE_X_WINDOWS
Display *display = FRAME_X_DISPLAY (f);
/* Destroy XImage XIMG. Free XIMG->data. */
static void
-x_destroy_x_image (ximg)
- XImagePtr ximg;
+x_destroy_x_image (XImagePtr ximg)
{
xassert (interrupt_input_blocked);
if (ximg)
are width and height of both the image and pixmap. */
static void
-x_put_x_image (f, ximg, pixmap, width, height)
- struct frame *f;
- XImagePtr ximg;
- Pixmap pixmap;
- int width, height;
+x_put_x_image (struct frame *f, XImagePtr ximg, Pixmap pixmap, int width, int height)
{
#ifdef HAVE_X_WINDOWS
GC gc;
found, or nil if not found. */
Lisp_Object
-x_find_image_file (file)
- Lisp_Object file;
+x_find_image_file (Lisp_Object file)
{
Lisp_Object file_found, search_path;
struct gcpro gcpro1, gcpro2;
occurred. *SIZE is set to the size of the file. */
static unsigned char *
-slurp_file (file, size)
- char *file;
- int *size;
+slurp_file (char *file, int *size)
{
FILE *fp = NULL;
unsigned char *buf = NULL;
displayed is used. */
static int
-xbm_image_p (object)
- Lisp_Object object;
+xbm_image_p (Lisp_Object object)
{
struct image_keyword kw[XBM_LAST];
scanning a number, store its value in *IVAL. */
static int
-xbm_scan (s, end, sval, ival)
- unsigned char **s, *end;
- char *sval;
- int *ival;
+xbm_scan (unsigned char **s, unsigned char *end, char *sval, int *ival)
{
unsigned int c;
static void
-Create_Pixmap_From_Bitmap_Data (f, img, data, fg, bg, non_default_colors)
- struct frame *f;
- struct image *img;
- char *data;
- RGB_PIXEL_COLOR fg, bg;
- int non_default_colors;
+Create_Pixmap_From_Bitmap_Data (struct frame *f, struct image *img, char *data,
+ RGB_PIXEL_COLOR fg, RGB_PIXEL_COLOR bg,
+ int non_default_colors)
{
#ifdef HAVE_NTGUI
img->pixmap
invalid (the bitmap remains unread). */
static int
-xbm_read_bitmap_data (f, contents, end, width, height, data, inhibit_image_error)
- struct frame *f;
- unsigned char *contents, *end;
- int *width, *height;
- unsigned char **data;
- int inhibit_image_error;
+xbm_read_bitmap_data (struct frame *f, unsigned char *contents, unsigned char *end,
+ int *width, int *height, unsigned char **data,
+ int inhibit_image_error)
{
unsigned char *s = contents;
char buffer[BUFSIZ];
successful. */
static int
-xbm_load_image (f, img, contents, end)
- struct frame *f;
- struct image *img;
- unsigned char *contents, *end;
+xbm_load_image (struct frame *f, struct image *img, unsigned char *contents,
+ unsigned char *end)
{
int rc;
unsigned char *data;
/* Value is non-zero if DATA looks like an in-memory XBM file. */
static int
-xbm_file_p (data)
- Lisp_Object data;
+xbm_file_p (Lisp_Object data)
{
int w, h;
return (STRINGP (data)
non-zero if successful. */
static int
-xbm_load (f, img)
- struct frame *f;
- struct image *img;
+xbm_load (struct frame *f, struct image *img)
{
int success_p = 0;
Lisp_Object file_name;
/* Initialize the color cache. */
static void
-xpm_init_color_cache (f, attrs)
- struct frame *f;
- XpmAttributes *attrs;
+xpm_init_color_cache (struct frame *f, XpmAttributes *attrs)
{
size_t nbytes = XPM_COLOR_CACHE_BUCKETS * sizeof *xpm_color_cache;
xpm_color_cache = (struct xpm_cached_color **) xmalloc (nbytes);
/* Free the color cache. */
static void
-xpm_free_color_cache ()
+xpm_free_color_cache (void)
{
struct xpm_cached_color *p, *next;
int i;
cache. */
static int
-xpm_color_bucket (color_name)
- char *color_name;
+xpm_color_bucket (char *color_name)
{
unsigned h = 0;
char *s;
entry added. */
static struct xpm_cached_color *
-xpm_cache_color (f, color_name, color, bucket)
- struct frame *f;
- char *color_name;
- XColor *color;
- int bucket;
+xpm_cache_color (struct frame *f, char *color_name, XColor *color, int bucket)
{
size_t nbytes;
struct xpm_cached_color *p;
allocation failed. */
static int
-xpm_lookup_color (f, color_name, color)
- struct frame *f;
- char *color_name;
- XColor *color;
+xpm_lookup_color (struct frame *f, char *color_name, XColor *color)
{
struct xpm_cached_color *p;
int h = xpm_color_bucket (color_name);
if successful. */
static int
-xpm_alloc_color (dpy, cmap, color_name, color, closure)
- Display *dpy;
- Colormap cmap;
- char *color_name;
- XColor *color;
- void *closure;
+xpm_alloc_color (Display *dpy, Colormap cmap, char *color_name, XColor *color,
+ void *closure)
{
return xpm_lookup_color ((struct frame *) closure, color_name, color);
}
non-zero if successful. */
static int
-xpm_free_colors (dpy, cmap, pixels, npixels, closure)
- Display *dpy;
- Colormap cmap;
- Pixel *pixels;
- int npixels;
- void *closure;
+xpm_free_colors (Display *dpy, Colormap cmap, Pixel *pixels, int npixels, void *closure)
{
return 1;
}
cdr are strings. */
static int
-xpm_valid_color_symbols_p (color_symbols)
- Lisp_Object color_symbols;
+xpm_valid_color_symbols_p (Lisp_Object color_symbols)
{
while (CONSP (color_symbols))
{
/* Value is non-zero if OBJECT is a valid XPM image specification. */
static int
-xpm_image_p (object)
- Lisp_Object object;
+xpm_image_p (Lisp_Object object)
{
struct image_keyword fmt[XPM_LAST];
bcopy (xpm_format, fmt, sizeof fmt);
#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
int
-x_create_bitmap_from_xpm_data (f, bits)
- struct frame *f;
- char **bits;
+x_create_bitmap_from_xpm_data (struct frame *f, char **bits)
{
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
int id, rc;
#ifdef HAVE_XPM
static int
-xpm_load (f, img)
- struct frame *f;
- struct image *img;
+xpm_load (struct frame *f, struct image *img)
{
int rc;
XpmAttributes attrs;
/* Initialize the color table. */
static void
-init_color_table ()
+init_color_table (void)
{
int size = CT_SIZE * sizeof (*ct_table);
ct_table = (struct ct_color **) xmalloc (size);
/* Free memory associated with the color table. */
static void
-free_color_table ()
+free_color_table (void)
{
int i;
struct ct_color *p, *next;
G, B, and make an entry in the color table. */
static unsigned long
-lookup_rgb_color (f, r, g, b)
- struct frame *f;
- int r, g, b;
+lookup_rgb_color (struct frame *f, int r, int g, int b)
{
unsigned hash = CT_HASH_RGB (r, g, b);
int i = hash % CT_SIZE;
table. If not already present, allocate it. Value is PIXEL. */
static unsigned long
-lookup_pixel_color (f, pixel)
- struct frame *f;
- unsigned long pixel;
+lookup_pixel_color (struct frame *f, unsigned long pixel)
{
int i = pixel % CT_SIZE;
struct ct_color *p;
allocated via xmalloc. Set *N to the number of colors. */
static unsigned long *
-colors_in_color_table (n)
- int *n;
+colors_in_color_table (int *n)
{
int i, j;
struct ct_color *p;
allocated with xmalloc; it must be freed by the caller. */
static XColor *
-x_to_xcolors (f, img, rgb_p)
- struct frame *f;
- struct image *img;
- int rgb_p;
+x_to_xcolors (struct frame *f, struct image *img, int rgb_p)
{
int x, y;
XColor *colors, *p;
COLORS will be freed; an existing IMG->pixmap will be freed, too. */
static void
-x_from_xcolors (f, img, colors)
- struct frame *f;
- struct image *img;
- XColor *colors;
+x_from_xcolors (struct frame *f, struct image *img, XColor *colors)
{
int x, y;
XImagePtr oimg = NULL;
outgoing image. */
static void
-x_detect_edges (f, img, matrix, color_adjust)
- struct frame *f;
- struct image *img;
- int matrix[9], color_adjust;
+x_detect_edges (struct frame *f, struct image *img, int *matrix, int color_adjust)
{
XColor *colors = x_to_xcolors (f, img, 1);
XColor *new, *p;
on frame F. */
static void
-x_emboss (f, img)
- struct frame *f;
- struct image *img;
+x_emboss (struct frame *f, struct image *img)
{
x_detect_edges (f, img, emboss_matrix, 0xffff / 2);
}
to draw disabled buttons, for example. */
static void
-x_laplace (f, img)
- struct frame *f;
- struct image *img;
+x_laplace (struct frame *f, struct image *img)
{
x_detect_edges (f, img, laplace_matrix, 45000);
}
number. */
static void
-x_edge_detection (f, img, matrix, color_adjust)
- struct frame *f;
- struct image *img;
- Lisp_Object matrix, color_adjust;
+x_edge_detection (struct frame *f, struct image *img, Lisp_Object matrix,
+ Lisp_Object color_adjust)
{
int i = 0;
int trans[9];
/* Transform image IMG on frame F so that it looks disabled. */
static void
-x_disable_image (f, img)
- struct frame *f;
- struct image *img;
+x_disable_image (struct frame *f, struct image *img)
{
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
#ifdef HAVE_NTGUI
heuristically. Value is non-zero if successful. */
static int
-x_build_heuristic_mask (f, img, how)
- struct frame *f;
- struct image *img;
- Lisp_Object how;
+x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how)
{
XImagePtr_or_DC ximg;
#ifndef HAVE_NTGUI
/* Return non-zero if OBJECT is a valid PBM image specification. */
static int
-pbm_image_p (object)
- Lisp_Object object;
+pbm_image_p (Lisp_Object object)
{
struct image_keyword fmt[PBM_LAST];
end of input. */
static int
-pbm_scan_number (s, end)
- unsigned char **s, *end;
+pbm_scan_number (unsigned char **s, unsigned char *end)
{
int c = 0, val = -1;
/* Load PBM image IMG for use on frame F. */
static int
-pbm_load (f, img)
- struct frame *f;
- struct image *img;
+pbm_load (struct frame *f, struct image *img)
{
int raw_p, x, y;
int width, height, max_color_idx = 0;
/* Return non-zero if OBJECT is a valid PNG image specification. */
static int
-png_image_p (object)
- Lisp_Object object;
+png_image_p (Lisp_Object object)
{
struct image_keyword fmt[PNG_LAST];
bcopy (png_format, fmt, sizeof fmt);
is initialized. */
static void
-my_png_error (png_ptr, msg)
- png_struct *png_ptr;
- char *msg;
+my_png_error (png_struct *png_ptr, const char *msg)
{
xassert (png_ptr != NULL);
image_error ("PNG error: %s", build_string (msg), Qnil);
static void
-my_png_warning (png_ptr, msg)
- png_struct *png_ptr;
- char *msg;
+my_png_warning (png_struct *png_ptr, const char *msg)
{
xassert (png_ptr != NULL);
image_error ("PNG warning: %s", build_string (msg), Qnil);
bytes from the input to DATA. */
static void
-png_read_from_memory (png_ptr, data, length)
- png_structp png_ptr;
- png_bytep data;
- png_size_t length;
+png_read_from_memory (png_structp png_ptr, png_bytep data, png_size_t length)
{
struct png_memory_storage *tbr
= (struct png_memory_storage *) fn_png_get_io_ptr (png_ptr);
bytes from the input to DATA. */
static void
-png_read_from_file (png_ptr, data, length)
- png_structp png_ptr;
- png_bytep data;
- png_size_t length;
+png_read_from_file (png_structp png_ptr, png_bytep data, png_size_t length)
{
FILE *fp = (FILE *) fn_png_get_io_ptr (png_ptr);
successful. */
static int
-png_load (f, img)
- struct frame *f;
- struct image *img;
+png_load (struct frame *f, struct image *img)
{
Lisp_Object file, specified_file;
Lisp_Object specified_data;
/* Return non-zero if OBJECT is a valid JPEG image specification. */
static int
-jpeg_image_p (object)
- Lisp_Object object;
+jpeg_image_p (Lisp_Object object)
{
struct image_keyword fmt[JPEG_LAST];
static void
-my_error_exit (cinfo)
- j_common_ptr cinfo;
+my_error_exit (j_common_ptr cinfo)
{
struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err;
longjmp (mgr->setjmp_buffer, 1);
libjpeg.doc from the JPEG lib distribution. */
static void
-our_common_init_source (cinfo)
- j_decompress_ptr cinfo;
+our_common_init_source (j_decompress_ptr cinfo)
{
}
jpeg_finish_decompress() after all data has been processed. */
static void
-our_common_term_source (cinfo)
- j_decompress_ptr cinfo;
+our_common_term_source (j_decompress_ptr cinfo)
{
}
static JOCTET our_memory_buffer[2];
static boolean
-our_memory_fill_input_buffer (cinfo)
- j_decompress_ptr cinfo;
+our_memory_fill_input_buffer (j_decompress_ptr cinfo)
{
/* Insert a fake EOI marker. */
struct jpeg_source_mgr *src = cinfo->src;
is the JPEG data source manager. */
static void
-our_memory_skip_input_data (cinfo, num_bytes)
- j_decompress_ptr cinfo;
- long num_bytes;
+our_memory_skip_input_data (j_decompress_ptr cinfo, long int num_bytes)
{
struct jpeg_source_mgr *src = (struct jpeg_source_mgr *) cinfo->src;
reading the image. */
static void
-jpeg_memory_src (cinfo, data, len)
- j_decompress_ptr cinfo;
- JOCTET *data;
- unsigned int len;
+jpeg_memory_src (j_decompress_ptr cinfo, JOCTET *data, unsigned int len)
{
struct jpeg_source_mgr *src;
whenever more data is needed. The data is read from a FILE *. */
static boolean
-our_stdio_fill_input_buffer (cinfo)
- j_decompress_ptr cinfo;
+our_stdio_fill_input_buffer (j_decompress_ptr cinfo)
{
struct jpeg_stdio_mgr *src;
is the JPEG data source manager. */
static void
-our_stdio_skip_input_data (cinfo, num_bytes)
- j_decompress_ptr cinfo;
- long num_bytes;
+our_stdio_skip_input_data (j_decompress_ptr cinfo, long int num_bytes)
{
struct jpeg_stdio_mgr *src;
src = (struct jpeg_stdio_mgr *) cinfo->src;
reading the image. */
static void
-jpeg_file_src (cinfo, fp)
- j_decompress_ptr cinfo;
- FILE *fp;
+jpeg_file_src (j_decompress_ptr cinfo, FILE *fp)
{
struct jpeg_stdio_mgr *src;
from the JPEG lib. */
static int
-jpeg_load (f, img)
- struct frame *f;
- struct image *img;
+jpeg_load (struct frame *f, struct image *img)
{
struct jpeg_decompress_struct cinfo;
struct my_jpeg_error_mgr mgr;
/* Return non-zero if OBJECT is a valid TIFF image specification. */
static int
-tiff_image_p (object)
- Lisp_Object object;
+tiff_image_p (Lisp_Object object)
{
struct image_keyword fmt[TIFF_LAST];
bcopy (tiff_format, fmt, sizeof fmt);
tiff_memory_source;
static size_t
-tiff_read_from_memory (data, buf, size)
- thandle_t data;
- tdata_t buf;
- tsize_t size;
+tiff_read_from_memory (thandle_t data, tdata_t buf, tsize_t size)
{
tiff_memory_source *src = (tiff_memory_source *) data;
}
static size_t
-tiff_write_from_memory (data, buf, size)
- thandle_t data;
- tdata_t buf;
- tsize_t size;
+tiff_write_from_memory (thandle_t data, tdata_t buf, tsize_t size)
{
return (size_t) -1;
}
static toff_t
-tiff_seek_in_memory (data, off, whence)
- thandle_t data;
- toff_t off;
- int whence;
+tiff_seek_in_memory (thandle_t data, toff_t off, int whence)
{
tiff_memory_source *src = (tiff_memory_source *) data;
int idx;
}
static int
-tiff_close_memory (data)
- thandle_t data;
+tiff_close_memory (thandle_t data)
{
/* NOOP */
return 0;
}
static int
-tiff_mmap_memory (data, pbase, psize)
- thandle_t data;
- tdata_t *pbase;
- toff_t *psize;
+tiff_mmap_memory (thandle_t data, tdata_t *pbase, toff_t *psize)
{
/* It is already _IN_ memory. */
return 0;
}
static void
-tiff_unmap_memory (data, base, size)
- thandle_t data;
- tdata_t base;
- toff_t size;
+tiff_unmap_memory (thandle_t data, tdata_t base, toff_t size)
{
/* We don't need to do this. */
}
static toff_t
-tiff_size_of_memory (data)
- thandle_t data;
+tiff_size_of_memory (thandle_t data)
{
return ((tiff_memory_source *) data)->len;
}
static void
-tiff_error_handler (title, format, ap)
- const char *title, *format;
- va_list ap;
+tiff_error_handler (const char *title, const char *format, va_list ap)
{
char buf[512];
int len;
static void
-tiff_warning_handler (title, format, ap)
- const char *title, *format;
- va_list ap;
+tiff_warning_handler (const char *title, const char *format, va_list ap)
{
char buf[512];
int len;
successful. */
static int
-tiff_load (f, img)
- struct frame *f;
- struct image *img;
+tiff_load (struct frame *f, struct image *img)
{
Lisp_Object file, specified_file;
Lisp_Object specified_data;
/* Free X resources of GIF image IMG which is used on frame F. */
static void
-gif_clear_image (f, img)
- struct frame *f;
- struct image *img;
+gif_clear_image (struct frame *f, struct image *img)
{
/* IMG->data.ptr_val may contain metadata with extension data. */
img->data.lisp_val = Qnil;
/* Return non-zero if OBJECT is a valid GIF image specification. */
static int
-gif_image_p (object)
- Lisp_Object object;
+gif_image_p (Lisp_Object object)
{
struct image_keyword fmt[GIF_LAST];
bcopy (gif_format, fmt, sizeof fmt);
static gif_memory_source *current_gif_memory_src;
static int
-gif_read_from_memory (file, buf, len)
- GifFileType *file;
- GifByteType *buf;
- int len;
+gif_read_from_memory (GifFileType *file, GifByteType *buf, int len)
{
gif_memory_source *src = current_gif_memory_src;
static const int interlace_increment[] = {8, 8, 4, 2};
static int
-gif_load (f, img)
- struct frame *f;
- struct image *img;
+gif_load (struct frame *f, struct image *img)
{
Lisp_Object file, specified_file;
Lisp_Object specified_data;
identify the SVG format. */
static int
-svg_image_p (object)
- Lisp_Object object;
+svg_image_p (Lisp_Object object)
{
struct image_keyword fmt[SVG_LAST];
bcopy (svg_format, fmt, sizeof fmt);
the prototype thus needs to be compatible with that structure. */
static int
-svg_load (f, img)
- struct frame *f;
- struct image *img;
+svg_load (struct frame *f, struct image *img)
{
int success_p = 0;
Lisp_Object file_name;
Returns non-zero when successful. */
static int
-svg_load_image (f, img, contents, size)
- /* Pointer to emacs frame structure. */
- struct frame *f;
- /* Pointer to emacs image structure. */
- struct image *img;
- /* String containing the SVG XML data to be parsed. */
- unsigned char *contents;
- /* Size of data in bytes. */
- unsigned int size;
+svg_load_image (struct frame *f, /* Pointer to emacs frame structure. */
+ struct image *img, /* Pointer to emacs image structure. */
+ unsigned char *contents, /* String containing the SVG XML data to be parsed. */
+ unsigned int size) /* Size of data in bytes. */
{
RsvgHandle *rsvg_handle;
RsvgDimensionData dimension_data;
/* Free X resources of Ghostscript image IMG which is used on frame F. */
static void
-gs_clear_image (f, img)
- struct frame *f;
- struct image *img;
+gs_clear_image (struct frame *f, struct image *img)
{
/* IMG->data.ptr_val may contain a recorded colormap. */
xfree (img->data.ptr_val);
specification. */
static int
-gs_image_p (object)
- Lisp_Object object;
+gs_image_p (Lisp_Object object)
{
struct image_keyword fmt[GS_LAST];
Lisp_Object tem;
if successful. */
static int
-gs_load (f, img)
- struct frame *f;
- struct image *img;
+gs_load (struct frame *f, struct image *img)
{
char buffer[100];
Lisp_Object window_and_pixmap_id = Qnil, loader, pt_height, pt_width;
telling Emacs that Ghostscript has finished drawing. */
void
-x_kill_gs_process (pixmap, f)
- Pixmap pixmap;
- struct frame *f;
+x_kill_gs_process (Pixmap pixmap, struct frame *f)
{
struct image_cache *c = FRAME_IMAGE_CACHE (f);
int class, i;
}
void
-syms_of_image ()
+syms_of_image (void)
{
extern Lisp_Object Qrisky_local_variable; /* Syms_of_xdisp has already run. */
}
void
-init_image ()
+init_image (void)
{
}