1*4afad3d8SPeter Avalos /* $OpenBSD: ohash_int.h,v 1.3 2006/01/16 15:52:25 espie Exp $ */ 2*4afad3d8SPeter Avalos /* $FreeBSD: src/usr.bin/m4/lib/ohash_int.h,v 1.2 2012/11/17 01:54:24 svnexp Exp $ */ 3*4afad3d8SPeter Avalos 4*4afad3d8SPeter Avalos #include <sys/types.h> 5*4afad3d8SPeter Avalos #include <stddef.h> 6*4afad3d8SPeter Avalos #include <stdint.h> 7*4afad3d8SPeter Avalos #include <stdlib.h> 8*4afad3d8SPeter Avalos #include <string.h> 9*4afad3d8SPeter Avalos #include "ohash.h" 10*4afad3d8SPeter Avalos 11*4afad3d8SPeter Avalos struct _ohash_record { 12*4afad3d8SPeter Avalos uint32_t hv; 13*4afad3d8SPeter Avalos const char *p; 14*4afad3d8SPeter Avalos }; 15*4afad3d8SPeter Avalos 16*4afad3d8SPeter Avalos #define DELETED ((const char *)h) 17*4afad3d8SPeter Avalos #define NONE (h->size) 18*4afad3d8SPeter Avalos 19*4afad3d8SPeter Avalos /* Don't bother changing the hash table if the change is small enough. */ 20*4afad3d8SPeter Avalos #define MINSIZE (1UL << 4) 21*4afad3d8SPeter Avalos #define MINDELETED 4 22