summaryrefslogtreecommitdiffstatshomepage
path: root/man_hash.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-04-05 16:34:22 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-04-05 16:34:22 +0000
commit12787b5b25116ca648594a7e79d78bb6d63b3297 (patch)
tree374c5cbffc73270c9965336312793f404d29b91d /man_hash.c
parent2bf117bf436ea58dd257d956e93a812dbe448d28 (diff)
downloadmandoc-12787b5b25116ca648594a7e79d78bb6d63b3297.tar.gz
mandoc-12787b5b25116ca648594a7e79d78bb6d63b3297.tar.zst
mandoc-12787b5b25116ca648594a7e79d78bb6d63b3297.zip
man(3) doesn't use err.h anymore.
Added .i to man(3). Fixed up manuals. Fixed up webpage. Assertion fixes in man(3) (hashtable). Fixed assertion for .IP in mandoc -man.
Diffstat (limited to 'man_hash.c')
-rw-r--r--man_hash.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/man_hash.c b/man_hash.c
index 9aaafb20..64723916 100644
--- a/man_hash.c
+++ b/man_hash.c
@@ -1,4 +1,4 @@
-/* $Id: man_hash.c,v 1.5 2009/04/02 06:51:44 kristaps Exp $ */
+/* $Id: man_hash.c,v 1.6 2009/04/05 16:34:22 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
*
@@ -39,7 +39,7 @@ man_hash_alloc(void)
int *htab;
int i, j, x;
- htab = calloc(26 * 4, sizeof(int));
+ htab = calloc(26 * 5, sizeof(int));
if (NULL == htab)
return(NULL);
@@ -50,15 +50,15 @@ man_hash_alloc(void)
(x >= 97 && x <= 122));
x -= (x <= 90) ? 65 : 97;
- x *= 4;
+ x *= 5;
- for (j = 0; j < 4; j++)
+ for (j = 0; j < 5; j++)
if (0 == htab[x + j]) {
htab[x + j] = i;
break;
}
- assert(j < 4);
+ assert(j < 5);
}
return((void *)htab);
@@ -79,9 +79,9 @@ man_hash_find(const void *arg, const char *tmp)
return(MAN_MAX);
x -= (x <= 90) ? 65 : 97;
- x *= 4;
+ x *= 5;
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < 5; i++) {
if (0 == (tok = htab[x + i]))
return(MAN_MAX);
if (0 == strcmp(tmp, man_macronames[tok]))