Mercurial > hg > xemacs-beta
comparison src/glyphs-x.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 |
---|---|
270 else | 270 else |
271 for (q = 0; q < byte_cnt; q++) *dp++ = conv.cp[q]; | 271 for (q = 0; q < byte_cnt; q++) *dp++ = conv.cp[q]; |
272 #endif | 272 #endif |
273 } | 273 } |
274 } | 274 } |
275 xfree(qtable); | 275 xfree (qtable, quant_table *); |
276 } else { | 276 } else { |
277 unsigned long rshift,gshift,bshift,rbits,gbits,bbits,junk; | 277 unsigned long rshift,gshift,bshift,rbits,gbits,bbits,junk; |
278 junk = vis->red_mask; | 278 junk = vis->red_mask; |
279 rshift = 0; | 279 rshift = 0; |
280 while ((junk & 0x1) == 0) | 280 while ((junk & 0x1) == 0) |
436 if (IMAGE_INSTANCE_X_PIXMAP_SLICE (p,i)) | 436 if (IMAGE_INSTANCE_X_PIXMAP_SLICE (p,i)) |
437 { | 437 { |
438 XFreePixmap (dpy, IMAGE_INSTANCE_X_PIXMAP_SLICE (p,i)); | 438 XFreePixmap (dpy, IMAGE_INSTANCE_X_PIXMAP_SLICE (p,i)); |
439 IMAGE_INSTANCE_X_PIXMAP_SLICE (p, i) = 0; | 439 IMAGE_INSTANCE_X_PIXMAP_SLICE (p, i) = 0; |
440 } | 440 } |
441 xfree (IMAGE_INSTANCE_X_PIXMAP_SLICES (p)); | 441 xfree (IMAGE_INSTANCE_X_PIXMAP_SLICES (p), Pixmap *); |
442 IMAGE_INSTANCE_X_PIXMAP_SLICES (p) = 0; | 442 IMAGE_INSTANCE_X_PIXMAP_SLICES (p) = 0; |
443 } | 443 } |
444 | 444 |
445 if (IMAGE_INSTANCE_X_CURSOR (p)) | 445 if (IMAGE_INSTANCE_X_CURSOR (p)) |
446 { | 446 { |
464 leak with widgets. */ | 464 leak with widgets. */ |
465 if (IMAGE_INSTANCE_TYPE (p) != IMAGE_WIDGET | 465 if (IMAGE_INSTANCE_TYPE (p) != IMAGE_WIDGET |
466 && IMAGE_INSTANCE_TYPE (p) != IMAGE_SUBWINDOW | 466 && IMAGE_INSTANCE_TYPE (p) != IMAGE_SUBWINDOW |
467 && IMAGE_INSTANCE_X_PIXELS (p)) | 467 && IMAGE_INSTANCE_X_PIXELS (p)) |
468 { | 468 { |
469 xfree (IMAGE_INSTANCE_X_PIXELS (p)); | 469 xfree (IMAGE_INSTANCE_X_PIXELS (p), unsigned long *); |
470 IMAGE_INSTANCE_X_PIXELS (p) = 0; | 470 IMAGE_INSTANCE_X_PIXELS (p) = 0; |
471 } | 471 } |
472 | 472 |
473 xfree (p->data); | 473 xfree (p->data, void *); |
474 p->data = 0; | 474 p->data = 0; |
475 } | 475 } |
476 | 476 |
477 static int | 477 static int |
478 x_image_instance_equal (Lisp_Image_Instance *p1, | 478 x_image_instance_equal (Lisp_Image_Instance *p1, |
860 ximage = convert_EImage_to_XImage (device, width, height, | 860 ximage = convert_EImage_to_XImage (device, width, height, |
861 eimage + (width * height * 3 * slice), | 861 eimage + (width * height * 3 * slice), |
862 &pixtbl, &npixels); | 862 &pixtbl, &npixels); |
863 if (!ximage) | 863 if (!ximage) |
864 { | 864 { |
865 if (pixtbl) xfree (pixtbl); | 865 if (pixtbl) |
866 xfree (pixtbl, unsigned long *); | |
866 signal_image_error("EImage to XImage conversion failed", instantiator); | 867 signal_image_error("EImage to XImage conversion failed", instantiator); |
867 } | 868 } |
868 | 869 |
869 /* Now create the pixmap and set up the image instance */ | 870 /* Now create the pixmap and set up the image instance */ |
870 if (slice == 0) | 871 if (slice == 0) |
876 | 877 |
877 if (ximage) | 878 if (ximage) |
878 { | 879 { |
879 if (ximage->data) | 880 if (ximage->data) |
880 { | 881 { |
881 xfree (ximage->data); | 882 xfree (ximage->data, char *); |
882 ximage->data = 0; | 883 ximage->data = 0; |
883 } | 884 } |
884 XDestroyImage (ximage); | 885 XDestroyImage (ximage); |
885 ximage = 0; | 886 ximage = 0; |
886 } | 887 } |
1299 if (color_symbols) | 1300 if (color_symbols) |
1300 { | 1301 { |
1301 int i; | 1302 int i; |
1302 | 1303 |
1303 for (i = 0; i < (int) xpmattrs.numsymbols; i++) | 1304 for (i = 0; i < (int) xpmattrs.numsymbols; i++) |
1304 xfree (color_symbols[i].name); | 1305 xfree (color_symbols[i].name, char *); |
1305 xfree (color_symbols); | 1306 xfree (color_symbols, XpmColorSymbol *); |
1306 xpmattrs.colorsymbols = 0; /* in case XpmFreeAttr is too smart... */ | 1307 xpmattrs.colorsymbols = 0; /* in case XpmFreeAttr is too smart... */ |
1307 xpmattrs.numsymbols = 0; | 1308 xpmattrs.numsymbols = 0; |
1308 } | 1309 } |
1309 | 1310 |
1310 switch (result) | 1311 switch (result) |