Mercurial > hg > xemacs-beta
comparison src/glyphs-x.c @ 4982:3c3c1d139863
Automatic merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Fri, 05 Feb 2010 11:25:00 -0600 |
parents | 4aebb0131297 16112448d484 |
children | 6f2158fa75ed |
comparison
equal
deleted
inserted
replaced
4981:4aebb0131297 | 4982:3c3c1d139863 |
---|---|
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, quant_table *); | 275 xfree (qtable); |
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), Pixmap *); | 441 xfree (IMAGE_INSTANCE_X_PIXMAP_SLICES (p)); |
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), unsigned long *); | 469 xfree (IMAGE_INSTANCE_X_PIXELS (p)); |
470 IMAGE_INSTANCE_X_PIXELS (p) = 0; | 470 IMAGE_INSTANCE_X_PIXELS (p) = 0; |
471 } | 471 } |
472 | 472 |
473 xfree (p->data, void *); | 473 xfree (p->data); |
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, |
1031 eimage + (width * height * 3 * slice), | 1031 eimage + (width * height * 3 * slice), |
1032 &pixtbl, &npixels); | 1032 &pixtbl, &npixels); |
1033 if (!ximage) | 1033 if (!ximage) |
1034 { | 1034 { |
1035 if (pixtbl) | 1035 if (pixtbl) |
1036 xfree (pixtbl, unsigned long *); | 1036 xfree (pixtbl); |
1037 signal_image_error ("EImage to XImage conversion failed", | 1037 signal_image_error ("EImage to XImage conversion failed", |
1038 instantiator); | 1038 instantiator); |
1039 } | 1039 } |
1040 | 1040 |
1041 /* Now create the pixmap and set up the image instance */ | 1041 /* Now create the pixmap and set up the image instance */ |
1049 | 1049 |
1050 if (ximage) | 1050 if (ximage) |
1051 { | 1051 { |
1052 if (ximage->data) | 1052 if (ximage->data) |
1053 { | 1053 { |
1054 xfree (ximage->data, char *); | 1054 xfree (ximage->data); |
1055 ximage->data = 0; | 1055 ximage->data = 0; |
1056 } | 1056 } |
1057 XDestroyImage (ximage); | 1057 XDestroyImage (ximage); |
1058 ximage = 0; | 1058 ximage = 0; |
1059 } | 1059 } |
1472 if (color_symbols) | 1472 if (color_symbols) |
1473 { | 1473 { |
1474 int i; | 1474 int i; |
1475 | 1475 |
1476 for (i = 0; i < (int) xpmattrs.numsymbols; i++) | 1476 for (i = 0; i < (int) xpmattrs.numsymbols; i++) |
1477 xfree (color_symbols[i].name, char *); | 1477 xfree (color_symbols[i].name); |
1478 xfree (color_symbols, XpmColorSymbol *); | 1478 xfree (color_symbols); |
1479 xpmattrs.colorsymbols = 0; /* in case XpmFreeAttr is too smart... */ | 1479 xpmattrs.colorsymbols = 0; /* in case XpmFreeAttr is too smart... */ |
1480 xpmattrs.numsymbols = 0; | 1480 xpmattrs.numsymbols = 0; |
1481 } | 1481 } |
1482 | 1482 |
1483 switch (result) | 1483 switch (result) |