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.13 by greg, Fri May 7 03:09:45 2021 UTC vs.
Revision 2.15 by greg, Mon Jun 23 19:55:51 2025 UTC

# Line 26 | Line 26 | static const char      RCSid[] = "$Id$";
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 46 | 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 97 | 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)