diff --git a/src/zimlib/src/config.h b/src/zimlib/src/config.h deleted file mode 100644 index 49d23c5..0000000 --- a/src/zimlib/src/config.h +++ /dev/null @@ -1,99 +0,0 @@ -/* src/zimlib/src/config.h. Generated from config.h.in by configure. */ -/* src/zimlib/src/config.h.in. Generated from configure.ac by autoheader. */ - -/* set zim cluster cache size to number of cached chunks */ -#define CLUSTER_CACHE_SIZE 16 - -/* set zim dirent cache size to number of cached chunks */ -#define DIRENT_CACHE_SIZE 51200 - -/* defined if bzip2 compression is enabled */ -#define ENABLE_BZIP2 1 - -/* defined if lzma compression is enabled */ -#define ENABLE_LZMA 1 - -/* defined if zlib compression is enabled */ -#define ENABLE_ZLIB 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `bz2' library (-lbz2). */ -#define HAVE_LIBBZ2 1 - -/* Define to 1 if you have the `lzma' library (-llzma). */ -#define HAVE_LIBLZMA 1 - -/* Define to 1 if you have the `microhttpd' library (-lmicrohttpd). */ -#define HAVE_LIBMICROHTTPD 1 - -/* Define to 1 if you have the `unac' library (-lunac). */ -#define HAVE_LIBUNAC 1 - -/* Define to 1 if you have the `z' library (-lz). */ -#define HAVE_LIBZ 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `stat64' function. */ -#define HAVE_STAT64 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* set lzma uncompress memory size to number of MB */ -#define LZMA_MEMORY_SIZE 128 - -/* Name of package */ -#define PACKAGE "kiwix" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "kiwix" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "kiwix 0.9" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "kiwix" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.9" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "0.9" diff --git a/src/zimlib/src/file.cpp b/src/zimlib/src/file.cpp index c349747..497887d 100644 --- a/src/zimlib/src/file.cpp +++ b/src/zimlib/src/file.cpp @@ -110,7 +110,7 @@ namespace zim } log_debug("article not found after " << itcount << " iterations (\"" << d.getUrl() << "\" does not match)"); - return std::pair(false, const_iterator(this, u)); + return std::pair(false, const_iterator(this, c < 0 ? l : u)); } std::pair File::findxByTitle(char ns, const std::string& title) @@ -158,7 +158,7 @@ namespace zim } log_debug("article not found after " << itcount << " iterations (\"" << d.getTitle() << "\" does not match)"); - return std::pair(false, const_iterator(this, u, const_iterator::ArticleIterator)); + return std::pair(false, const_iterator(this, c < 0 ? l : u, const_iterator::ArticleIterator)); } File::const_iterator File::find(char ns, const std::string& url)