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

Comparing ray/src/common/savestr.c (file contents):
Revision 2.12 by greg, Sat Dec 28 18:05:14 2019 UTC vs.
Revision 2.15 by greg, Mon Jun 23 19:55:51 2025 UTC

# Line 15 | Line 15 | static const char      RCSid[] = "$Id$";
15   *  frees memory associated with the string; it should
16   *  never be referenced again.
17   *
18 < *  External symbols declared in standard.h
18 > *  External symbols declared in rtio.h
19   */
20  
21   #include "copyright.h"
22  
23   #include <stdlib.h>
24  
25 #include "rtmisc.h"
25   #include "rterror.h"
26   #include "rtio.h"
27  
28   #ifndef  NHASH
29 + #ifdef  SMLMEM
30   #define  NHASH          2039            /* hash table size (prime!) */
31 + #else
32 + #define  NHASH          17117           /* hash table size (prime!) */
33   #endif
34 + #endif
35  
36   typedef struct s_head {
37          struct s_head  *next;           /* next in hash list */
# Line 47 | Line 50 | static S_HEAD  *stab[NHASH];
50  
51  
52   char *
53 < savestr(char *str)                              /* save a string */
53 > savestr(const char *str)                        /* save a string */
54   {
55          int  hval;
56          S_HEAD  *sp;
# Line 98 | Line 101 | freestr(char *s)                               /* free a string */
101  
102  
103   int
104 < shash(char *s)
104 > shash(const char *s)
105   {
106          int  h = 0;
107  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)