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

Comparing ray/src/meta/palloc.c (file contents):
Revision 1.1 by greg, Sat Feb 22 02:07:26 2003 UTC vs.
Revision 1.2 by schorsch, Sun Jun 8 12:03:10 2003 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9   #define  FBSIZE  72             /* size of malloc call */
10  
11  
12
13
14
12   #include  "meta.h"
13  
14  
18
19
20
15   extern int  maxalloc;           /* number of prims to allocate */
22
16   int  nalloc = 0;                /* number allocated so far */
17  
25
26
18   static PLIST  freelist = {NULL, NULL};
19  
20  
21 + static int morefree(void);
22  
23  
24   PRIMITIVE *
25 < palloc()                /* allocate a primitive */
25 > palloc(void)            /* allocate a primitive */
26  
27   {
28   register PRIMITIVE  *p;
# Line 48 | Line 40 | palloc()               /* allocate a primitive */
40  
41   nalloc++;
42   return(p);
43 < }
43 > }
44  
45  
46  
47 <
48 <
49 < pfree(p)                /* free a primitive */
50 <
59 < register PRIMITIVE  *p;
60 <
47 > void
48 > pfree(          /* free a primitive */
49 > register PRIMITIVE  *p
50 > )
51   {
52  
53   if (p->args != NULL) {
# Line 71 | Line 61 | register PRIMITIVE  *p;
61  
62  
63  
64 <
65 < plfree(pl)              /* free a primitive list */
66 <
67 < register PLIST  *pl;
78 <
64 > void
65 > plfree(         /* free a primitive list */
66 > register PLIST  *pl
67 > )
68   {
69      register PRIMITIVE  *p;
70      
# Line 94 | Line 83 | register PLIST  *pl;
83      
84  
85  
97
98
86   static int
87 < morefree()              /* get more free space */
87 > morefree(void)          /* get more free space */
88  
89   {
90   register PRIMITIVE  *p;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines