aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandocdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mandocdb.c b/mandocdb.c
index b3730139..78aefad4 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.52 2012/06/08 15:06:28 kristaps Exp $ */
+/* $Id: mandocdb.c,v 1.53 2012/06/09 11:00:13 kristaps Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
@@ -34,7 +34,11 @@
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_OHASH
#include <ohash.h>
+#else
+#include "compat_ohash.h"
+#endif
#include <sqlite3.h>
#include "mdoc.h"
@@ -327,6 +331,7 @@ main(int argc, char *argv[])
{
char cwd[MAXPATHLEN];
int ch, rc, fd, i;
+ unsigned int index;
size_t j, sz;
const char *dir;
struct str *s;
@@ -521,8 +526,8 @@ out:
manpath_free(&dirs);
mchars_free(mc);
mparse_free(mp);
- for (s = ohash_first(&strings, &ch);
- NULL != s; s = ohash_next(&strings, &ch)) {
+ for (s = ohash_first(&strings, &index);
+ NULL != s; s = ohash_next(&strings, &index)) {
if (s->utf8 != s->key)
free(s->utf8);
free(s);