From fe7095d1dc0a6a79810cc2e81df3fa70370385be Mon Sep 17 00:00:00 2001 From: Lucien Van Elsen Date: Sun, 17 Nov 1991 12:19:12 +0000 Subject: Initial revision --- server/zstring.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 server/zstring.h (limited to 'server/zstring.h') diff --git a/server/zstring.h b/server/zstring.h new file mode 100644 index 0000000..7d6fe31 --- /dev/null +++ b/server/zstring.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 1991 by the Massachusetts Institute of Technology. + * For copying and distribution information, see the file "mit-copyright.h". + * + * $Source$ + * $Id$ + * $Author$ + */ + +#include + +#ifndef __zstring_h +#define __zstring_h __FILE__ + +#define ZSTRING_HASH_TABLE_SIZE 1031 + +typedef struct t_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 */ +} ZSTRING; + +#ifdef __STDC__ +# define P(s) s +#else +# define P(s) () +#endif + +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)); + + +#undef P + + +#endif /* __zstring_h */ -- cgit v1.2.3