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

Comparing ray/src/hd/sm_samp.c (file contents):
Revision 3.7 by greg, Sat Feb 22 02:07:25 2003 UTC vs.
Revision 3.9 by schorsch, Mon Jun 30 14:59:12 2003 UTC

# Line 4 | Line 4 | static const char      RCSid[] = "$Id$";
4   /*
5   * sm_samp.c
6   */
7 +
8 + #include <string.h>
9 +
10   #include "standard.h"
11   #include "sm_flag.h"
12   #include "rhd_sample.h"
13  
14   SAMP rsL;
15 < int4 *samp_flag=NULL;
15 > int32 *samp_flag=NULL;
16  
17   /* Each sample has a world coord point, and direction, brightness,chrominance,
18     and RGB triples
19   */
20  
21   #define TMSIZE sizeof(TMbright)
22 < #define SAMPSIZ (3*sizeof(SFLOAT)+sizeof(int4)+ 6*sizeof(BYTE) + TMSIZE + 2*sizeof(int))
22 > #define SAMPSIZ (3*sizeof(SFLOAT)+sizeof(int32)+ 6*sizeof(BYTE) + TMSIZE + 2*sizeof(int))
23  
24   /* Extra points world space point, vert flag and qt flag */
25   #define POINTSIZ (3*sizeof(SFLOAT) + 2*sizeof(int))
# Line 26 | Line 29 | sClear_all_flags(s)
29   SAMP *s;
30   {
31    if(samp_flag)
32 <    bzero((char *)samp_flag,FLAG_BYTES(S_MAX_BASE_PT(s)));
32 >    memset((char *)samp_flag, '\0', FLAG_BYTES(S_MAX_BASE_PT(s)));
33   }
34  
35   sInit(s)
# Line 82 | Line 85 | int *nptr,extra_points;
85  
86    /* assign larger alignment types earlier */
87    S_W_PT(s) = (SFLOAT(*)[3])S_BASE(s);
88 <  S_W_DIR(s) = (int4 *)(S_W_PT(s) + n + extra_points);
88 >  S_W_DIR(s) = (int32 *)(S_W_PT(s) + n + extra_points);
89    S_BRT(s) = (TMbright *)(S_W_DIR(s) + n);
90    S_CHR(s) = (BYTE (*)[3])(S_BRT(s) + n);
91    S_RGB(s) = (BYTE (*)[3])(S_CHR(s) + n);
# Line 92 | Line 95 | int *nptr,extra_points;
95    S_MAX_BASE_PT(s) = n + extra_points;
96  
97    /* Allocate memory for a per/sample bit flag */
98 <  if(!(samp_flag = (int4 *)malloc(FLAG_BYTES(n+extra_points))))
98 >  if(!(samp_flag = (int32 *)malloc(FLAG_BYTES(n+extra_points))))
99      error(SYSTEM,"sAlloc(): Unable to allocate flag memory");
100    sInit(s);
101    sClear_all_flags(s);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines