=================================================================== RCS file: /cvs/mandoc/mandocdb.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -p -r1.52 -r1.53 --- mandoc/mandocdb.c 2012/06/08 15:06:28 1.52 +++ mandoc/mandocdb.c 2012/06/09 11:00:13 1.53 @@ -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 * Copyright (c) 2011, 2012 Ingo Schwarze @@ -34,7 +34,11 @@ #include #include +#ifdef HAVE_OHASH #include +#else +#include "compat_ohash.h" +#endif #include #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);