123456789101112131415161718192021222324252627282930313233343536373839404142 |
- $OpenBSD: patch-libdjvu_DjVmDir_h,v 1.1 2016/03/02 20:10:36 juanfra Exp $
- "accept documents with duplicate page titles"
- http://sourceforge.net/p/djvu/djvulibre-git/ci/77a4dca8dd3acd0acc1680fa14a352c11084e25d/
- https://bitbucket.org/jwilk/pdf2djvu/issues/113/duplicate-page-title-1
- --- libdjvu/DjVmDir.h.orig Tue Jul 8 23:15:07 2014
- +++ libdjvu/DjVmDir.h Wed Feb 3 01:51:28 2016
- @@ -181,7 +181,8 @@ class DJVUAPI DjVmDir : public GPEnabled (public)
- /** Translates file IDs to file records. */
- GP<File> id_to_file(const GUTF8String &id) const;
- /** Translates file shortcuts to file records. */
- - GP<File> title_to_file(const GUTF8String &title) const;
- + GP<File> title_to_file(const GUTF8String &title, GPosition spos) const;
- + GP<File> title_to_file(const GUTF8String &title) const;
- /** Access file record by position. */
- GP<File> pos_to_file(int fileno, int *ppageno=0) const;
- /** Returns position of the file in the directory. */
- @@ -216,7 +217,6 @@ class DJVUAPI DjVmDir : public GPEnabled (public)
- GPArray<File> page2file;
- GPMap<GUTF8String, File> name2file;
- GPMap<GUTF8String, File> id2file;
- - GPMap<GUTF8String, File> title2file;
- private: //dummy stuff
- static void decode(ByteStream *);
- static void encode(ByteStream *);
- @@ -438,6 +438,13 @@ DjVmDir::is_indirect(void) const
- GCriticalSectionLock lock((GCriticalSection *) &class_lock);
- return ( files_list.size() && files_list[files_list] != 0 &&
- files_list[files_list]->offset==0 );
- +}
- +
- +inline GP<DjVmDir::File>
- +DjVmDir::title_to_file(const GUTF8String &title) const
- +{
- + GPosition pos;
- + return title_to_file(title, pos);
- }
-
-
|