| 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 */ |
| 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; |
| 101 |
|
|
| 102 |
|
|
| 103 |
|
int |
| 104 |
< |
shash(char *s) |
| 104 |
> |
shash(const char *s) |
| 105 |
|
{ |
| 106 |
|
int h = 0; |
| 107 |
|
|