15 |
|
* External symbols declared in drvier.h |
16 |
|
*/ |
17 |
|
|
18 |
< |
/* ==================================================================== |
19 |
< |
* The Radiance Software License, Version 1.0 |
20 |
< |
* |
21 |
< |
* Copyright (c) 1990 - 2002 The Regents of the University of California, |
22 |
< |
* through Lawrence Berkeley National Laboratory. All rights reserved. |
23 |
< |
* |
24 |
< |
* Redistribution and use in source and binary forms, with or without |
25 |
< |
* modification, are permitted provided that the following conditions |
26 |
< |
* are met: |
27 |
< |
* |
28 |
< |
* 1. Redistributions of source code must retain the above copyright |
29 |
< |
* notice, this list of conditions and the following disclaimer. |
30 |
< |
* |
31 |
< |
* 2. Redistributions in binary form must reproduce the above copyright |
32 |
< |
* notice, this list of conditions and the following disclaimer in |
33 |
< |
* the documentation and/or other materials provided with the |
34 |
< |
* distribution. |
35 |
< |
* |
36 |
< |
* 3. The end-user documentation included with the redistribution, |
37 |
< |
* if any, must include the following acknowledgment: |
38 |
< |
* "This product includes Radiance software |
39 |
< |
* (http://radsite.lbl.gov/) |
40 |
< |
* developed by the Lawrence Berkeley National Laboratory |
41 |
< |
* (http://www.lbl.gov/)." |
42 |
< |
* Alternately, this acknowledgment may appear in the software itself, |
43 |
< |
* if and wherever such third-party acknowledgments normally appear. |
44 |
< |
* |
45 |
< |
* 4. The names "Radiance," "Lawrence Berkeley National Laboratory" |
46 |
< |
* and "The Regents of the University of California" must |
47 |
< |
* not be used to endorse or promote products derived from this |
48 |
< |
* software without prior written permission. For written |
49 |
< |
* permission, please contact [email protected]. |
50 |
< |
* |
51 |
< |
* 5. Products derived from this software may not be called "Radiance", |
52 |
< |
* nor may "Radiance" appear in their name, without prior written |
53 |
< |
* permission of Lawrence Berkeley National Laboratory. |
54 |
< |
* |
55 |
< |
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
56 |
< |
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
57 |
< |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
58 |
< |
* DISCLAIMED. IN NO EVENT SHALL Lawrence Berkeley National Laboratory OR |
59 |
< |
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
60 |
< |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
61 |
< |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
62 |
< |
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
63 |
< |
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
64 |
< |
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
65 |
< |
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
66 |
< |
* SUCH DAMAGE. |
67 |
< |
* ==================================================================== |
68 |
< |
* |
69 |
< |
* This software consists of voluntary contributions made by many |
70 |
< |
* individuals on behalf of Lawrence Berkeley National Laboratory. For more |
71 |
< |
* information on Lawrence Berkeley National Laboratory, please see |
72 |
< |
* <http://www.lbl.gov/>. |
73 |
< |
*/ |
18 |
> |
#include "copyright.h" |
19 |
|
|
20 |
|
#include "standard.h" |
21 |
|
|
84 |
|
/* partition color space */ |
85 |
|
cut(ctree, 0, CLRCUBE, 0, ncolors); |
86 |
|
/* clear histogram */ |
87 |
< |
bzero((char *)histo, sizeof(histo)); |
87 |
> |
bzero((void *)histo, sizeof(histo)); |
88 |
|
/* return number of colors used */ |
89 |
|
return(ncolors); |
90 |
|
} |
161 |
|
set_cmap(rmap, gmap, bmap) /* set custom color correction map */ |
162 |
|
BYTE *rmap, *gmap, *bmap; |
163 |
|
{ |
164 |
< |
bcopy((char *)rmap, (char *)clrmap[RED], 256); |
165 |
< |
bcopy((char *)gmap, (char *)clrmap[GRN], 256); |
166 |
< |
bcopy((char *)bmap, (char *)clrmap[BLU], 256); |
164 |
> |
bcopy((void *)rmap, (void *)clrmap[RED], 256); |
165 |
> |
bcopy((void *)gmap, (void *)clrmap[GRN], 256); |
166 |
> |
bcopy((void *)bmap, (void *)clrmap[BLU], 256); |
167 |
|
} |
168 |
|
|
169 |
|
|
193 |
|
} |
194 |
|
/* split box */ |
195 |
|
*tree = split(box); |
196 |
< |
bcopy((char *)box, (char *)kb, sizeof(kb)); |
196 |
> |
bcopy((void *)box, (void *)kb, sizeof(kb)); |
197 |
|
/* do left (lesser) branch */ |
198 |
|
kb[prim(*tree)][1] = part(*tree); |
199 |
|
cut(tree+(1<<level), level+1, kb, c0, (c0+c1)>>1); |