3
0
Fork 0

+ few imp. in the indexer code

small_fixes
kelson42 16 years ago
parent 8e6f0047d6
commit f3bd14cf83

@ -11,14 +11,21 @@ int main(int argc, char **argv) {
/* Init the variables */ /* Init the variables */
char *zimFilePath = argv[1]; char *zimFilePath = argv[1];
char *xapianDirectoryPath = argv[2]; char *xapianDirectoryPath = argv[2];
kiwix::Indexer *indexer = new kiwix::Indexer(zimFilePath, xapianDirectoryPath); kiwix::Indexer *indexer = NULL;
/* Try to prepare the indexing */
try {
indexer = new kiwix::Indexer(zimFilePath, xapianDirectoryPath);
} catch (...) {
cout << "Unable to index '" << zimFilePath << "'." << endl;
exit(1);
}
/* Start the indexing */ /* Start the indexing */
if (indexer != NULL) { if (indexer != NULL) {
indexer->startIndexing();
while (indexer->indexNextPercent()) {}; while (indexer->indexNextPercent()) {};
} else { } else {
cout << "Unable to start the indexation process" << endl; cout << "Unable instanciate the Kiwix indexer." << endl;
exit(1); exit(1);
} }

@ -15,6 +15,9 @@
/* Define to 1 if you have the `bz2' library (-lbz2). */ /* Define to 1 if you have the `bz2' library (-lbz2). */
#undef HAVE_LIBBZ2 #undef HAVE_LIBBZ2
/* Define to 1 if you have the `microhttpd' library (-lmicrohttpd). */
#undef HAVE_LIBMICROHTTPD
/* Define to 1 if you have the `unac' library (-lunac). */ /* Define to 1 if you have the `unac' library (-lunac). */
#undef HAVE_LIBUNAC #undef HAVE_LIBUNAC
@ -67,6 +70,9 @@
/* Define to the one symbol short name of this package. */ /* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME #undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */ /* Define to the version of this package. */
#undef PACKAGE_VERSION #undef PACKAGE_VERSION

Loading…
Cancel
Save