From 1bd4094341bcada53540b6f51833c30d61f1dcd6 Mon Sep 17 00:00:00 2001 From: Lucien Van Elsen Date: Wed, 4 Dec 1991 08:25:09 +0000 Subject: Converted back to ANSI C (with ifdef's for standard C) --- server/zstring.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'server/zstring.h') 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 +#include #ifndef __zstring_h #define __zstring_h __FILE__ -#define ZSTRING_HASH_TABLE_SIZE 1031 +#define ZSTRING_HASH_TABLE_SIZE 1024 -typedef struct t_zstring +#include + +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 -- cgit v1.2.3