Mercurial > hg > xemacs-beta
comparison src/imgproc.c @ 5495:1f0b15040456
Merge.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 01 May 2011 18:44:03 +0100 |
parents | 2aa9cd456ae7 |
children |
comparison
equal
deleted
inserted
replaced
5494:861f2601a38b | 5495:1f0b15040456 |
---|---|
1 /* Image processing functions | 1 /* Image processing functions |
2 Copyright (C) 1998 Jareth Hein | 2 Copyright (C) 1998 Jareth Hein |
3 | 3 |
4 This file is a part of XEmacs | 4 This file is part of XEmacs. |
5 | 5 |
6 XEmacs is free software; you can redistribute it and/or modify it | 6 XEmacs is free software: you can redistribute it and/or modify it |
7 under the terms of the GNU General Public License as published by the | 7 under the terms of the GNU General Public License as published by the |
8 Free Software Foundation; either version 2, or (at your option) any | 8 Free Software Foundation, either version 3 of the License, or (at your |
9 later version. | 9 option) any later version. |
10 | 10 |
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT | 11 XEmacs is distributed in the hope that it will be useful, but WITHOUT |
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | 13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
14 for more details. | 14 for more details. |
15 | 15 |
16 You should have received a copy of the GNU General Public License | 16 You should have received a copy of the GNU General Public License |
17 along with XEmacs; see the file COPYING. If not, write to | 17 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
19 Boston, MA 02111-1307, USA. */ | |
20 | 18 |
21 /* Synched up with: Not in FSF. */ | 19 /* Synched up with: Not in FSF. */ |
22 | 20 |
23 /* Original author: Jareth Hein */ | 21 /* Original author: Jareth Hein */ |
24 | 22 |
25 /* Parts of this file are based on code from Sam Leffler's tiff library, | 23 /* Parts of this file are based on code from Sam Leffler's tiff library, |
26 with the original copyright displayed here: | 24 with the original copyright displayed here: |
27 | 25 |
28 Copyright (c) 1988-1997 Sam Leffler | 26 Copyright (c) 1988-1997 Sam Leffler |
29 Copyright (c) 1991-1997 Silicon Graphics, Inc. | 27 Copyright (c) 1991-1997 Silicon Graphics, Inc. |
28 Copyright (C) 2010 Ben Wing. | |
30 | 29 |
31 Permission to use, copy, modify, distribute, and sell this software and | 30 Permission to use, copy, modify, distribute, and sell this software and |
32 its documentation for any purpose is hereby granted without fee, provided | 31 its documentation for any purpose is hereby granted without fee, provided |
33 that (i) the above copyright notices and this permission notice appear in | 32 that (i) the above copyright notices and this permission notice appear in |
34 all copies of the software and related documentation, and (ii) the names of | 33 all copies of the software and related documentation, and (ii) the names of |
549 res = map_colortable (qt, num_colors); | 548 res = map_colortable (qt, num_colors); |
550 | 549 |
551 /* 5c: done with ColorCells */ | 550 /* 5c: done with ColorCells */ |
552 for (i = 0; i < C_LEN*C_LEN*C_LEN; i++) | 551 for (i = 0; i < C_LEN*C_LEN*C_LEN; i++) |
553 if (qt->ColorCells[i]) | 552 if (qt->ColorCells[i]) |
554 xfree (qt->ColorCells[i]); | 553 { |
554 xfree (qt->ColorCells[i]); | |
555 qt->ColorCells[i] = 0; | |
556 } | |
555 xfree (qt->ColorCells); | 557 xfree (qt->ColorCells); |
558 qt->ColorCells = 0; | |
556 | 559 |
557 if (res) | 560 if (res) |
558 { | 561 { |
559 /* we failed in memory allocation, so clean up and leave */ | 562 /* we failed in memory allocation, so clean up and leave */ |
560 xfree (qt); | 563 xfree (qt); |