diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-04-02 06:51:44 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-04-02 06:51:44 +0000 |
commit | 8a03dc6dd4f8c96b6231d1f60da2bd65f437a8b4 (patch) | |
tree | 121b76378b915aba7ec64f61d34338b21358fd46 /mdoc_hash.c | |
parent | e487e44b52bbc7bfdb77346cc9a44d1a7c825d2c (diff) | |
download | mandoc-8a03dc6dd4f8c96b6231d1f60da2bd65f437a8b4.tar.gz |
mdoc_tokhash -> hash
Initial man hashtab (BROKEN).
Diffstat (limited to 'mdoc_hash.c')
-rw-r--r-- | mdoc_hash.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mdoc_hash.c b/mdoc_hash.c index f0496d2e..90bfab38 100644 --- a/mdoc_hash.c +++ b/mdoc_hash.c @@ -18,7 +18,6 @@ */ #include <assert.h> #include <ctype.h> -#include <err.h> #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -32,7 +31,7 @@ */ void -mdoc_tokhash_free(void *htab) +mdoc_hash_free(void *htab) { free(htab); @@ -40,14 +39,14 @@ mdoc_tokhash_free(void *htab) void * -mdoc_tokhash_alloc(void) +mdoc_hash_alloc(void) { int i, major, minor, ind; const void **htab; htab = calloc(27 * 26 * 3, sizeof(struct mdoc_macro *)); if (NULL == htab) - err(1, "calloc"); + return(NULL); for (i = 1; i < MDOC_MAX; i++) { major = mdoc_macronames[i][0]; @@ -95,7 +94,7 @@ mdoc_tokhash_alloc(void) int -mdoc_tokhash_find(const void *arg, const char *tmp) +mdoc_hash_find(const void *arg, const char *tmp) { int major, minor, ind, slot; const void **htab; |