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

Comparing ray/src/common/ealloc.c (file contents):
Revision 2.5 by schorsch, Thu Jul 17 09:21:29 2003 UTC vs.
Revision 2.6 by schorsch, Wed Jul 30 10:11:06 2003 UTC

# Line 13 | Line 13 | static const char      RCSid[] = "$Id$";
13  
14   #include "rterror.h"
15  
16 < char *
17 < emalloc(n)                      /* return pointer to n uninitialized bytes */
18 < unsigned int  n;
16 > char *  /* return pointer to n uninitialized bytes */
17 > emalloc(unsigned int  n)
18   {
19          register char  *cp;
20          
# Line 30 | Line 29 | unsigned int  n;
29   }
30  
31  
32 < char *
33 < ecalloc(ne, es)                 /* return pointer to initialized memory */
35 < register unsigned int  ne;
36 < unsigned int  es;
32 > char *                  /* return pointer to initialized memory */
33 > ecalloc(register unsigned int ne, unsigned int es)
34   {
35          register char  *cp;
36          
# Line 52 | Line 49 | unsigned int  es;
49   }
50  
51  
52 < char *
53 < erealloc(cp, n)                 /* reallocate cp to size n */
57 < register char  *cp;
58 < unsigned int  n;
52 > char *                  /* reallocate cp to size n */
53 > erealloc(register char  *cp, unsigned int  n)
54   {
55          if (n == 0) {
56                  if (cp != NULL)
# Line 76 | Line 71 | unsigned int  n;
71   }
72  
73  
74 < void
75 < efree(cp)                       /* free memory allocated by above */
81 < char  *cp;
74 > void                    /* free memory allocated by above */
75 > efree(char  *cp)
76   {
77          free((void *)cp);
78   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines