aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libman.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-09-16 14:40:56 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-09-16 14:40:56 +0000
commit374dd658a605a794b307642e87295f468d29d56a (patch)
treeeeda12f0d84b8e08c64a3590a881d337b2a26b49 /libman.h
parent6cbefd50d90dc947c06ea2212c4d3552c4a36c84 (diff)
downloadmandoc-374dd658a605a794b307642e87295f468d29d56a.tar.gz
mandoc-374dd658a605a794b307642e87295f468d29d56a.tar.zst
mandoc-374dd658a605a794b307642e87295f468d29d56a.zip
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.
Diffstat (limited to 'libman.h')
-rw-r--r--libman.h8
1 files changed, 3 insertions, 5 deletions
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 <kristaps@kth.se>
*
@@ -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)