ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/neuclrtab.c
(Generate patch)

Comparing ray/src/px/neuclrtab.c (file contents):
Revision 2.7 by greg, Tue Nov 22 12:19:21 1994 UTC vs.
Revision 2.10 by schorsch, Mon Jun 30 14:59:12 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1994 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Neural-Net quantization algorithm based on work of Anthony Dekker
6   */
7  
8 < #include "standard.h"
8 > #include "copyright.h"
9  
10 < #include "color.h"
10 > #include <string.h>
11  
12 + #include "standard.h"
13 + #include "color.h"
14   #include "random.h"
15  
16   #ifdef COMPAT_MODE
# Line 51 | Line 50 | static long    skipcount;
50  
51   #define setskip(sp,n)   ((sp)[0]=(n)>>16,(sp)[1]=((n)>>8)&255,(sp)[2]=(n)&255)
52  
53 + static  cpyclrtab();
54  
55 +
56   neu_init(npixels)               /* initialize our sample array */
57   long    npixels;
58   {
# Line 132 | Line 133 | int    ncolors;
133          cpyclrtab();
134          inxbuild();
135                                  /* we're done with our samples */
136 <        free((char *)thesamples);
136 >        free((void *)thesamples);
137                                  /* reset dithering function */
138          neu_dith_colrs((BYTE *)NULL, (COLR *)NULL, 0);
139                                  /* return new color table size */
# Line 172 | Line 173 | int    n;
173  
174          if (n != N) {           /* get error propogation array */
175                  if (N) {
176 <                        free((char *)cerr);
176 >                        free((void *)cerr);
177                          cerr = NULL;
178                  }
179                  if (n)
# Line 183 | Line 184 | int    n;
184                          return;
185                  }
186                  N = n;
187 <                bzero((char *)cerr, 3*N*sizeof(short));
187 >                memset((char *)cerr, '\0', 3*N*sizeof(short));
188          }
189          err[0] = err[1] = err[2] = 0;
190          for (x = 0; x < n; x++) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines