From 374dd658a605a794b307642e87295f468d29d56a Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 16 Sep 2009 14:40:56 +0000 Subject: Lookup hashes are now static tables, ordered first-level by second character, then randomly along a chain. Improves performance by a small fraction and considerably cleans up hash sources. --- libman.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libman.h') diff --git a/libman.h b/libman.h index 1ccbe9ff..0accc35c 100644 --- a/libman.h +++ b/libman.h @@ -1,4 +1,4 @@ -/* $Id: libman.h,v 1.20 2009/08/21 13:14:07 kristaps Exp $ */ +/* $Id: libman.h,v 1.21 2009/09/16 14:40:56 kristaps Exp $ */ /* * Copyright (c) 2009 Kristaps Dzonsons * @@ -27,7 +27,6 @@ enum man_next { struct man { void *data; struct man_cb cb; - void *htab; int pflags; int flags; #define MAN_HALT (1 << 0) @@ -95,9 +94,8 @@ int man_body_alloc(struct man *, int, int, int); int man_elem_alloc(struct man *, int, int, int); void man_node_free(struct man_node *); void man_node_freelist(struct man_node *); -void *man_hash_alloc(void); -int man_hash_find(const void *, const char *); -void man_hash_free(void *); +void man_hash_init(void); +int man_hash_find(const char *); int man_macroend(struct man *); int man_args(struct man *, int, int *, char *, char **); #define ARGS_ERROR (-1) -- cgit v1.2.3