version 1.52, 2012/06/08 15:06:28 |
version 1.54, 2012/06/09 11:21:12 |
|
|
#include <string.h> |
#include <string.h> |
#include <unistd.h> |
#include <unistd.h> |
|
|
|
#ifdef HAVE_OHASH |
#include <ohash.h> |
#include <ohash.h> |
|
#else |
|
#include "compat_ohash.h" |
|
#endif |
#include <sqlite3.h> |
#include <sqlite3.h> |
|
|
#include "mdoc.h" |
#include "mdoc.h" |
Line 327 main(int argc, char *argv[]) |
|
Line 331 main(int argc, char *argv[]) |
|
{ |
{ |
char cwd[MAXPATHLEN]; |
char cwd[MAXPATHLEN]; |
int ch, rc, fd, i; |
int ch, rc, fd, i; |
|
unsigned int index; |
size_t j, sz; |
size_t j, sz; |
const char *dir; |
const char *dir; |
struct str *s; |
struct str *s; |
Line 504 main(int argc, char *argv[]) |
|
Line 509 main(int argc, char *argv[]) |
|
* turn off synchronous mode for much better |
* turn off synchronous mode for much better |
* performance. |
* performance. |
*/ |
*/ |
|
#ifndef __APPLE__ |
SQL_EXEC("PRAGMA synchronous = OFF"); |
SQL_EXEC("PRAGMA synchronous = OFF"); |
|
#endif |
|
|
if (0 == ofmerge(mc, mp, dirs.paths[j])) |
if (0 == ofmerge(mc, mp, dirs.paths[j])) |
goto out; |
goto out; |
|
|
manpath_free(&dirs); |
manpath_free(&dirs); |
mchars_free(mc); |
mchars_free(mc); |
mparse_free(mp); |
mparse_free(mp); |
for (s = ohash_first(&strings, &ch); |
for (s = ohash_first(&strings, &index); |
NULL != s; s = ohash_next(&strings, &ch)) { |
NULL != s; s = ohash_next(&strings, &index)) { |
if (s->utf8 != s->key) |
if (s->utf8 != s->key) |
free(s->utf8); |
free(s->utf8); |
free(s); |
free(s); |