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

Comparing ray/src/common/urand.c (file contents):
Revision 2.10 by greg, Wed Apr 5 06:22:56 2006 UTC vs.
Revision 2.11 by greg, Wed May 27 08:42:06 2015 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7  
8   #include "copyright.h"
9  
10 #include  <stdlib.h>
11
10   #include  "standard.h"
11   #include  "random.h"
12  
# Line 21 | Line 19 | static unsigned short  empty_tab = 0;
19   unsigned short  *urperm = &empty_tab;   /* urand() permutation */
20   int  urmask = 0;                        /* bits used in permutation */
21  
22 +
23   int
24 < initurand(size)         /* initialize urand() for size entries */
25 < int  size;
24 > initurand(                      /* initialize urand() for size entries */
25 >        int  size
26 > )
27   {
28          int  order, n;
29 <        register int  i, offset;
29 >        int  i, offset;
30  
31          if ((urperm != NULL) & (urperm != &empty_tab))
32                  free((void *)urperm);
# Line 60 | Line 60 | int  size;
60  
61  
62   int
63 < ilhash(d, n)                    /* hash a set of integer values */
64 < register int  *d;
65 < register int  n;
63 > ilhash(                         /* hash a set of integer values */
64 >        int  *d,
65 >        int  n
66 > )
67   {
68          static int  tab[8] = {103699,96289,73771,65203,81119,87037,92051,98899};
69 <        register int  hval;
69 >        int  hval;
70  
71          hval = 0;
72          while (n-- > 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines