Mercurial > hg > xemacs-beta
comparison src/imgproc.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 | b39c14581166 |
children | ecf1ebac70d8 |
comparison
equal
deleted
inserted
replaced
1725:7ff8f4d70aec | 1726:a8d8f419b459 |
---|---|
534 qt->um[i] = ptr->total; | 534 qt->um[i] = ptr->total; |
535 } | 535 } |
536 qt->num_active_colors = i; | 536 qt->num_active_colors = i; |
537 | 537 |
538 /* We're done with the boxes now */ | 538 /* We're done with the boxes now */ |
539 xfree (box_list); | 539 xfree (box_list, Colorbox *); |
540 qt->freeboxes = qt->usedboxes = NULL; | 540 qt->freeboxes = qt->usedboxes = NULL; |
541 | 541 |
542 /* | 542 /* |
543 * STEP 5: scan histogram and map all values to closest color | 543 * STEP 5: scan histogram and map all values to closest color |
544 */ | 544 */ |
548 table entries */ | 548 table entries */ |
549 res = map_colortable (qt, num_colors); | 549 res = map_colortable (qt, num_colors); |
550 | 550 |
551 /* 5c: done with ColorCells */ | 551 /* 5c: done with ColorCells */ |
552 for (i = 0; i < C_LEN*C_LEN*C_LEN; i++) | 552 for (i = 0; i < C_LEN*C_LEN*C_LEN; i++) |
553 if (qt->ColorCells[i]) xfree (qt->ColorCells[i]); | 553 if (qt->ColorCells[i]) |
554 xfree (qt->ColorCells); | 554 xfree (qt->ColorCells[i], C_cell *); |
555 xfree (qt->ColorCells, C_cell **); | |
555 | 556 |
556 if (res) | 557 if (res) |
557 { | 558 { |
558 /* we failed in memory allocation, so clean up an leave */ | 559 /* we failed in memory allocation, so clean up and leave */ |
559 xfree(qt); | 560 xfree(qt, quant_table *); |
560 return NULL; | 561 return NULL; |
561 } | 562 } |
562 | 563 |
563 return qt; | 564 return qt; |
564 } | 565 } |