Mercurial > hg > xemacs-beta
comparison src/glyphs-gtk.c @ 1726:a8d8f419b459
[xemacs-hg @ 2003-09-30 15:26:34 by james]
Add type information to xfree to avoid alias creation.
author | james |
---|---|
date | Tue, 30 Sep 2003 15:27:01 +0000 |
parents | 01c57eb70ae9 |
children | 543769b89fed |
comparison
equal
deleted
inserted
replaced
1725:7ff8f4d70aec | 1726:a8d8f419b459 |
---|---|
258 else | 258 else |
259 for (q = 0; q < byte_cnt; q++) *dp++ = conv.cp[q]; | 259 for (q = 0; q < byte_cnt; q++) *dp++ = conv.cp[q]; |
260 #endif | 260 #endif |
261 } | 261 } |
262 } | 262 } |
263 xfree(qtable); | 263 xfree(qtable, quant_table *); |
264 } else { | 264 } else { |
265 unsigned long rshift,gshift,bshift,rbits,gbits,bbits,junk; | 265 unsigned long rshift,gshift,bshift,rbits,gbits,bbits,junk; |
266 junk = vis->red_mask; | 266 junk = vis->red_mask; |
267 rshift = 0; | 267 rshift = 0; |
268 while ((junk & 0x1) == 0) | 268 while ((junk & 0x1) == 0) |
412 if (IMAGE_INSTANCE_GTK_PIXMAP_SLICE (p,i)) | 412 if (IMAGE_INSTANCE_GTK_PIXMAP_SLICE (p,i)) |
413 { | 413 { |
414 gdk_pixmap_unref (IMAGE_INSTANCE_GTK_PIXMAP_SLICE (p,i)); | 414 gdk_pixmap_unref (IMAGE_INSTANCE_GTK_PIXMAP_SLICE (p,i)); |
415 IMAGE_INSTANCE_GTK_PIXMAP_SLICE (p, i) = 0; | 415 IMAGE_INSTANCE_GTK_PIXMAP_SLICE (p, i) = 0; |
416 } | 416 } |
417 xfree (IMAGE_INSTANCE_GTK_PIXMAP_SLICES (p)); | 417 xfree (IMAGE_INSTANCE_GTK_PIXMAP_SLICES (p), GdkPixmap **); |
418 IMAGE_INSTANCE_GTK_PIXMAP_SLICES (p) = 0; | 418 IMAGE_INSTANCE_GTK_PIXMAP_SLICES (p) = 0; |
419 } | 419 } |
420 | 420 |
421 if (IMAGE_INSTANCE_GTK_CURSOR (p)) | 421 if (IMAGE_INSTANCE_GTK_CURSOR (p)) |
422 { | 422 { |
440 | 440 |
441 if (IMAGE_INSTANCE_TYPE (p) != IMAGE_WIDGET | 441 if (IMAGE_INSTANCE_TYPE (p) != IMAGE_WIDGET |
442 && IMAGE_INSTANCE_TYPE (p) != IMAGE_SUBWINDOW | 442 && IMAGE_INSTANCE_TYPE (p) != IMAGE_SUBWINDOW |
443 && IMAGE_INSTANCE_GTK_PIXELS (p)) | 443 && IMAGE_INSTANCE_GTK_PIXELS (p)) |
444 { | 444 { |
445 xfree (IMAGE_INSTANCE_GTK_PIXELS (p)); | 445 xfree (IMAGE_INSTANCE_GTK_PIXELS (p), unsigned long *); |
446 IMAGE_INSTANCE_GTK_PIXELS (p) = 0; | 446 IMAGE_INSTANCE_GTK_PIXELS (p) = 0; |
447 } | 447 } |
448 | 448 |
449 xfree (p->data); | 449 xfree (p->data, void *); |
450 p->data = 0; | 450 p->data = 0; |
451 } | 451 } |
452 | 452 |
453 static int | 453 static int |
454 gtk_image_instance_equal (struct Lisp_Image_Instance *p1, | 454 gtk_image_instance_equal (struct Lisp_Image_Instance *p1, |
836 { | 836 { |
837 gdk_image = convert_EImage_to_GDKImage (device, width, height, eimage, | 837 gdk_image = convert_EImage_to_GDKImage (device, width, height, eimage, |
838 &pixtbl, &npixels); | 838 &pixtbl, &npixels); |
839 if (!gdk_image) | 839 if (!gdk_image) |
840 { | 840 { |
841 if (pixtbl) xfree (pixtbl); | 841 if (pixtbl) |
842 xfree (pixtbl, unsigned long *); | |
842 signal_image_error("EImage to GdkImage conversion failed", instantiator); | 843 signal_image_error("EImage to GdkImage conversion failed", instantiator); |
843 } | 844 } |
844 | 845 |
845 if (slice == 0) | 846 if (slice == 0) |
846 /* Now create the pixmap and set up the image instance */ | 847 /* Now create the pixmap and set up the image instance */ |
1290 pixmap = gdk_pixmap_create_from_xpm (window, &mask, transparent_color, | 1291 pixmap = gdk_pixmap_create_from_xpm (window, &mask, transparent_color, |
1291 tempfileout); | 1292 tempfileout); |
1292 } | 1293 } |
1293 qxe_unlink (XSTRING_DATA (tempfile)); | 1294 qxe_unlink (XSTRING_DATA (tempfile)); |
1294 | 1295 |
1295 if (color_symbols) xfree (color_symbols); | 1296 if (color_symbols) |
1297 xfree (color_symbols, struct color_symbol *); | |
1296 | 1298 |
1297 if (!pixmap) | 1299 if (!pixmap) |
1298 signal_image_error ("Error reading pixmap", data); | 1300 signal_image_error ("Error reading pixmap", data); |
1299 | 1301 |
1300 gdk_window_get_geometry (pixmap, NULL, NULL, &w, &h, &depth); | 1302 gdk_window_get_geometry (pixmap, NULL, NULL, &w, &h, &depth); |