diff options
Diffstat (limited to 'man.c')
-rw-r--r-- | man.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -105,9 +105,6 @@ man_free(struct man *man) { man_free1(man); - - if (man->htab) - man_hash_free(man->htab); free(man); } @@ -125,14 +122,11 @@ man_alloc(void *data, int pflags, const struct man_cb *cb) return(NULL); } + man_hash_init(); + p->data = data; p->pflags = pflags; (void)memcpy(&p->cb, cb, sizeof(struct man_cb)); - - if (NULL == (p->htab = man_hash_alloc())) { - free(p); - return(NULL); - } return(p); } @@ -513,7 +507,7 @@ man_pmacro(struct man *m, int ln, char *buf) return(1); } - if (MAN_MAX == (c = man_hash_find(m->htab, mac))) { + if (MAN_MAX == (c = man_hash_find(mac))) { if ( ! (MAN_IGN_MACRO & m->pflags)) { (void)man_perr(m, ln, ppos, WMACRO); goto err; |