diff options
author | Lucien Van Elsen <lwvanels@mit.edu> | 1991-12-04 08:25:09 +0000 |
---|---|---|
committer | Lucien Van Elsen <lwvanels@mit.edu> | 1991-12-04 08:25:09 +0000 |
commit | 1bd4094341bcada53540b6f51833c30d61f1dcd6 (patch) | |
tree | 917cfd1e4ff9e34dcf7f7a7aaaa78d875bf6d0b8 /server/zstring.h | |
parent | fe7095d1dc0a6a79810cc2e81df3fa70370385be (diff) |
Converted back to ANSI C (with ifdef's for standard C)
Diffstat (limited to 'server/zstring.h')
-rw-r--r-- | server/zstring.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/server/zstring.h b/server/zstring.h index 7d6fe31..d3fb1a1 100644 --- a/server/zstring.h +++ b/server/zstring.h @@ -7,20 +7,23 @@ * $Author$ */ -#include <mit-copyright.h> +#include <zephyr/mit-copyright.h> #ifndef __zstring_h #define __zstring_h __FILE__ -#define ZSTRING_HASH_TABLE_SIZE 1031 +#define ZSTRING_HASH_TABLE_SIZE 1024 -typedef struct t_zstring +#include <stdio.h> + +typedef struct _zstring { char *string; /* the string itself */ int len; /* string length, for speed */ int ref_count; /* for gc */ - struct t_zstring *next; /* for linking in hash table */ - struct t_zstring *prev; /* for linking in hash table */ + unsigned long hash_val; /* hash value for this string */ + struct _zstring *next; /* for linking in hash table */ + struct _zstring *prev; /* for linking in hash table */ } ZSTRING; #ifdef __STDC__ @@ -32,8 +35,9 @@ typedef struct t_zstring ZSTRING *make_zstring P((char *s, int downcase)); void free_zstring P((ZSTRING *z)); ZSTRING *find_zstring P((char *s, int downcase)); -int eq_zstring P((ZSTRING *a, ZSTRING *b)); - +ZSTRING *dup_zstring P((ZSTRING *z)); +int comp_zstring P((ZSTRING *a, ZSTRING *b)); +void print_zstring_table P((FILE *f)); #undef P |