summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-15 18:23:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-15 18:23:18 +0000
commit3133bbc63a2d32dac638db58fa13e966488e88b5 (patch)
tree326595b5fefc87fd7cf5ab3905bc00883fe3c919
downloadkchmviewer-3133bbc63a2d32dac638db58fa13e966488e88b5.tar.gz
kchmviewer-3133bbc63a2d32dac638db58fa13e966488e88b5.zip
Added abandoned KDE3 version of kchmviewer
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kchmviewer@1090662 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--COPYING340
-rw-r--r--ChangeLog291
-rw-r--r--DCOP-bingings22
-rw-r--r--Doxyfile275
-rw-r--r--FAQ41
-rw-r--r--Makefile.am7
-rw-r--r--Makefile.cvs11
-rw-r--r--README123
-rw-r--r--acinclude.m411919
-rw-r--r--aclocal.m4863
-rw-r--r--am_edit2015
l---------config.guess1
-rw-r--r--config.h.in0
l---------config.sub1
-rw-r--r--configure.files1
-rw-r--r--configure.in161
-rw-r--r--configure.in.in101
-rw-r--r--kchmviewer.kdevelop272
-rw-r--r--kchmviewer.kdevelop.pcsbin0 -> 601321 bytes
-rw-r--r--kchmviewer.kdevses74
-rw-r--r--lib/Makefile.am17
-rw-r--r--lib/chmlib/AUTHORS18
-rw-r--r--lib/chmlib/COPYING510
-rw-r--r--lib/chmlib/INSTALL236
-rw-r--r--lib/chmlib/Makefile.am3
-rw-r--r--lib/chmlib/NEWS68
-rw-r--r--lib/chmlib/README141
-rw-r--r--lib/chmlib/chm_lib.c1917
-rw-r--r--lib/chmlib/chm_lib.h144
-rw-r--r--lib/chmlib/lzx.c812
-rw-r--r--lib/chmlib/lzx.h62
-rw-r--r--lib/kio-msits/Makefile.am14
-rw-r--r--lib/kio-msits/kchmviewer.desktop11
-rwxr-xr-xlib/kio-msits/msits.cpp320
-rwxr-xr-xlib/kio-msits/msits.h79
-rwxr-xr-xlib/kio-msits/msits.protocol24
-rw-r--r--lib/libchmfile/Makefile.am10
-rw-r--r--lib/libchmfile/bitfiddle.h155
-rw-r--r--lib/libchmfile/lchmurlhandler.cpp32
-rw-r--r--lib/libchmfile/lchmurlhandler.h36
-rw-r--r--lib/libchmfile/libchmfile.cpp125
-rw-r--r--lib/libchmfile/libchmfile.h290
-rw-r--r--lib/libchmfile/libchmfile_search.cpp289
-rw-r--r--lib/libchmfile/libchmfileimpl.cpp1271
-rw-r--r--lib/libchmfile/libchmfileimpl.h286
-rw-r--r--lib/libchmfile/libchmtextencoding.cpp197
-rw-r--r--lib/libchmfile/libchmtextencoding.h40
-rw-r--r--lib/libchmfile/libchmtocimage.cpp2112
-rw-r--r--lib/libchmfile/libchmtocimage.h32
-rw-r--r--lib/libchmfile/libchmurlfactory.h122
-rw-r--r--lib/libchmfile/qt34.cpp259
-rw-r--r--lib/libchmfile/qt34.h123
-rw-r--r--po/Makefile.am1
-rw-r--r--po/cs.po845
-rw-r--r--po/du.po870
-rw-r--r--po/fr.po878
-rw-r--r--po/hu.pot723
-rw-r--r--po/kchmviewer.pot806
-rw-r--r--po/ru.po865
-rw-r--r--po/tr.po862
-rw-r--r--po/zh_CN.po848
-rw-r--r--src/Makefile.am39
-rw-r--r--src/config.h.in255
-rw-r--r--src/forwarddeclarations.h48
-rw-r--r--src/iconstorage.cpp1295
-rw-r--r--src/iconstorage.h71
-rw-r--r--src/kchmbookmarkwindow.cpp239
-rw-r--r--src/kchmbookmarkwindow.h63
-rw-r--r--src/kchmconfig.cpp215
-rw-r--r--src/kchmconfig.h84
-rw-r--r--src/kchmcontentswindow.cpp95
-rw-r--r--src/kchmcontentswindow.h52
-rw-r--r--src/kchmdialogchooseurlfromlist.cpp70
-rw-r--r--src/kchmdialogchooseurlfromlist.h47
-rw-r--r--src/kchmindexwindow.cpp179
-rw-r--r--src/kchmindexwindow.h62
-rw-r--r--src/kchmkeyeventfilter.cpp53
-rw-r--r--src/kchmkeyeventfilter.h49
-rw-r--r--src/kchmlistitemtooltip.h72
-rw-r--r--src/kchmmainwindow.cpp1298
-rw-r--r--src/kchmmainwindow.h191
-rw-r--r--src/kchmnavtoolbar.cpp75
-rw-r--r--src/kchmnavtoolbar.h42
-rw-r--r--src/kchmsearchengine.cpp257
-rw-r--r--src/kchmsearchengine.h61
-rw-r--r--src/kchmsearchengine_impl.cpp572
-rw-r--r--src/kchmsearchengine_impl.h151
-rw-r--r--src/kchmsearchtoolbar.cpp438
-rw-r--r--src/kchmsearchtoolbar.h87
-rw-r--r--src/kchmsearchwindow.cpp246
-rw-r--r--src/kchmsearchwindow.h85
-rw-r--r--src/kchmsettings.cpp298
-rw-r--r--src/kchmsettings.h94
-rw-r--r--src/kchmsetupdialog.cpp395
-rw-r--r--src/kchmsetupdialog.ui710
-rw-r--r--src/kchmsourcefactory.cpp94
-rw-r--r--src/kchmsourcefactory.h43
-rw-r--r--src/kchmtreeviewitem.cpp286
-rw-r--r--src/kchmtreeviewitem.h100
-rw-r--r--src/kchmviewwindow.cpp314
-rw-r--r--src/kchmviewwindow.h156
-rw-r--r--src/kchmviewwindow_qtextbrowser.cpp270
-rw-r--r--src/kchmviewwindow_qtextbrowser.h107
-rw-r--r--src/kchmviewwindowmgr.cpp344
-rw-r--r--src/kchmviewwindowmgr.h90
-rw-r--r--src/kde-qt.cpp52
-rw-r--r--src/kde-qt.h148
-rw-r--r--src/kde/Makefile.am8
-rw-r--r--src/kde/kchmdcopiface.cpp86
-rw-r--r--src/kde/kchmdcopiface.h58
-rw-r--r--src/kde/kchmdcopiface_skel.cpp98
-rw-r--r--src/kde/kchmviewwindow_khtmlpart.cpp163
-rw-r--r--src/kde/kchmviewwindow_khtmlpart.h114
-rw-r--r--src/kqrunprocess.h52
-rw-r--r--src/kqtempfile.cpp72
-rw-r--r--src/kqtempfile.h53
-rw-r--r--src/main.cpp96
-rw-r--r--src/pics/Makefile.am2
-rw-r--r--src/pics/cr128-app-kchmviewer.pngbin0 -> 15308 bytes
-rw-r--r--src/pics/cr48-app-kchmviewer.pngbin0 -> 3458 bytes
-rw-r--r--src/pics/cr64-app-kchmviewer.pngbin0 -> 5390 bytes
-rw-r--r--stamp-h.in0
-rw-r--r--subdirs4
123 files changed, 43769 insertions, 0 deletions
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..c13faf0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..d82a402
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,291 @@
+2007-06-16 tim <gyunaev@ulduzsoft.com>
+ - Fixed locale and .desktop installation directory for Gentoo (thx Peter Volkov)
+ - Increased the speed of search engine indexing (thx Kai Londenberg)
+ - Fixed the problem when kchmviewer is called from a browser with URL like file://.
+ - Fixed the unability to run the program when the last opened file does not exist anymore,
+ and the LoadLatestFileOnStartup is set to 1.
+ - Fixed CHMs with Unicode index/topic filenames inside CHM file (thx hephooey).
+ - Fixed showing book images in QTextBrowser when file path contains urlencoded symbols.
+ - Fixed 64bit platforms compilation if system chmlib is not present.
+ - Version 3.1 (Qt3) released.
+
+2007-03-14 tim <gyunaev@ulduzsoft.com>
+ - Version 3.0 released
+ - Added a lot of decoded entities.
+ - Fixed incorrect saving of the settings file which result of this file not being loaded.
+ - Added FAQ.
+ - Added command-line options to search in index and in search window.
+
+2007-03-09 tim <gyunaev@ulduzsoft.com>
+ - Added improved custom search engine.
+ - Added DCOP support for KDE version.
+
+2007-03-08 tim <gyunaev@ulduzsoft.com>
+ - KDE version now shows KDE about dialog
+ - Fixed 'copy' in KDE browser
+ - Version changed to 3.0
+ - Removed duplicated application title in KDE.
+ - Gentoo installation issues fixed.
+ - KDE version sometime didn't kill the process after quit; thanks Norberto Bensa for fix.
+ - Fixed popup menu popping in a wrong place when using QTextBrowser if the scrollbar
+ position is not at the top of the document.
+ - KHTMLPart options sometime were not disabled while QTextBrowser was choosen.
+
+2007-03-01 tim <gyunaev@ulduzsoft.com>
+ - The design changed; created the chm files processing library, and moved it outside the source
+ to improve and simplify Okular integration.
+ - Changed URL2Topic search, the result - startup and opening times increased up to 20 times
+ for large chm files!
+ - Index multiple URL entry also opens now faster.
+ - Added support for new autotools.
+
+2006-12-01 tim <gyunaev@ulduzsoft.com>
+ - Version changed to 2.7.
+ - You can now switch between tabs using Alt+<tab number>, thanks Bobi Jam.
+ - Kchmviewer should now work correctly on non-x86 platforms, including the codepage
+ autodetection.
+ - Added a warning when the browser or browser settings are changed that the application
+ restart is required for changes to take effect.
+ - Fixed the i18n compilation problem in kchmviewwindow.cpp.
+ - If the TOC directory entry did not have an associated page, it was not possible to select it.
+ - TOC directory entries now could be opened/closed with double-click on the entry name/icon,
+ not just +/- icons. Credits to Ludo for the ideas.
+ - No more duplicate entries in previous file history.
+ - The window title is now truncated if too long.
+ - Tab close icon now positioned correctly.
+ - Now current window size and splitter position is also stored on exit - separately
+ for each chm file.
+ - Window selection with multiple tabs now works.
+ - Czech translation added, thanks Hynek Fabian.
+ - Dutch translation updated, thanks Rinse de Vries.
+
+2006-04-05 tim <gyunaev@ulduzsoft.com>
+ - Version changed to 2.6
+ - Fixed gcc 4.x compilation.
+ - Added shortcut help in context menus.
+ - Right-click menu is now available in Contents, Search, Index and Favorites windows.
+ - Fixed navigation buttons 'What's this' messages.
+ - Fixed compilation on Zaurus and Debian.
+
+2006-04-05 tim <gyunaev@ulduzsoft.com>
+ - Application icon should now be correctly installed.
+ - Fixed handling of mailto: urls.
+ - 'Locate in content' button now opens a Contents tab, if hidden.
+ - Version 2.5 release.
+
+2006-04-02 tim <gyunaev@ulduzsoft.com>
+ - A tooltip is now shows the full text in all the tree and list views if truncated on screen.
+ - Fixed content tree parser, now the content table should be parsed correctly.
+ - Fixed crash after the encoding is changed, if any tree item is clicked.
+ - Added a bookmark menu. Ctrl-B is a shortcut to add a bookmark.
+
+2006-04-01 tim <gyunaev@ulduzsoft.com>
+ - Added tab browsing. Use right-click and 'Open in new tab'.
+ - Added right-click content menu to open pages in a new tab.
+ - Control-click on link or table of contents opens a page in a new tab in background.
+ - Shift-click on link or table of contents opens a page in a new tab in foreground.
+
+2006-03-31 tim <gyunaev@ulduzsoft.com>
+ - 'Setup' menu renamed to 'Settings'
+ - Fixed various navigation errors when 'Locate' button didn't locate the appropriate topic.
+ - Fixed forward navigation, and saved scroll position.
+ - Added tab browsing.
+
+2006-02-07 tim <gyunaev@ulduzsoft.com>
+ - Navigation history rewritten, now it stores text position too.
+ - Version changed to 2.1.
+
+2006-02-06 tim <gyunaev@ulduzsoft.com>
+ - Added 'Extract CHM content' menu item to extract the whole CHM file into a directory.
+
+2006-02-02 tim <gyunaev@ulduzsoft.com>
+ - Added i18n calls for complete internationalization. pot file created.
+ - Switched to a new, correct automake file structure.
+ - Fixed autotest.
+ - Version changed to 2.0.
+
+2006-02-01 tim <gyunaev@ulduzsoft.com>
+ - Now kchmviewer uses system libchm if found, and no --with-builtin-chmlib configure switch defined.
+ - Made configure more compatible with newest autoconf and Debian - thanks to Jose Luis Tallon.
+ - Added an application icon - thanks to Jose Luis Tallon.
+ - Fixed index parser for PHP manual - thanks to Dmitry Bakshaev.
+ - In full screen mode the menu bar and status bar are now hidden.
+
+2006-01-30 tim <gyunaev@ulduzsoft.com>
+ - Added 'locate in content window' button to open currently opened topic in the content window.
+ - Fixed compilation with gcc 4.1 - thanks to Jan Jitse Venselaar.
+ - The algorithm to detect the valid root offset in contents page is changed. Now there should be less
+ "CHMFile::ParseAndFillTopicsTree: child entry 1 with no root entry!" errors.
+ - Pages with images only are now shown correctly.
+
+2005-12-30 tim <gyunaev@ulduzsoft.com>
+ - Fixed kqrunprocess.h compilation bug on some platforms.
+
+2005-11-27 tim <gyunaev@ulduzsoft.com>
+ - Version 1.3 RELEASE
+
+2005-11-25 tim <gyunaev@ulduzsoft.com>
+ - Fixed error message when CHM file cannot be opened.
+ - Added Fullscreen mode (shortcut F11), and option to show/hide contents window (F9).
+
+2005-11-22 tim <gyunaev@ulduzsoft.com>
+ - Added possibility to view HTML source in external viewer/editor
+
+2005-11-21 tim <gyunaev@ulduzsoft.com>
+ - File names containing non-English characters now open correctly.
+ - Changed copyright notices.
+
+2005-11-21 tim <gyunaev@ulduzsoft.com>
+ - Fixed browser page update for QTextBrowser when current encoding changes.
+ - Changed encoding selectore. Now it compiles on x86_64.
+ - version 1.2 RELEASE
+
+2005-11-20 tim <gyunaev@ulduzsoft.com>
+ - Added 'next page' and 'prev page' buttons.
+ - Added extra charset encodings for Japanese, Chinese, Russian and Ukrainian languages.
+ - Added UTF-8 and UTF-16 encodings to country 'Unicode' :)
+ - Added special KOI8 encoding to Russian and Ukrainian languages. 'Special' means that
+ TOC is in CP1251 encoding, while content is in KOI8 encoding. There were some CHM files
+ with such weird encoding, so it is kinda hack.
+ - Fixed language selection bug - application crashed when you select the last language in any submenu.
+ - 'Set encoding' menu renamed to 'Set Language'.
+ - Added a new 'Set codepage' menu, which allows experienced people to send needed text code page directly.
+ - Added Ctrl-F shortcut to move cursor focus onto the search input combo box.
+ - Fixed navigation in some CHM files, which have spaces in filenames.
+
+2005-10-30 tim <gyunaev@ulduzsoft.com>
+ - fixed security bug - chmlib-0.35 updated to 0.37
+ - version 1.1 RELEASE released.
+
+2005-09-27 tim <gyunaev@ulduzsoft.com>
+ - fixed bug with incorrect embedded image shown - thanks to XinWei Hu.
+ - fixed bug with non-working decrease font size - thanks to anonymous Sourceforge user.
+ - copy in KDE version worked through Ctrl-C or 'copy' in content menu.
+
+
+2005-07-28 tim <gyunaev@ulduzsoft.com>
+ - Version 1.0 RELEASE released.
+ - Fixed -h option for Qt version.
+ - Fixed search messagebox on '?' button.
+ - Added F3 shortcut for 'next search in page' action.
+
+2005-06-30 tim <gyunaev@ulduzsoft.com>
+ - version 0.92 RELEASE CANDIDATE 2 released.
+ - fixed Slackware 10 compilation (one more time)
+
+2005-06-25 tim <gyunaev@ulduzsoft.com>
+ - more namespace cleanups and bugfixes.
+ - context and search windows are not shown if the opened file doesn't have it.
+ - removed 'search in results' checkbox.
+ - the last used directory is also stored.
+
+2005-06-21 tim <gyunaev@ulduzsoft.com>
+ - fixed 'View HTML source' bug.
+ - fixed "Select All/Copy" popup menu bugs.
+ - fixed bug with duplicated WhatsIs icon on every toolbar.
+ - added several keyboard shortcuts for menu commands.
+ - added extra shortcuts: Ctrl+1 opens the contents page, Ctrl+2 opens Index page,
+ Ctrl+3 opens the Search page, and Ctrl+4 opens the Bookmarks page.
+ - added command-line options to search in pages, in index and in bookmarks.
+
+2005-06-20 Luca 'Ziabice' Gambetta <ziabice@ziabice.net>
+ - fix for AMD64 platform (confirmed to work)
+
+2005-06-18 tim <gyunaev@ulduzsoft.com>
+ - version 0.91 RELEASE CANDIDATE 1 released.
+
+2005-06-18 tim <gyunaev@ulduzsoft.com>
+ - all configuration settings are now used.
+ - history is saved, loaded and cleaned up correctly.
+ - chm data (size/time) is now stored inside the history file, not in file name.
+
+2005-06-17 tim <gyunaev@ulduzsoft.com>
+ - some of configuration settings are now used.
+ - new browser is now running on Qt version when external URL is opening.
+
+2005-06-16 tim <gyunaev@ulduzsoft.com>
+ - added the configuration dialog, configuration settings are now saved and loaded.
+
+2005-06-12 tim <gyunaev@ulduzsoft.com>
+ - fixed compilation on Slackware 10.
+ - fixed internal links following for QTextBrowser.
+
+2005-06-11 Gregorio Guidi <greg_g@gentoo.org>
+ - fixed possible problem - linking static chmlib against non-static executable.
+ - added --without-kde option.
+
+2005-06-07 tim <gyunaev@ulduzsoft.com>
+ - preparing to release version 0.9beta.
+ - version 0.9beta released.
+
+2005-06-07 tim <gyunaev@ulduzsoft.com>
+ - added a full-featured search engine with complex query support.
+
+2005-06-02 tim <gyunaev@ulduzsoft.com>
+ - added copy/selectall functionality to KHTML browser, including a popup menu.
+ - fixed storing scrollbar position for KHTML browser.
+ - fixed window refresh on encoding change, encoding change now works for KHTML browser.
+ - zoom in/out buttons also work for KHTML browser.
+
+2005-06-01 tim <gyunaev@ulduzsoft.com>
+ - clicking on links (in-book navigation) now works for KHTML browser.
+ - full links (ms-its:) in chm files are now supported.
+
+2005-05-10 tim <gyunaev@ulduzsoft.com>
+ - switched to KPopupMenu for KDE.
+ - fixed search/print for KHTMLPart.
+ - fixed status bar in KDE window.
+ - added QWhatsThis for every toolbar icon.
+ - fixed command-line parsing for KDE app, remove external GetOpt class.
+ - fixed build outside the work directory.
+
+2005-05-04 tim <gyunaev@ulduzsoft.com>
+ - KDE integration continues. Now we support printing from KHTML.
+ - KIO-slave now works.
+ - switched to KTabWidget for KDE.
+ - fixed search/print for QTextBrowser.
+
+2005-05-03 tim <gyunaev@ulduzsoft.com>
+ - Reimplemented browser history in a more convinient way.
+ - KDE integration continues. Now we support KHTML.
+ - Added a KIO-slave to handle CHMs.
+ - Now it is possible to open files with non-latin filenames.
+ - Added support for CHM urls containing anchors.
+ - It is possible to use QTextBrowser even for a KDE application.
+
+2005-04-27 tim <gyunaev@ulduzsoft.com>
+ - KDE integration started. Now we support KApplication, KMainWindow and KFileDialog.
+
+2005-04-24 tim <gyunaev@ulduzsoft.com>
+ - version 0.2 released.
+
+2005-04-24 tim <gyunaev@ulduzsoft.com>
+ - added index fields identation according to .hhk file.
+ - index entries with multiple links are now supported. A dialog is opened when such a link is clicked.
+ - index "see also" links are now supported.
+ - added red color for index entries with multiple links, and grey color for "see also" links.
+ - chmlib interface redesigned for a great code cleanup and a little speedup.
+ - fixed bug when search history and bookmark list grow up every start.
+ - fixed garbage at the end of some HTML pages.
+ - fixed bug when search results do not open in page.
+ - fixed compilation on earlier Qt version (remove qvector.h dependency).
+ - fixed compilation on glibc without off_t.
+
+2005-04-23 tim <gyunaev@ulduzsoft.com>
+ - TOC parser rewritten, got about 30% speedup on TOC parsing. Note that TOC parser becomes stricter; please report any warnings.
+ - Fixed chinese encoding TOC bugs, chinese files are now also shown correctly.
+ - Added &rdquo; entity to the entities list.
+
+2005-04-19 tim <gyunaev@ulduzsoft.com>
+ - added support for built-in images, including custom images for folders;
+ - re-merged toolbar images into the executable as PNGs (uses less space);
+ - switched to autoconf/automake from qmake to simplify building and distribution, and to simplify KDEing;
+
+2005-04-05 tim <gyunaev@ulduzsoft.com>
+ - version 0.1alpha released
+ - fixed slowdown on big files;
+
+2005-04-05 tim <gyunaev@ulduzsoft.com>
+ - images merged into the main executable
+
+
diff --git a/DCOP-bingings b/DCOP-bingings
new file mode 100644
index 0000000..a3cfb03
--- /dev/null
+++ b/DCOP-bingings
@@ -0,0 +1,22 @@
+kchmviewer supports the following DCOP bindings:
+
+Interface name: KCHMDCOPIface
+
+Bingings:
+
+ // Loads a CHM file filename , and opens the URL url. Use URL "/" to open default homepage
+ void loadHelpFile( String filename, String url );
+
+ // Opens a specific url inside the loaded CHM file
+ void openPage( String url );
+
+ // Tries to find word in index, opening the index window and scrolling it there
+ void guiFindInIndex( String word );
+
+ // Executes a search in GUI. query contains the complete search query.
+ void guiSearchQuery( String query );
+
+ // Executes a search; GUI is not involved and user sees nothing.
+ // query contains the complete search query.
+ // Returns a list of URLs, or empty array if nothing os
+ StringList searchQuery( String query );
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 0000000..a57bfe3
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,275 @@
+# Doxyfile 1.4.1-KDevelop
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = kchmviewer.kdevelop
+PROJECT_NUMBER = 0.1
+OUTPUT_DIRECTORY =
+CREATE_SUBDIRS = NO
+OUTPUT_LANGUAGE = English
+USE_WINDOWS_ENCODING = NO
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+ALWAYS_DETAILED_SEC = NO
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = YES
+STRIP_FROM_PATH = /home/tim/
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP = NO
+INHERIT_DOCS = YES
+DISTRIBUTE_GROUP_DOC = NO
+TAB_SIZE = 8
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+SUBGROUPING = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = YES
+EXTRACT_LOCAL_METHODS = NO
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = YES
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = NO
+SORT_BY_SCOPE_NAME = NO
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+SHOW_DIRECTORIES = YES
+FILE_VERSION_FILTER =
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_NO_PARAMDOC = NO
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = /home/tim/work/kchmviewer
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.idl \
+ *.odl \
+ *.cs \
+ *.php \
+ *.php3 \
+ *.inc \
+ *.m \
+ *.mm \
+ *.dox \
+ *.C \
+ *.CC \
+ *.C++ \
+ *.II \
+ *.I++ \
+ *.H \
+ *.HH \
+ *.H++ \
+ *.CS \
+ *.PHP \
+ *.PHP3 \
+ *.M \
+ *.MM \
+ *.C \
+ *.H \
+ *.tlh \
+ *.diff \
+ *.patch \
+ *.moc \
+ *.xpm \
+ *.dox
+RECURSIVE = yes
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS = *
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+VERBATIM_HEADERS = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = NO
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = YES
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = NO
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = NO
+TREEVIEW_WIDTH = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = YES
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = NO
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = yes
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE = kchmviewer.tag
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = YES
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = NO
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+GROUP_GRAPHS = YES
+UML_LOOK = NO
+TEMPLATE_RELATIONS = NO
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DIRECTORY_GRAPH = YES
+DOT_IMAGE_FORMAT = png
+DOT_PATH =
+DOTFILE_DIRS =
+MAX_DOT_GRAPH_WIDTH = 1024
+MAX_DOT_GRAPH_HEIGHT = 1024
+MAX_DOT_GRAPH_DEPTH = 1000
+DOT_TRANSPARENT = NO
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+SEARCHENGINE = NO
diff --git a/FAQ b/FAQ
new file mode 100644
index 0000000..b7af7f8
--- /dev/null
+++ b/FAQ
@@ -0,0 +1,41 @@
+Browsing:
+
+Q: The book shows without any problem using QTextWidget browser, but when I use KHTMLPart browser, I get the following error:
+ An error occurred while loading ms-its:/home/user/SymphonyFrameWork.chm::/index.html
+ Thefileorfolderms-its:/home/user/SymphonyFrameWork.chm::/index.htmldoesnotexist.
+
+A: You have kio_chm installed, and because it installs itself as KIO slave for ms-its, sometime KDE uses it instead of kio_msits.
+ To disable it, find the file chm.protocol in your KDE directory, and remove it. Then run kdeinit to reread the configuration.
+
+
+Q: When I open CHM document, there is no "Contents" or "Index" tab.
+A: The files required for Content or Index tabs are not present in chm file. Therefore it is not possible to show those tabs.
+
+Q: I use KDE. Which browser is better to use - KHTMLPart or QTextBrowser?
+A: QTextBrowser was reported to be faster, except for multibyte languages (Japanese/Chinese/Korean).
+ However KHTMLPart is obviously more standard-compliant. I use KHTMLPart.
+
+Q: Font size increasing button does not increase the font size, just changes the font to bold once.
+A: Make sure you use resizeable (true type) fonts. The described behavior is expected when bitmap fonts are used, as their size
+ could not be changed. Check your system configuration.
+
+Questions about search.
+Before version 3.0 is out there was only one search engine, which is still available in Advanced settings as "search engine based on internal CHM index".
+The following questions are only related to the old search engine, and are fixed in a new one.
+
+Q: Why my search for "for this" found no documents even though I know there are documents containing this phrase?
+Q: Why my search for "C++" or "argv[0]" found no documents even though I know there are documents containing this phrase?
+Q: Why the search tab is not shown?
+
+A: The search does not look through all the documents. Instead it uses the previously generated index stored in CHM file. If the index
+ is not present in the file, the search is not possible.
+ However the indexing procedure in Microsoft HTML Help Workshop does not index the symbols (except underscore), single letters
+ and common words like for, this, to, do, etc. Therefore those words and symbols are not in index file, so search for "C++"
+ will not be found.
+ Also the the indexing procedure in Microsoft HTML Help Workshop brokes the ASCII characters which are outside 7-bit ASCII table. Therefore
+ search using European/Russian letters often produces strange results, finding the pages with no search words present, and does not work
+ with Asian langiages.
+
+ The solution is new kchmviewer search engine. It is also index-based, but the index is generated by chmviewer. Every symbol is indexed,
+ so seach for "C++" or "argv[0]" will find the appropriate code. It uses Unicode inside, so it has no problem with any language, including
+ Japanese, Chinese and Korean.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..d0665f9
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,7 @@
+AUTOMAKE_OPTIONS = foreign 1.6
+
+SUBDIRS = lib src po
+
+package-messages:
+ $(MAKE) -f admin/Makefile.common package-messages
+ $(MAKE) -C po merge
diff --git a/Makefile.cvs b/Makefile.cvs
new file mode 100644
index 0000000..5b6902b
--- /dev/null
+++ b/Makefile.cvs
@@ -0,0 +1,11 @@
+all:
+ @echo "This Makefile is only for the CVS repository"
+ @echo "This will be deleted before making the distribution"
+ @echo ""
+ $(MAKE) -f admin/Makefile.common cvs
+ rm -rf autom4te.cache
+
+dist:
+ $(MAKE) -f admin/Makefile.common dist
+
+.SILENT:
diff --git a/README b/README
new file mode 100644
index 0000000..8afed30
--- /dev/null
+++ b/README
@@ -0,0 +1,123 @@
+1. OVERVIEW
+
+ KchmViewer is a chm (MS HTML help file format) viewer, written in C++. Unlike most existing CHM viewers for Unix,
+ it uses Trolltech Qt widget library, and does not depend on KDE or Gnome. However, it may be compiled with full
+ KDE support, including KDE widgets and KIO/KHTML.
+
+ The main advantage of KchmViewer is extended support for non-English languages. Unlike others, KchmViewer in most
+ cases correctly detects chm file encoding, correctly shows tables of context of Russian, Korean, Chinese and
+ Japanese help files, and correctly searches in non-English help files (search for MBCS languages - ja/ko/ch is
+ still in progress).
+
+ KchmViewer is written by Georgy Yunaev (gyunaev@ulduzsoft.com), and is licensed under GNU GPL license. Please
+ do NOT use this email for bug reporting; see below.
+
+2. FEATURES
+
+ - Standalone viewer, depends on Qt only. Does not require KDE, Gnome or wxWindows toolkit.
+ - A KDE viewer can be compiled optionally, with KIO slave, KHTML and K*Widget support.
+ - Completely safe and harmless. Does not support JavaScript in any way, optionally warns you before opening an
+ external web page, or switching to another help file.
+ - Correctly detects and shows encoding of any valid chm file.
+ - Correctly shows non-English chm files, including cyrillic, chinese, japanese and others.
+ - Correctly searches in non-English chm files using chm built-in search index.
+ - Shows an appropriate image for every TOC entry.
+ - Has complete chm index support, including multiple index entries, cross-links and parent/child entries in index.
+ - Persistent bookmarks support. Allows to store bookmarks even if "Favorites" window was not enabled for this chm
+ file. Also stores the screen position for every bookmark. You can also edit/delete bookmarks.
+ - For any opened chm file, stores the last opened window, search history, bookmark history, font size and so on, so
+ when you open this file again, everything is always on the place.
+ - Has easy and powerful search-in-page support.
+ - Allows to increase or decrease the font size, so physically handicapped people can read texts easily.
+ - Has standard Back/Forward/Home navigation.
+ - Can print the opened pages on a standard printer (usually via CUPS).
+ - Has complex search query support. You can use search queries like "lazy people" + learn -not.
+
+
+3. INSTALLATION
+
+ Usually kchmviewer is distributed in source code archive, so you need to compile it first. It compiles with Qt 3.x,
+ but recommended Qt version is 3.3.4 and above. This is due to font resizing bug existing in previous Qt versions,
+ so if you use pre-3.3.4, you will have problems with font sizes. Note that you need to install qt3-devel package,
+ not only qt package.
+
+3.1. Qt-only version
+
+ To compile Qt-only version of kchmviewer, follow the simple procedure:
+
+ > tar zxf kchmviewer-<version>.tar.gzi
+ > cd kchmviewer-<version>
+ > ./configure
+ > make
+ > sudo make install
+
+ The last step is optional; you can use kchmviewer binary without installation.
+
+3.2 KDE version
+
+ This procedure will create the Qt-only executable, which does not use KDE. If you want to compile executable
+ for KDE, add --with-kde to configure options. For KDE version, 'make install' is required to work with KHTML
+ browser. Note that you need kdelibs-devel package installed.
+
+ > tar zxf kchmviewer-<version>.tar.gz
+ > cd kchmviewer-<version>
+ > ./configure --with-kde
+ > make
+ > sudo make install
+
+3.3 x86-64 version
+
+ To compile kchmviewer version for x86-64, make sure that you have installed 64-bit qt and qt-devel libraries,
+ and specify the path to them with --with-qt-libraries= configure switch:
+
+ > tar zxf kchmviewer-<version>.tar.gz
+ > cd kchmviewer-<version>
+ > ./configure --with-qt-libraries=/usr/lib/qt3/lib64 [--with-kde (optional)]
+ > make
+ > sudo make install
+
+ If you experience any link error, make sure you have all 64bit libraries installed. Look careful on error
+ messages; usually they point you to right direction.
+
+
+4. USAGE
+
+ Usage of kchmviewer is simple:
+
+ > kchmviewer mychmfile.chm
+
+ for the rest of command-line options, see kchmviewer --help
+
+
+5. BUG REPORTING
+
+ Please use kchmviewer@ulduzsoft.com for bug reporting.
+
+
+6. THANKS
+
+ Thanks to:
+ - Jed Wing, the author of chmlib. This library is used by kchmviewer to access chm content.
+ - Razvan Cojocaru, the author of xchm. I used some ideas and chm processing code from xchm.
+ - All the users, who report bugs, and suggest features. You help making kchnviewer better.
+
+
+7. LICENSE
+
+ kchmviewer is distributed under GNU GPL license.
+ Copyright (C) 2004-2007 Georgy (George) Yunaev
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..c4d0c12
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,11919 @@
+## -*- autoconf -*-
+
+dnl This file is part of the KDE libraries/packages
+dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
+dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
+
+dnl This file is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Library General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2 of the License, or (at your option) any later version.
+
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Library General Public License for more details.
+
+dnl You should have received a copy of the GNU Library General Public License
+dnl along with this library; see the file COPYING.LIB. If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+dnl Boston, MA 02110-1301, USA.
+
+dnl IMPORTANT NOTE:
+dnl Please do not modify this file unless you expect your modifications to be
+dnl carried into every other module in the repository.
+dnl
+dnl Single-module modifications are best placed in configure.in for kdelibs
+dnl and kdebase or configure.in.in if present.
+
+# KDE_PATH_X_DIRECT
+dnl Internal subroutine of AC_PATH_X.
+dnl Set ac_x_includes and/or ac_x_libraries.
+AC_DEFUN([KDE_PATH_X_DIRECT],
+[
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+if test "$ac_x_includes" = NO; then
+ # Guess where to find include files, by looking for this one X11 .h file.
+ test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
+
+ # First, try using that file with no special directory specified.
+AC_TRY_CPP([#include <$x_direct_test_include>],
+[# We can compile using X headers with no special include directory.
+ac_x_includes=],
+[# Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ for ac_dir in \
+ /usr/X11/include \
+ /usr/X11R6/include \
+ /usr/X11R5/include \
+ /usr/X11R4/include \
+ \
+ /usr/include/X11 \
+ /usr/include/X11R6 \
+ /usr/include/X11R5 \
+ /usr/include/X11R4 \
+ \
+ /usr/local/X11/include \
+ /usr/local/X11R6/include \
+ /usr/local/X11R5/include \
+ /usr/local/X11R4/include \
+ \
+ /usr/local/include/X11 \
+ /usr/local/include/X11R6 \
+ /usr/local/include/X11R5 \
+ /usr/local/include/X11R4 \
+ \
+ /usr/X386/include \
+ /usr/x386/include \
+ /usr/XFree86/include/X11 \
+ \
+ /usr/include \
+ /usr/local/include \
+ /usr/unsupported/include \
+ /usr/athena/include \
+ /usr/local/x11r5/include \
+ /usr/lpp/Xamples/include \
+ \
+ /usr/openwin/include \
+ /usr/openwin/share/include \
+ ; \
+ do
+ if test -r "$ac_dir/$x_direct_test_include"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+ done])
+fi # $ac_x_includes = NO
+
+if test "$ac_x_libraries" = NO; then
+ # Check for the libraries.
+
+ test -z "$x_direct_test_library" && x_direct_test_library=Xt
+ test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
+
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS="$LIBS"
+ LIBS="-l$x_direct_test_library $LIBS"
+AC_TRY_LINK([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)],
+[LIBS="$ac_save_LIBS"
+# We can link X programs with no special library path.
+ac_x_libraries=],
+[LIBS="$ac_save_LIBS"
+# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
+ /usr/X11/lib${kdelibsuff} \
+ /usr/X11R6/lib${kdelibsuff} \
+ /usr/X11R5/lib${kdelibsuff} \
+ /usr/X11R4/lib${kdelibsuff} \
+ \
+ /usr/lib${kdelibsuff}/X11 \
+ /usr/lib${kdelibsuff}/X11R6 \
+ /usr/lib${kdelibsuff}/X11R5 \
+ /usr/lib${kdelibsuff}/X11R4 \
+ \
+ /usr/local/X11/lib${kdelibsuff} \
+ /usr/local/X11R6/lib${kdelibsuff} \
+ /usr/local/X11R5/lib${kdelibsuff} \
+ /usr/local/X11R4/lib${kdelibsuff} \
+ \
+ /usr/local/lib${kdelibsuff}/X11 \
+ /usr/local/lib${kdelibsuff}/X11R6 \
+ /usr/local/lib${kdelibsuff}/X11R5 \
+ /usr/local/lib${kdelibsuff}/X11R4 \
+ \
+ /usr/X386/lib${kdelibsuff} \
+ /usr/x386/lib${kdelibsuff} \
+ /usr/XFree86/lib${kdelibsuff}/X11 \
+ \
+ /usr/lib${kdelibsuff} \
+ /usr/local/lib${kdelibsuff} \
+ /usr/unsupported/lib${kdelibsuff} \
+ /usr/athena/lib${kdelibsuff} \
+ /usr/local/x11r5/lib${kdelibsuff} \
+ /usr/lpp/Xamples/lib${kdelibsuff} \
+ /lib/usr/lib${kdelibsuff}/X11 \
+ \
+ /usr/openwin/lib${kdelibsuff} \
+ /usr/openwin/share/lib${kdelibsuff} \
+ ; \
+do
+dnl Don't even attempt the hair of trying to link an X program!
+ for ac_extension in a so sl; do
+ if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done])
+fi # $ac_x_libraries = NO
+])
+
+
+dnl ------------------------------------------------------------------------
+dnl Find a file (or one of more files in a list of dirs)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_FIND_FILE],
+[
+$3=NO
+for i in $2;
+do
+ for j in $1;
+ do
+ echo "configure: __oline__: $i/$j" >&AC_FD_CC
+ if test -r "$i/$j"; then
+ echo "taking that" >&AC_FD_CC
+ $3=$i
+ break 2
+ fi
+ done
+done
+])
+
+dnl KDE_FIND_PATH(program-name, variable-name, list-of-dirs,
+dnl if-not-found, test-parameter, prepend-path)
+dnl
+dnl Look for program-name in list-of-dirs+$PATH.
+dnl If prepend-path is set, look in $PATH+list-of-dirs instead.
+dnl If found, $variable-name is set. If not, if-not-found is evaluated.
+dnl test-parameter: if set, the program is executed with this arg,
+dnl and only a successful exit code is required.
+AC_DEFUN([KDE_FIND_PATH],
+[
+ AC_MSG_CHECKING([for $1])
+ if test -n "$$2"; then
+ kde_cv_path="$$2";
+ else
+ kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
+
+ AC_CACHE_VAL(kde_cv_path_$kde_cache,
+ [
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ dirs=""
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ if test -z "$6"; then dnl Append dirs in PATH (default)
+ dirs="$3 $dirs"
+ else dnl Prepend dirs in PATH (if 6th arg is set)
+ dirs="$dirs $3"
+ fi
+ IFS=$kde_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/$1"; then
+ if test -n "$5"
+ then
+ evalstr="$dir/$1 $5 2>&1 "
+ if eval $evalstr; then
+ kde_cv_path="$dir/$1"
+ break
+ fi
+ else
+ kde_cv_path="$dir/$1"
+ break
+ fi
+ fi
+ done
+
+ eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+ ])
+
+ eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+ fi
+
+ if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+ AC_MSG_RESULT(not found)
+ $4
+ else
+ AC_MSG_RESULT($kde_cv_path)
+ $2=$kde_cv_path
+
+ fi
+])
+
+AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
+[
+ AC_MSG_ERROR([No Qt meta object compiler (moc) found!
+Please check whether you installed Qt correctly.
+You need to have a running moc binary.
+configure tried to run $ac_cv_path_moc and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable MOC to the right one before running
+configure.
+])
+])
+
+AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
+[
+ AC_MSG_WARN([No Qt ui compiler (uic) found!
+Please check whether you installed Qt correctly.
+You need to have a running uic binary.
+configure tried to run $ac_cv_path_uic and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable UIC to the right one before running
+configure.
+])
+])
+
+
+AC_DEFUN([KDE_CHECK_UIC_FLAG],
+[
+ AC_MSG_CHECKING([whether uic supports -$1 ])
+ kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
+ AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
+ [
+ cat >conftest.ui <<EOT
+ <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
+EOT
+ ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
+ if AC_TRY_EVAL(ac_uic_testrun); then
+ eval "kde_cv_prog_uic_$kde_cache=yes"
+ else
+ eval "kde_cv_prog_uic_$kde_cache=no"
+ fi
+ rm -f conftest*
+ ])
+
+ if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
+ AC_MSG_RESULT([yes])
+ :
+ $3
+ else
+ AC_MSG_RESULT([no])
+ :
+ $4
+ fi
+])
+
+
+dnl ------------------------------------------------------------------------
+dnl Find the meta object compiler and the ui compiler in the PATH,
+dnl in $QTDIR/bin, and some more usual places
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_PATH_QT_MOC_UIC],
+[
+ AC_REQUIRE([KDE_CHECK_PERL])
+ qt_bindirs=""
+ for dir in $kde_qt_dirs; do
+ qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
+ done
+ qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
+ if test ! "$ac_qt_bindir" = "NO"; then
+ qt_bindirs="$ac_qt_bindir $qt_bindirs"
+ fi
+
+ KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
+ if test -z "$UIC_NOT_NEEDED"; then
+ KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
+ if test -z "$UIC_PATH" ; then
+ KDE_UIC_ERROR_MESSAGE
+ exit 1
+ else
+ UIC=$UIC_PATH
+
+ if test $kde_qtver = 3; then
+ KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
+ KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
+
+ if test x$ac_uic_supports_libpath = xyes; then
+ UIC="$UIC -L \$(kde_widgetdir)"
+ fi
+ if test x$ac_uic_supports_nounload = xyes; then
+ UIC="$UIC -nounload"
+ fi
+ fi
+ fi
+ else
+ UIC="echo uic not available: "
+ fi
+
+ AC_SUBST(MOC)
+ AC_SUBST(UIC)
+
+ UIC_TR="i18n"
+ if test $kde_qtver = 3; then
+ UIC_TR="tr2i18n"
+ fi
+
+ AC_SUBST(UIC_TR)
+])
+
+AC_DEFUN([KDE_1_CHECK_PATHS],
+[
+ KDE_1_CHECK_PATH_HEADERS
+
+ KDE_TEST_RPATH=
+
+ if test -n "$USE_RPATH"; then
+
+ if test -n "$kde_libraries"; then
+ KDE_TEST_RPATH="-R $kde_libraries"
+ fi
+
+ if test -n "$qt_libraries"; then
+ KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
+ fi
+
+ if test -n "$x_libraries"; then
+ KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
+ fi
+
+ KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
+ fi
+
+AC_MSG_CHECKING([for KDE libraries installed])
+ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_ERROR([your system fails at linking a small KDE application!
+Check, if your compiler is installed correctly and if you have used the
+same compiler to compile Qt and kdelibs as you did use now.
+For more details about this problem, look at the end of config.log.])
+fi
+
+if eval `KDEDIR= ./conftest 2>&5`; then
+ kde_result=done
+else
+ kde_result=problems
+fi
+
+KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
+kde_have_all_paths=yes
+
+KDE_SET_PATHS($kde_result)
+
+])
+
+AC_DEFUN([KDE_SET_PATHS],
+[
+ kde_cv_all_paths="kde_have_all_paths=\"yes\" \
+ kde_htmldir=\"$kde_htmldir\" \
+ kde_appsdir=\"$kde_appsdir\" \
+ kde_icondir=\"$kde_icondir\" \
+ kde_sounddir=\"$kde_sounddir\" \
+ kde_datadir=\"$kde_datadir\" \
+ kde_locale=\"$kde_locale\" \
+ kde_cgidir=\"$kde_cgidir\" \
+ kde_confdir=\"$kde_confdir\" \
+ kde_kcfgdir=\"$kde_kcfgdir\" \
+ kde_mimedir=\"$kde_mimedir\" \
+ kde_toolbardir=\"$kde_toolbardir\" \
+ kde_wallpaperdir=\"$kde_wallpaperdir\" \
+ kde_templatesdir=\"$kde_templatesdir\" \
+ kde_bindir=\"$kde_bindir\" \
+ kde_servicesdir=\"$kde_servicesdir\" \
+ kde_servicetypesdir=\"$kde_servicetypesdir\" \
+ kde_moduledir=\"$kde_moduledir\" \
+ kde_styledir=\"$kde_styledir\" \
+ kde_widgetdir=\"$kde_widgetdir\" \
+ xdg_appsdir=\"$xdg_appsdir\" \
+ xdg_menudir=\"$xdg_menudir\" \
+ xdg_directorydir=\"$xdg_directorydir\" \
+ kde_result=$1"
+])
+
+AC_DEFUN([KDE_SET_DEFAULT_PATHS],
+[
+if test "$1" = "default"; then
+
+ if test -z "$kde_htmldir"; then
+ kde_htmldir='\${datadir}/doc/HTML'
+ fi
+ if test -z "$kde_appsdir"; then
+ kde_appsdir='\${datadir}/applications'
+ fi
+ if test -z "$kde_icondir"; then
+ kde_icondir='\${datadir}/icons'
+ fi
+ if test -z "$kde_sounddir"; then
+ kde_sounddir='\${datadir}/sounds'
+ fi
+ if test -z "$kde_datadir"; then
+ kde_datadir='\${datadir}/apps'
+ fi
+ if test -z "$kde_locale"; then
+ kde_locale='\${datadir}/locale'
+ fi
+ if test -z "$kde_cgidir"; then
+ kde_cgidir='\${exec_prefix}/cgi-bin'
+ fi
+ if test -z "$kde_confdir"; then
+ kde_confdir='\${datadir}/config'
+ fi
+ if test -z "$kde_kcfgdir"; then
+ kde_kcfgdir='\${datadir}/config.kcfg'
+ fi
+ if test -z "$kde_mimedir"; then
+ kde_mimedir='\${datadir}/mimelnk'
+ fi
+ if test -z "$kde_toolbardir"; then
+ kde_toolbardir='\${datadir}/toolbar'
+ fi
+ if test -z "$kde_wallpaperdir"; then
+ kde_wallpaperdir='\${datadir}/wallpapers'
+ fi
+ if test -z "$kde_templatesdir"; then
+ kde_templatesdir='\${datadir}/templates'
+ fi
+ if test -z "$kde_bindir"; then
+ kde_bindir='\${exec_prefix}/bin'
+ fi
+ if test -z "$kde_servicesdir"; then
+ kde_servicesdir='\${datadir}/services'
+ fi
+ if test -z "$kde_servicetypesdir"; then
+ kde_servicetypesdir='\${datadir}/servicetypes'
+ fi
+ if test -z "$kde_moduledir"; then
+ if test "$kde_qtver" = "2"; then
+ kde_moduledir='\${libdir}/kde2'
+ else
+ kde_moduledir='\${libdir}/kde3'
+ fi
+ fi
+ if test -z "$kde_styledir"; then
+ kde_styledir='\${libdir}/kde3/plugins/styles'
+ fi
+ if test -z "$kde_widgetdir"; then
+ kde_widgetdir='\${libdir}/kde3/plugins/designer'
+ fi
+ if test -z "$xdg_appsdir"; then
+ xdg_appsdir='\${datadir}/applications/kde'
+ fi
+ if test -z "$xdg_menudir"; then
+ xdg_menudir='\${sysconfdir}/xdg/menus'
+ fi
+ if test -z "$xdg_directorydir"; then
+ xdg_directorydir='\${datadir}/desktop-directories'
+ fi
+
+ KDE_SET_PATHS(defaults)
+
+else
+
+ if test $kde_qtver = 1; then
+ AC_MSG_RESULT([compiling])
+ KDE_1_CHECK_PATHS
+ else
+ AC_MSG_ERROR([path checking not yet supported for KDE 2])
+ fi
+
+fi
+])
+
+AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
+[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
+ test -z "$kde_icondir" || test -z "$kde_sounddir" ||
+ test -z "$kde_datadir" || test -z "$kde_locale" ||
+ test -z "$kde_cgidir" || test -z "$kde_confdir" ||
+ test -z "$kde_kcfgdir" ||
+ test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
+ test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
+ test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
+ test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
+ test -z "$kde_styledir" || test -z "kde_widgetdir" ||
+ test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
+ test "x$kde_have_all_paths" != "xyes"; then
+ kde_have_all_paths=no
+ fi
+])
+
+AC_DEFUN([KDE_MISSING_PROG_ERROR],
+[
+ AC_MSG_ERROR([The important program $1 was not found!
+Please check whether you installed KDE correctly.
+])
+])
+
+AC_DEFUN([KDE_MISSING_ARTS_ERROR],
+[
+ AC_MSG_ERROR([The important program $1 was not found!
+Please check whether you installed aRts correctly or use
+--without-arts to compile without aRts support (this will remove functionality).
+])
+])
+
+AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
+[
+ kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
+ test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
+ if test -n "$KDEDIRS"; then
+ kde_save_IFS=$IFS
+ IFS=:
+ for dir in $KDEDIRS; do
+ kde_default_bindirs="$dir/bin $kde_default_bindirs "
+ done
+ IFS=$kde_save_IFS
+ fi
+])
+
+AC_DEFUN([KDE_SUBST_PROGRAMS],
+[
+ AC_ARG_WITH(arts,
+ AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
+ [build_arts=$withval],
+ [build_arts=yes]
+ )
+ AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
+ if test "$build_arts" = "no"; then
+ AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
+ fi
+
+ KDE_SET_DEFAULT_BINDIRS
+ kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
+ KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
+ KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
+ if test "$build_arts" '!=' "no"; then
+ KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
+ KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
+ fi
+ KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
+
+ kde32ornewer=1
+ kde33ornewer=1
+ if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
+ kde32ornewer=
+ kde33ornewer=
+ else
+ if test "$kde_qtver" = "3"; then
+ if test "$kde_qtsubver" -le 1; then
+ kde32ornewer=
+ fi
+ if test "$kde_qtsubver" -le 2; then
+ kde33ornewer=
+ fi
+ if test "$KDECONFIG" != "compiled"; then
+ if test `$KDECONFIG --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then
+ kde33ornewer=
+ fi
+ fi
+ fi
+ fi
+
+ if test -n "$kde32ornewer"; then
+ KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
+ KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
+ fi
+ if test -n "$kde33ornewer"; then
+ KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
+ AC_SUBST(MAKEKDEWIDGETS)
+ fi
+ KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
+
+ if test -n "$MEINPROC" -a "$MEINPROC" != "compiled"; then
+ kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
+ test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
+ AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
+ if test "$KDE_XSL_STYLESHEET" = "NO"; then
+ KDE_XSL_STYLESHEET=""
+ else
+ KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
+ fi
+ fi
+
+ DCOP_DEPENDENCIES='$(DCOPIDL)'
+ if test -n "$kde32ornewer"; then
+ KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
+ DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
+ AC_SUBST(KCONFIG_COMPILER)
+ AC_SUBST(KCFG_DEPENDENCIES)
+ AC_SUBST(DCOPIDLNG)
+ fi
+ AC_SUBST(DCOPIDL)
+ AC_SUBST(DCOPIDL2CPP)
+ AC_SUBST(DCOP_DEPENDENCIES)
+ AC_SUBST(MCOPIDL)
+ AC_SUBST(ARTSCCONFIG)
+ AC_SUBST(MEINPROC)
+ AC_SUBST(KDE_XSL_STYLESHEET)
+ AC_SUBST(XMLLINT)
+])dnl
+
+AC_DEFUN([AC_CREATE_KFSSTND],
+[
+AC_REQUIRE([AC_CHECK_RPATH])
+
+AC_MSG_CHECKING([for KDE paths])
+kde_result=""
+kde_cached_paths=yes
+AC_CACHE_VAL(kde_cv_all_paths,
+[
+ KDE_SET_DEFAULT_PATHS($1)
+ kde_cached_paths=no
+])
+eval "$kde_cv_all_paths"
+KDE_CHECK_PATHS_FOR_COMPLETENESS
+if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
+ # wrong values were cached, may be, we can set better ones
+ kde_result=
+ kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
+ kde_datadir= kde_locale= kde_cgidir= kde_confdir= kde_kcfgdir=
+ kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
+ kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
+ kde_have_all_paths=
+ kde_styledir=
+ kde_widgetdir=
+ xdg_appsdir = xdg_menudir= xdg_directorydir=
+ KDE_SET_DEFAULT_PATHS($1)
+ eval "$kde_cv_all_paths"
+ KDE_CHECK_PATHS_FOR_COMPLETENESS
+ kde_result="$kde_result (cache overridden)"
+fi
+if test "$kde_have_all_paths" = "no"; then
+ AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
+Since it had compiled and linked before, it must be a strange problem on your system.
+Look at config.log for details. If you are not able to fix this, look at
+http://www.kde.org/faq/installation.html or any www.kde.org mirror.
+(If you're using an egcs version on Linux, you may update binutils!)
+])
+else
+ rm -f conftest*
+ AC_MSG_RESULT($kde_result)
+fi
+
+bindir=$kde_bindir
+
+KDE_SUBST_PROGRAMS
+
+])
+
+AC_DEFUN([AC_SUBST_KFSSTND],
+[
+AC_SUBST(kde_htmldir)
+AC_SUBST(kde_appsdir)
+AC_SUBST(kde_icondir)
+AC_SUBST(kde_sounddir)
+AC_SUBST(kde_datadir)
+AC_SUBST(kde_locale)
+AC_SUBST(kde_confdir)
+AC_SUBST(kde_kcfgdir)
+AC_SUBST(kde_mimedir)
+AC_SUBST(kde_wallpaperdir)
+AC_SUBST(kde_bindir)
+dnl X Desktop Group standards
+AC_SUBST(xdg_appsdir)
+AC_SUBST(xdg_menudir)
+AC_SUBST(xdg_directorydir)
+dnl for KDE 2
+AC_SUBST(kde_templatesdir)
+AC_SUBST(kde_servicesdir)
+AC_SUBST(kde_servicetypesdir)
+AC_SUBST(kde_moduledir)
+AC_SUBST(kdeinitdir, '$(kde_moduledir)')
+AC_SUBST(kde_styledir)
+AC_SUBST(kde_widgetdir)
+if test "$kde_qtver" = 1; then
+ kde_minidir="$kde_icondir/mini"
+else
+# for KDE 1 - this breaks KDE2 apps using minidir, but
+# that's the plan ;-/
+ kde_minidir="/dev/null"
+fi
+dnl AC_SUBST(kde_minidir)
+dnl AC_SUBST(kde_cgidir)
+dnl AC_SUBST(kde_toolbardir)
+])
+
+AC_DEFUN([KDE_MISC_TESTS],
+[
+ dnl Checks for libraries.
+ AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
+ AC_SUBST(LIBUTIL)
+ AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
+ AC_SUBST(LIBCOMPAT)
+ kde_have_crypt=
+ AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
+ AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
+ AC_MSG_WARN([you have no crypt in either libcrypt or libc.
+You should install libcrypt from another source or configure with PAM
+support])
+ kde_have_crypt=no
+ ]))
+ AC_SUBST(LIBCRYPT)
+ if test $kde_have_crypt = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
+ fi
+ AC_CHECK_SOCKLEN_T
+ AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ AC_CHECK_LIB(dnet_stub, dnet_ntoa,
+ [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
+ fi
+ AC_CHECK_FUNC(inet_ntoa)
+ if test $ac_cv_func_inet_ntoa = no; then
+ AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
+ fi
+ AC_CHECK_FUNC(connect)
+ if test $ac_cv_func_connect = no; then
+ AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
+ $X_EXTRA_LIBS)
+ fi
+
+ AC_CHECK_FUNC(remove)
+ if test $ac_cv_func_remove = no; then
+ AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
+ fi
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ AC_CHECK_FUNC(shmat, ,
+ AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
+
+ # more headers that need to be explicitly included on darwin
+ AC_CHECK_HEADERS(sys/types.h stdint.h)
+
+ # sys/bitypes.h is needed for uint32_t and friends on Tru64
+ AC_CHECK_HEADERS(sys/bitypes.h)
+
+ # darwin requires a poll emulation library
+ AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
+
+ # for some image handling on Mac OS X
+ AC_CHECK_HEADERS(Carbon/Carbon.h)
+
+ # CoreAudio framework
+ AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
+ AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
+ FRAMEWORK_COREAUDIO="-Wl,-framework,CoreAudio"
+ ])
+
+ AC_CHECK_RES_INIT
+ AC_SUBST(LIB_POLL)
+ AC_SUBST(FRAMEWORK_COREAUDIO)
+ LIBSOCKET="$X_EXTRA_LIBS"
+ AC_SUBST(LIBSOCKET)
+ AC_SUBST(X_EXTRA_LIBS)
+ AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
+ AC_SUBST(LIBUCB)
+
+ case $host in dnl this *is* LynxOS specific
+ *-*-lynxos* )
+ AC_MSG_CHECKING([LynxOS header file wrappers])
+ [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
+ AC_MSG_RESULT(disabled)
+ AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
+ ;;
+ esac
+
+ KDE_CHECK_TYPES
+ KDE_CHECK_LIBDL
+ KDE_CHECK_STRLCPY
+ KDE_CHECK_PIE_SUPPORT
+
+# darwin needs this to initialize the environment
+AC_CHECK_HEADERS(crt_externs.h)
+AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
+
+AH_VERBATIM(_DARWIN_ENVIRON,
+[
+#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
+# include <sys/time.h>
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
+#endif
+])
+
+AH_VERBATIM(_AIX_STRINGS_H_BZERO,
+[
+/*
+ * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
+ * that defines bzero.
+ */
+
+#if defined(_AIX)
+#include <strings.h>
+#endif
+])
+
+AC_CHECK_FUNCS([vsnprintf snprintf])
+
+AH_VERBATIM(_TRU64,[
+/*
+ * On HP-UX, the declaration of vsnprintf() is needed every time !
+ */
+
+#if !defined(HAVE_VSNPRINTF) || defined(hpux)
+#if __STDC__
+#include <stdarg.h>
+#include <stdlib.h>
+#else
+#include <varargs.h>
+#endif
+#ifdef __cplusplus
+extern "C"
+#endif
+int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
+#ifdef __cplusplus
+extern "C"
+#endif
+int snprintf(char *str, size_t n, char const *fmt, ...);
+#endif
+])
+
+])
+
+dnl ------------------------------------------------------------------------
+dnl Find the header files and libraries for X-Windows. Extended the
+dnl macro AC_PATH_X
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([K_PATH_X],
+[
+AC_REQUIRE([KDE_MISC_TESTS])dnl
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+AC_ARG_ENABLE(
+ embedded,
+ AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
+ kde_use_qt_emb=$enableval,
+ kde_use_qt_emb=no
+)
+
+AC_ARG_ENABLE(
+ qtopia,
+ AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
+ kde_use_qt_emb_palm=$enableval,
+ kde_use_qt_emb_palm=no
+)
+
+AC_ARG_ENABLE(
+ mac,
+ AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
+ kde_use_qt_mac=$enableval,
+ kde_use_qt_mac=no
+)
+
+# used to disable x11-specific stuff on special platforms
+AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
+
+if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
+
+AC_MSG_CHECKING(for X)
+
+AC_CACHE_VAL(kde_cv_have_x,
+[# One or both of the vars are not set, and there is no cached value.
+if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
+ kde_x_includes=NO
+else
+ kde_x_includes=$x_includes
+fi
+if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
+ kde_x_libraries=NO
+else
+ kde_x_libraries=$x_libraries
+fi
+
+# below we use the standard autoconf calls
+ac_x_libraries=$kde_x_libraries
+ac_x_includes=$kde_x_includes
+
+KDE_PATH_X_DIRECT
+dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
+dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
+dnl location. The correct location is /usr/lib32 or an undefined value
+dnl (the linker is smart enough to pick the correct default library).
+dnl Things work just fine if you use just AC_PATH_X_DIRECT.
+dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
+dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
+dnl x_includes should be left alone.
+case "$host" in
+mips-sgi-irix6*)
+ ;;
+*-*-solaris*)
+ ;;
+*)
+ _AC_PATH_X_XMKMF
+ if test -z "$ac_x_includes"; then
+ ac_x_includes="."
+ fi
+ if test -z "$ac_x_libraries"; then
+ ac_x_libraries="/usr/lib${kdelibsuff}"
+ fi
+esac
+#from now on we use our own again
+
+# when the user already gave --x-includes, we ignore
+# what the standard autoconf macros told us.
+if test "$kde_x_includes" = NO; then
+ kde_x_includes=$ac_x_includes
+fi
+
+# for --x-libraries too
+if test "$kde_x_libraries" = NO; then
+ kde_x_libraries=$ac_x_libraries
+fi
+
+if test "$kde_x_includes" = NO; then
+ AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
+fi
+
+if test "$kde_x_libraries" = NO; then
+ AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
+fi
+
+# Record where we found X for the cache.
+kde_cv_have_x="have_x=yes \
+ kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
+])dnl
+
+eval "$kde_cv_have_x"
+
+if test "$have_x" != yes; then
+ AC_MSG_RESULT($have_x)
+ no_x=yes
+else
+ AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
+fi
+
+if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
+ X_INCLUDES=""
+ x_includes="."; dnl better than nothing :-
+ else
+ x_includes=$kde_x_includes
+ X_INCLUDES="-I$x_includes"
+fi
+
+if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
+ X_LDFLAGS=""
+ x_libraries="/usr/lib"; dnl better than nothing :-
+ else
+ x_libraries=$kde_x_libraries
+ X_LDFLAGS="-L$x_libraries"
+fi
+all_includes="$X_INCLUDES"
+all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
+
+# Check for libraries that X11R6 Xt/Xaw programs need.
+ac_save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $X_LDFLAGS"
+# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+# check for ICE first), but we must link in the order -lSM -lICE or
+# we get undefined symbols. So assume we have SM if we have ICE.
+# These have to be linked with before -lX11, unlike the other
+# libraries we check for below, so use a different variable.
+# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
+AC_CHECK_LIB(ICE, IceConnectionNumber,
+ [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
+LDFLAGS="$ac_save_LDFLAGS"
+
+LIB_X11='-lX11 $(LIBSOCKET)'
+
+AC_MSG_CHECKING(for libXext)
+AC_CACHE_VAL(kde_cv_have_libXext,
+[
+kde_ldflags_safe="$LDFLAGS"
+kde_libs_safe="$LIBS"
+
+LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
+LIBS="-lXext -lX11 $LIBSOCKET"
+
+AC_TRY_LINK([
+#include <stdio.h>
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+],
+[
+printf("hello Xext\n");
+],
+kde_cv_have_libXext=yes,
+kde_cv_have_libXext=no
+)
+
+LDFLAGS=$kde_ldflags_safe
+LIBS=$kde_libs_safe
+])
+
+AC_MSG_RESULT($kde_cv_have_libXext)
+
+if test "$kde_cv_have_libXext" = "no"; then
+ AC_MSG_ERROR([We need a working libXext to proceed. Since configure
+can't find it itself, we stop here assuming that make wouldn't find
+them either.])
+fi
+
+LIB_XEXT="-lXext"
+QTE_NORTTI=""
+
+elif test "$kde_use_qt_emb" = "yes"; then
+ dnl We're using QT Embedded
+ CPPFLAGS=-DQWS
+ CXXFLAGS="$CXXFLAGS -fno-rtti"
+ QTE_NORTTI="-fno-rtti -DQWS"
+ X_PRE_LIBS=""
+ LIB_X11=""
+ LIB_XEXT=""
+ LIB_XRENDER=""
+ LIBSM=""
+ X_INCLUDES=""
+ X_LDFLAGS=""
+ x_includes=""
+ x_libraries=""
+elif test "$kde_use_qt_mac" = "yes"; then
+ dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
+ dnl be included to get the information) --Sam
+ CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
+ CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
+ X_PRE_LIBS=""
+ LIB_X11=""
+ LIB_XEXT=""
+ LIB_XRENDER=""
+ LIBSM=""
+ X_INCLUDES=""
+ X_LDFLAGS=""
+ x_includes=""
+ x_libraries=""
+fi
+AC_SUBST(X_PRE_LIBS)
+AC_SUBST(LIB_X11)
+AC_SUBST(LIB_XRENDER)
+AC_SUBST(LIBSM)
+AC_SUBST(X_INCLUDES)
+AC_SUBST(X_LDFLAGS)
+AC_SUBST(x_includes)
+AC_SUBST(x_libraries)
+AC_SUBST(QTE_NORTTI)
+AC_SUBST(LIB_XEXT)
+
+])
+
+AC_DEFUN([KDE_PRINT_QT_PROGRAM],
+[
+AC_REQUIRE([KDE_USE_QT])
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <qglobal.h>
+#include <qapplication.h>
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qevent.h>
+#include <qstring.h>
+#include <qstyle.h>
+EOF
+
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+#if QT_VERSION < 210
+#error 1
+#endif
+EOF
+fi
+fi
+
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qcursor.h>
+#include <qstylefactory.h>
+#include <private/qucomextra_p.h>
+EOF
+fi
+
+echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
+cat >> conftest.$ac_ext <<EOF
+#error 1
+#endif
+
+int main() {
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+ QStringList *t = new QStringList();
+ Q_UNUSED(t);
+EOF
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+ QString s;
+ s.setLatin1("Elvis is alive", 14);
+EOF
+fi
+fi
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+ (void)QStyleFactory::create(QString::null);
+ QCursor c(Qt::WhatsThisCursor);
+EOF
+fi
+cat >> conftest.$ac_ext <<EOF
+ return 0;
+}
+EOF
+])
+
+AC_DEFUN([KDE_USE_QT],
+[
+if test -z "$1"; then
+ # Current default Qt version: 3.3
+ kde_qtver=3
+ kde_qtsubver=3
+else
+ kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
+ # following is the check if subversion isnt found in passed argument
+ if test "$kde_qtsubver" = "$1"; then
+ kde_qtsubver=1
+ fi
+ kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
+ if test "$kde_qtver" = "1"; then
+ kde_qtsubver=42
+ fi
+fi
+
+if test -z "$2"; then
+ if test "$kde_qtver" = "2"; then
+ if test $kde_qtsubver -gt 0; then
+ kde_qt_minversion=">= Qt 2.2.2"
+ else
+ kde_qt_minversion=">= Qt 2.0.2"
+ fi
+ fi
+ if test "$kde_qtver" = "3"; then
+ if test $kde_qtsubver -gt 0; then
+ if test $kde_qtsubver -gt 1; then
+ if test $kde_qtsubver -gt 2; then
+ kde_qt_minversion=">= Qt 3.3 and < 4.0"
+ else
+ kde_qt_minversion=">= Qt 3.2 and < 4.0"
+ fi
+ else
+ kde_qt_minversion=">= Qt 3.1 (20021021) and < 4.0"
+ fi
+ else
+ kde_qt_minversion=">= Qt 3.0 and < 4.0"
+ fi
+ fi
+ if test "$kde_qtver" = "1"; then
+ kde_qt_minversion=">= 1.42 and < 2.0"
+ fi
+else
+ kde_qt_minversion="$2"
+fi
+
+if test -z "$3"; then
+ if test $kde_qtver = 3; then
+ if test $kde_qtsubver -gt 0; then
+ kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
+ qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
+ kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
+ else
+ kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
+ fi
+ fi
+ if test $kde_qtver = 2; then
+ if test $kde_qtsubver -gt 0; then
+ kde_qt_verstring="QT_VERSION >= 222"
+ else
+ kde_qt_verstring="QT_VERSION >= 200"
+ fi
+ fi
+ if test $kde_qtver = 1; then
+ kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+ fi
+else
+ kde_qt_verstring="$3"
+fi
+
+if test $kde_qtver = 4; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt4 /usr/lib/qt /usr/share/qt4"
+fi
+if test $kde_qtver = 3; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
+fi
+if test $kde_qtver = 2; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
+fi
+if test $kde_qtver = 1; then
+ kde_qt_dirs="$QTDIR /usr/lib/qt"
+fi
+])
+
+AC_DEFUN([KDE_CHECK_QT_DIRECT],
+[
+AC_REQUIRE([KDE_USE_QT])
+AC_MSG_CHECKING([if Qt compiles without flags])
+AC_CACHE_VAL(kde_cv_qt_direct,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
+ac_LIBRARY_PATH="$LIBRARY_PATH"
+ac_cxxflags_safe="$CXXFLAGS"
+ac_ldflags_safe="$LDFLAGS"
+ac_libs_safe="$LIBS"
+
+CXXFLAGS="$CXXFLAGS -I$qt_includes"
+LDFLAGS="$LDFLAGS $X_LDFLAGS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
+else
+LIBS="$LIBQT $LIBSOCKET"
+fi
+LD_LIBRARY_PATH=
+export LD_LIBRARY_PATH
+LIBRARY_PATH=
+export LIBRARY_PATH
+
+KDE_PRINT_QT_PROGRAM
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ kde_cv_qt_direct="yes"
+else
+ kde_cv_qt_direct="no"
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+fi
+
+rm -f conftest*
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
+export LD_LIBRARY_PATH
+LIBRARY_PATH="$ac_LIBRARY_PATH"
+export LIBRARY_PATH
+AC_LANG_RESTORE
+])
+
+if test "$kde_cv_qt_direct" = "yes"; then
+ AC_MSG_RESULT(yes)
+ $1
+else
+ AC_MSG_RESULT(no)
+ $2
+fi
+])
+
+dnl ------------------------------------------------------------------------
+dnl Try to find the Qt headers and libraries.
+dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
+dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_PATH_QT_1_3],
+[
+AC_REQUIRE([K_PATH_X])
+AC_REQUIRE([KDE_USE_QT])
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+dnl ------------------------------------------------------------------------
+dnl Add configure flag to enable linking to MT version of Qt library.
+dnl ------------------------------------------------------------------------
+
+AC_ARG_ENABLE(
+ mt,
+ AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
+ kde_use_qt_mt=$enableval,
+ [
+ if test $kde_qtver = 3; then
+ kde_use_qt_mt=yes
+ else
+ kde_use_qt_mt=no
+ fi
+ ]
+)
+
+USING_QT_MT=""
+
+dnl ------------------------------------------------------------------------
+dnl If we not get --disable-qt-mt then adjust some vars for the host.
+dnl ------------------------------------------------------------------------
+
+KDE_MT_LDFLAGS=
+KDE_MT_LIBS=
+if test "x$kde_use_qt_mt" = "xyes"; then
+ KDE_CHECK_THREADING
+ if test "x$kde_use_threading" = "xyes"; then
+ CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
+ KDE_MT_LDFLAGS="$USE_THREADS"
+ KDE_MT_LIBS="$LIBPTHREAD"
+ else
+ kde_use_qt_mt=no
+ fi
+fi
+AC_SUBST(KDE_MT_LDFLAGS)
+AC_SUBST(KDE_MT_LIBS)
+
+kde_qt_was_given=yes
+
+dnl ------------------------------------------------------------------------
+dnl If we haven't been told how to link to Qt, we work it out for ourselves.
+dnl ------------------------------------------------------------------------
+if test -z "$LIBQT_GLOB"; then
+ if test "x$kde_use_qt_emb" = "xyes"; then
+ LIBQT_GLOB="libqte.*"
+ else
+ LIBQT_GLOB="libqt.*"
+ fi
+fi
+
+dnl ------------------------------------------------------------
+dnl If we got --enable-embedded then adjust the Qt library name.
+dnl ------------------------------------------------------------
+if test "x$kde_use_qt_emb" = "xyes"; then
+ qtlib="qte"
+else
+ qtlib="qt"
+fi
+
+kde_int_qt="-l$qtlib"
+
+if test -z "$LIBQPE"; then
+dnl ------------------------------------------------------------
+dnl If we got --enable-palmtop then add -lqpe to the link line
+dnl ------------------------------------------------------------
+ if test "x$kde_use_qt_emb" = "xyes"; then
+ if test "x$kde_use_qt_emb_palm" = "xyes"; then
+ LIB_QPE="-lqpe"
+ else
+ LIB_QPE=""
+ fi
+ else
+ LIB_QPE=""
+ fi
+fi
+
+dnl ------------------------------------------------------------------------
+dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
+dnl ------------------------------------------------------------------------
+
+if test "x$kde_use_qt_mt" = "xyes"; then
+ LIBQT="-l$qtlib-mt"
+ kde_int_qt="-l$qtlib-mt"
+ LIBQT_GLOB="lib$qtlib-mt.*"
+ USING_QT_MT="using -mt"
+else
+ LIBQT="-l$qtlib"
+fi
+
+if test $kde_qtver != 1; then
+
+ AC_REQUIRE([AC_FIND_PNG])
+ AC_REQUIRE([AC_FIND_JPEG])
+ LIBQT="$LIBQT $LIBPNG $LIBJPEG"
+fi
+
+if test $kde_qtver = 3; then
+ AC_REQUIRE([KDE_CHECK_LIBDL])
+ LIBQT="$LIBQT $LIBDL"
+fi
+
+AC_MSG_CHECKING([for Qt])
+
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
+fi
+ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
+qt_libraries=""
+qt_includes=""
+AC_ARG_WITH(qt-dir,
+ AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
+ [ ac_qt_includes="$withval"/include
+ ac_qt_libraries="$withval"/lib${kdelibsuff}
+ ac_qt_bindir="$withval"/bin
+ ])
+
+AC_ARG_WITH(qt-includes,
+ AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
+ [
+ ac_qt_includes="$withval"
+ ])
+
+kde_qt_libs_given=no
+
+AC_ARG_WITH(qt-libraries,
+ AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
+ [ ac_qt_libraries="$withval"
+ kde_qt_libs_given=yes
+ ])
+
+AC_CACHE_VAL(ac_cv_have_qt,
+[#try to guess Qt locations
+
+qt_incdirs=""
+for dir in $kde_qt_dirs; do
+ qt_incdirs="$qt_incdirs $dir/include $dir"
+done
+qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes"
+if test ! "$ac_qt_includes" = "NO"; then
+ qt_incdirs="$ac_qt_includes $qt_incdirs"
+fi
+
+if test "$kde_qtver" != "1"; then
+ kde_qt_header=qstyle.h
+else
+ kde_qt_header=qglobal.h
+fi
+
+AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
+ac_qt_includes="$qt_incdir"
+
+qt_libdirs=""
+for dir in $kde_qt_dirs; do
+ qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
+done
+qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
+if test ! "$ac_qt_libraries" = "NO"; then
+ qt_libdir=$ac_qt_libraries
+else
+ qt_libdirs="$ac_qt_libraries $qt_libdirs"
+ # if the Qt was given, the chance is too big that libqt.* doesn't exist
+ qt_libdir=NONE
+ for dir in $qt_libdirs; do
+ try="ls -1 $dir/${LIBQT_GLOB}"
+ if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
+ done
+fi
+for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
+ if test -e "$a"; then
+ LIBQT="$LIBQT ${kde_int_qt}_incremental"
+ break
+ fi
+done
+
+ac_qt_libraries="$qt_libdir"
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+ac_cxxflags_safe="$CXXFLAGS"
+ac_ldflags_safe="$LDFLAGS"
+ac_libs_safe="$LIBS"
+
+CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
+LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
+
+KDE_PRINT_QT_PROGRAM
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ rm -f conftest*
+else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+ ac_qt_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+AC_LANG_RESTORE
+if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+ ac_cv_have_qt="have_qt=no"
+ ac_qt_notfound=""
+ missing_qt_mt=""
+ if test "$ac_qt_includes" = NO; then
+ if test "$ac_qt_libraries" = NO; then
+ ac_qt_notfound="(headers and libraries)";
+ else
+ ac_qt_notfound="(headers)";
+ fi
+ else
+ if test "x$kde_use_qt_mt" = "xyes"; then
+ missing_qt_mt="
+Make sure that you have compiled Qt with thread support!"
+ ac_qt_notfound="(library $qtlib-mt)";
+ else
+ ac_qt_notfound="(library $qtlib)";
+ fi
+ fi
+
+ AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
+For more details about this problem, look at the end of config.log.$missing_qt_mt])
+else
+ have_qt="yes"
+fi
+])
+
+eval "$ac_cv_have_qt"
+
+if test "$have_qt" != yes; then
+ AC_MSG_RESULT([$have_qt]);
+else
+ ac_cv_have_qt="have_qt=yes \
+ ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
+ AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
+
+ qt_libraries="$ac_qt_libraries"
+ qt_includes="$ac_qt_includes"
+fi
+
+if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
+ KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
+fi
+
+AC_SUBST(qt_libraries)
+AC_SUBST(qt_includes)
+
+if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
+ QT_INCLUDES=""
+else
+ QT_INCLUDES="-I$qt_includes"
+ all_includes="$QT_INCLUDES $all_includes"
+fi
+
+if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
+ QT_LDFLAGS=""
+else
+ QT_LDFLAGS="-L$qt_libraries"
+ all_libraries="$QT_LDFLAGS $all_libraries"
+fi
+test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
+
+AC_SUBST(QT_INCLUDES)
+AC_SUBST(QT_LDFLAGS)
+AC_PATH_QT_MOC_UIC
+
+KDE_CHECK_QT_JPEG
+
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
+else
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
+fi
+test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
+for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
+ if test -e "$a"; then
+ LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
+ break
+ fi
+done
+
+AC_SUBST(LIB_QT)
+AC_SUBST(LIB_QPE)
+
+AC_SUBST(kde_qtver)
+])
+
+AC_DEFUN([AC_PATH_QT],
+[
+AC_PATH_QT_1_3
+])
+
+AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
+[
+AC_REQUIRE([AC_PATH_QT_MOC_UIC])
+
+if test x$ac_uic_supports_libpath = xyes; then
+
+AC_MSG_CHECKING([if UIC has KDE plugins available])
+AC_CACHE_VAL(kde_cv_uic_plugins,
+[
+cat > actest.ui << EOF
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>NewConnectionDialog</class>
+<widget class="QDialog">
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>testInput</cstring>
+ </property>
+ </widget>
+</widget>
+</UI>
+EOF
+
+
+
+kde_cv_uic_plugins=no
+kde_line="$UIC_PATH -L $kde_widgetdir"
+if test x$ac_uic_supports_nounload = xyes; then
+ kde_line="$kde_line -nounload"
+fi
+kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
+if AC_TRY_EVAL(kde_line); then
+ # if you're trying to debug this check and think it's incorrect,
+ # better check your installation. The check _is_ correct - your
+ # installation is not.
+ if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
+ kde_cv_uic_plugins=yes
+ fi
+fi
+rm -f actest.ui actest.cpp
+])
+
+AC_MSG_RESULT([$kde_cv_uic_plugins])
+if test "$kde_cv_uic_plugins" != yes; then
+ AC_MSG_ERROR([
+you need to install kdelibs first.
+
+If you did install kdelibs, then the Qt version that is picked up by
+this configure is not the same version you used to compile kdelibs.
+The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the
+_same Qt version_, compiled with the _same compiler_ and the same Qt
+configuration settings.
+])
+fi
+fi
+])
+
+AC_DEFUN([KDE_CHECK_FINAL],
+[
+ AC_ARG_ENABLE(final,
+ AC_HELP_STRING([--enable-final],
+ [build size optimized apps (experimental - needs lots of memory)]),
+ kde_use_final=$enableval, kde_use_final=no)
+
+ if test "x$kde_use_final" = "xyes"; then
+ KDE_USE_FINAL_TRUE=""
+ KDE_USE_FINAL_FALSE="#"
+ else
+ KDE_USE_FINAL_TRUE="#"
+ KDE_USE_FINAL_FALSE=""
+ fi
+ AC_SUBST(KDE_USE_FINAL_TRUE)
+ AC_SUBST(KDE_USE_FINAL_FALSE)
+])
+
+AC_DEFUN([KDE_CHECK_CLOSURE],
+[
+ AC_ARG_ENABLE(closure,
+ AC_HELP_STRING([--enable-closure],[delay template instantiation]),
+ kde_use_closure=$enableval, kde_use_closure=no)
+
+ KDE_NO_UNDEFINED=""
+ if test "x$kde_use_closure" = "xyes"; then
+ KDE_USE_CLOSURE_TRUE=""
+ KDE_USE_CLOSURE_FALSE="#"
+# CXXFLAGS="$CXXFLAGS $REPO"
+ else
+ KDE_USE_CLOSURE_TRUE="#"
+ KDE_USE_CLOSURE_FALSE=""
+ KDE_NO_UNDEFINED=""
+ case $host in
+ *-*-linux-gnu)
+ KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
+ [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
+ [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
+ [KDE_NO_UNDEFINED=""])],
+ [KDE_NO_UNDEFINED=""])
+ ;;
+ esac
+ fi
+ AC_SUBST(KDE_USE_CLOSURE_TRUE)
+ AC_SUBST(KDE_USE_CLOSURE_FALSE)
+ AC_SUBST(KDE_NO_UNDEFINED)
+])
+
+dnl Check if the linker supports --enable-new-dtags and --as-needed
+AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
+[
+ AC_ARG_ENABLE(new_ldflags,
+ AC_HELP_STRING([--enable-new-ldflags],
+ [enable the new linker flags]),
+ kde_use_new_ldflags=$enableval,
+ kde_use_new_ldflags=no)
+
+ LDFLAGS_AS_NEEDED=""
+ LDFLAGS_NEW_DTAGS=""
+ if test "x$kde_use_new_ldflags" = "xyes"; then
+ LDFLAGS_NEW_DTAGS=""
+ KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
+ [LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
+
+ KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
+ [LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
+ fi
+ AC_SUBST(LDFLAGS_AS_NEEDED)
+ AC_SUBST(LDFLAGS_NEW_DTAGS)
+])
+
+AC_DEFUN([KDE_CHECK_NMCHECK],
+[
+ AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
+ kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
+
+ if test "$kde_use_nmcheck" = "yes"; then
+ KDE_USE_NMCHECK_TRUE=""
+ KDE_USE_NMCHECK_FALSE="#"
+ else
+ KDE_USE_NMCHECK_TRUE="#"
+ KDE_USE_NMCHECK_FALSE=""
+ fi
+ AC_SUBST(KDE_USE_NMCHECK_TRUE)
+ AC_SUBST(KDE_USE_NMCHECK_FALSE)
+])
+
+AC_DEFUN([KDE_EXPAND_MAKEVAR], [
+savex=$exec_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+tmp=$$2
+while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
+exec_prefix=$savex
+])
+
+dnl ------------------------------------------------------------------------
+dnl Now, the same with KDE
+dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
+dnl and $(kde_includes) will be the kdehdrlocation (if needed)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_BASE_PATH_KDE],
+[
+AC_REQUIRE([KDE_CHECK_STL])
+AC_REQUIRE([AC_PATH_QT])dnl
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+AC_CHECK_RPATH
+AC_MSG_CHECKING([for KDE])
+
+if test "${prefix}" != NONE; then
+ kde_includes=${includedir}
+ KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
+
+ kde_libraries=${libdir}
+ KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
+
+else
+ ac_kde_includes=
+ ac_kde_libraries=
+ kde_libraries=""
+ kde_includes=""
+fi
+
+AC_CACHE_VAL(ac_cv_have_kde,
+[#try to guess kde locations
+
+if test "$kde_qtver" = 1; then
+ kde_check_header="ksock.h"
+ kde_check_lib="libkdecore.la"
+else
+ kde_check_header="ksharedptr.h"
+ kde_check_lib="libkio.la"
+fi
+
+if test -z "$1"; then
+
+kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
+test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
+kde_incdirs="$ac_kde_includes $kde_incdirs"
+AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
+ac_kde_includes="$kde_incdir"
+
+if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
+ AC_MSG_ERROR([
+in the prefix, you've chosen, are no KDE headers installed. This will fail.
+So, check this please and use another prefix!])
+fi
+
+kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
+test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
+kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
+AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
+ac_kde_libraries="$kde_libdir"
+
+kde_widgetdir=NO
+dnl this might be somewhere else
+AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
+
+if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
+AC_MSG_ERROR([
+in the prefix, you've chosen, are no KDE libraries installed. This will fail.
+So, check this please and use another prefix!])
+fi
+
+if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
+AC_MSG_ERROR([
+I can't find the designer plugins. These are required and should have been installed
+by kdelibs])
+fi
+
+if test -n "$kde_widgetdir"; then
+ kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
+fi
+
+
+if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
+ ac_cv_have_kde="have_kde=no"
+else
+ ac_cv_have_kde="have_kde=yes \
+ ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
+fi
+
+else dnl test -z $1, e.g. from kdelibs
+
+ ac_cv_have_kde="have_kde=no"
+
+fi
+])dnl
+
+eval "$ac_cv_have_kde"
+
+if test "$have_kde" != "yes"; then
+ if test "${prefix}" = NONE; then
+ ac_kde_prefix="$ac_default_prefix"
+ else
+ ac_kde_prefix="$prefix"
+ fi
+ if test "$exec_prefix" = NONE; then
+ ac_kde_exec_prefix="$ac_kde_prefix"
+ AC_MSG_RESULT([will be installed in $ac_kde_prefix])
+ else
+ ac_kde_exec_prefix="$exec_prefix"
+ AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
+ fi
+
+ kde_libraries="${libdir}"
+ kde_includes="${includedir}"
+
+else
+ ac_cv_have_kde="have_kde=yes \
+ ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
+ AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
+
+ kde_libraries="$ac_kde_libraries"
+ kde_includes="$ac_kde_includes"
+fi
+AC_SUBST(kde_libraries)
+AC_SUBST(kde_includes)
+
+if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
+ KDE_INCLUDES=""
+else
+ KDE_INCLUDES="-I$kde_includes"
+ all_includes="$KDE_INCLUDES $all_includes"
+fi
+
+KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
+
+KDE_LDFLAGS="-L$kde_libraries"
+if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
+ all_libraries="$KDE_LDFLAGS $all_libraries"
+fi
+
+AC_SUBST(KDE_LDFLAGS)
+AC_SUBST(KDE_INCLUDES)
+
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+all_libraries="$all_libraries $USER_LDFLAGS"
+all_includes="$all_includes $USER_INCLUDES"
+AC_SUBST(all_includes)
+AC_SUBST(all_libraries)
+
+if test -z "$1"; then
+KDE_CHECK_UIC_PLUGINS
+fi
+
+ac_kde_libraries="$kde_libdir"
+
+AC_SUBST(AUTODIRS)
+
+
+])
+
+AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
+[
+AC_MSG_CHECKING(for extra includes)
+AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
+ kde_use_extra_includes="$withval",
+ kde_use_extra_includes=NONE
+)
+kde_extra_includes=
+if test -n "$kde_use_extra_includes" && \
+ test "$kde_use_extra_includes" != "NONE"; then
+
+ ac_save_ifs=$IFS
+ IFS=':'
+ for dir in $kde_use_extra_includes; do
+ kde_extra_includes="$kde_extra_includes $dir"
+ USER_INCLUDES="$USER_INCLUDES -I$dir"
+ done
+ IFS=$ac_save_ifs
+ kde_use_extra_includes="added"
+else
+ kde_use_extra_includes="no"
+fi
+AC_SUBST(USER_INCLUDES)
+
+AC_MSG_RESULT($kde_use_extra_includes)
+
+kde_extra_libs=
+AC_MSG_CHECKING(for extra libs)
+AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
+ kde_use_extra_libs=$withval,
+ kde_use_extra_libs=NONE
+)
+if test -n "$kde_use_extra_libs" && \
+ test "$kde_use_extra_libs" != "NONE"; then
+
+ ac_save_ifs=$IFS
+ IFS=':'
+ for dir in $kde_use_extra_libs; do
+ kde_extra_libs="$kde_extra_libs $dir"
+ KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
+ USER_LDFLAGS="$USER_LDFLAGS -L$dir"
+ done
+ IFS=$ac_save_ifs
+ kde_use_extra_libs="added"
+else
+ kde_use_extra_libs="no"
+fi
+
+AC_SUBST(USER_LDFLAGS)
+
+AC_MSG_RESULT($kde_use_extra_libs)
+
+])
+
+AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
+[
+ AC_MSG_CHECKING([for KDE headers installed])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+cat > conftest.$ac_ext <<EOF
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+#include <stdio.h>
+#include "confdefs.h"
+#include <kapp.h>
+
+int main() {
+ printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
+ printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
+ printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
+ printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
+ printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
+ printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
+ printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
+ printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
+ printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
+ printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
+ printf("kde_wallpaperdir=\\"%s\\"\n",
+ KApplication::kde_wallpaperdir().data());
+ printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
+ printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
+ printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
+ printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
+ printf("kde_moduledir=\\"/tmp/dummy\\"\n");
+ printf("kde_styledir=\\"/tmp/dummy\\"\n");
+ printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
+ printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
+ printf("xdg_menudir=\\"/tmp/dummy\\"\n");
+ printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
+ printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
+ return 0;
+ }
+EOF
+
+ ac_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$all_includes $CPPFLAGS"
+ if AC_TRY_EVAL(ac_compile); then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_ERROR([your system is not able to compile a small KDE application!
+Check, if you installed the KDE header files correctly.
+For more details about this problem, look at the end of config.log.])
+ fi
+ CPPFLAGS=$ac_save_CPPFLAGS
+
+ AC_LANG_RESTORE
+])
+
+AC_DEFUN([KDE_CHECK_KDEQTADDON],
+[
+AC_MSG_CHECKING(for kde-qt-addon)
+AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
+[
+ kde_ldflags_safe="$LDFLAGS"
+ kde_libs_safe="$LIBS"
+ kde_cxxflags_safe="$CXXFLAGS"
+
+ LIBS="-lkde-qt-addon $LIBQT $LIBS"
+ CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
+ LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
+
+ AC_TRY_LINK([
+ #include <qdom.h>
+ ],
+ [
+ QDomDocument doc;
+ ],
+ kde_cv_have_kdeqtaddon=yes,
+ kde_cv_have_kdeqtaddon=no
+ )
+
+ LDFLAGS=$kde_ldflags_safe
+ LIBS=$kde_libs_safe
+ CXXFLAGS=$kde_cxxflags_safe
+])
+
+AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
+
+if test "$kde_cv_have_kdeqtaddon" = "no"; then
+ AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
+It is a separate package (and CVS module) named kde-qt-addon.])
+fi
+])
+
+AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
+[
+ AC_REQUIRE([KDE_MISC_TESTS])
+ AC_REQUIRE([KDE_CHECK_LIBDL])
+ AC_REQUIRE([K_PATH_X])
+
+if test $kde_qtver = 3; then
+ case $host in
+ *cygwin*) lib_kded="-lkdeinit_kded" ;;
+ *) lib_kded="" ;;
+ esac
+ AC_SUBST(LIB_KDED, $lib_kded)
+ AC_SUBST(LIB_KDECORE, "-lkdecore")
+ AC_SUBST(LIB_KDEUI, "-lkdeui")
+ AC_SUBST(LIB_KIO, "-lkio")
+ AC_SUBST(LIB_KJS, "-lkjs")
+ AC_SUBST(LIB_SMB, "-lsmb")
+ AC_SUBST(LIB_KAB, "-lkab")
+ AC_SUBST(LIB_KABC, "-lkabc")
+ AC_SUBST(LIB_KHTML, "-lkhtml")
+ AC_SUBST(LIB_KSPELL, "-lkspell")
+ AC_SUBST(LIB_KPARTS, "-lkparts")
+ AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
+ AC_SUBST(LIB_KUTILS, "-lkutils")
+ AC_SUBST(LIB_KDEPIM, "-lkdepim")
+ AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
+ AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
+ AC_SUBST(LIB_KDNSSD, "-lkdnssd")
+ AC_SUBST(LIB_KUNITTEST, "-lkunittest")
+# these are for backward compatibility
+ AC_SUBST(LIB_KSYCOCA, "-lkio")
+ AC_SUBST(LIB_KFILE, "-lkio")
+elif test $kde_qtver = 2; then
+ AC_SUBST(LIB_KDECORE, "-lkdecore")
+ AC_SUBST(LIB_KDEUI, "-lkdeui")
+ AC_SUBST(LIB_KIO, "-lkio")
+ AC_SUBST(LIB_KSYCOCA, "-lksycoca")
+ AC_SUBST(LIB_SMB, "-lsmb")
+ AC_SUBST(LIB_KFILE, "-lkfile")
+ AC_SUBST(LIB_KAB, "-lkab")
+ AC_SUBST(LIB_KHTML, "-lkhtml")
+ AC_SUBST(LIB_KSPELL, "-lkspell")
+ AC_SUBST(LIB_KPARTS, "-lkparts")
+ AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
+else
+ AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
+ AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
+ AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
+ AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
+ AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
+fi
+])
+
+AC_DEFUN([AC_PATH_KDE],
+[
+ AC_BASE_PATH_KDE
+ AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
+ [
+ if test "$enableval" = "no";
+ then ac_use_path_checking="default"
+ else ac_use_path_checking=""
+ fi
+ ],
+ [
+ if test "$kde_qtver" = 1;
+ then ac_use_path_checking=""
+ else ac_use_path_checking="default"
+ fi
+ ]
+ )
+
+ AC_CREATE_KFSSTND($ac_use_path_checking)
+
+ AC_SUBST_KFSSTND
+ KDE_CREATE_LIBS_ALIASES
+])
+
+dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
+AC_DEFUN([KDE_CHECK_FUNC_EXT],
+[
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL(kde_cv_func_$1,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+save_CXXFLAGS="$CXXFLAGS"
+kde_safe_LIBS="$LIBS"
+LIBS="$LIBS $X_EXTRA_LIBS"
+if test "$GXX" = "yes"; then
+CXXFLAGS="$CXXFLAGS -pedantic-errors"
+fi
+AC_TRY_COMPILE([
+$2
+],
+[
+$3
+],
+kde_cv_func_$1=yes,
+kde_cv_func_$1=no)
+CXXFLAGS="$save_CXXFLAGS"
+LIBS="$kde_safe_LIBS"
+AC_LANG_RESTORE
+])
+
+AC_MSG_RESULT($kde_cv_func_$1)
+
+AC_MSG_CHECKING([if $1 needs custom prototype])
+AC_CACHE_VAL(kde_cv_proto_$1,
+[
+if test "x$kde_cv_func_$1" = xyes; then
+ kde_cv_proto_$1=no
+else
+ case "$1" in
+ setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
+ kde_cv_proto_$1="yes - in libkdefakes"
+ ;;
+ *)
+ kde_cv_proto_$1=unknown
+ ;;
+ esac
+fi
+
+if test "x$kde_cv_proto_$1" = xunknown; then
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ kde_safe_libs=$LIBS
+ LIBS="$LIBS $X_EXTRA_LIBS"
+ AC_TRY_LINK([
+$2
+
+extern "C" $4;
+],
+[
+$3
+],
+[ kde_cv_func_$1=yes
+ kde_cv_proto_$1=yes ],
+ [kde_cv_proto_$1="$1 unavailable"]
+)
+LIBS=$kde_safe_libs
+AC_LANG_RESTORE
+fi
+])
+AC_MSG_RESULT($kde_cv_proto_$1)
+
+if test "x$kde_cv_func_$1" = xyes; then
+ AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
+ $6
+fi
+if test "x$kde_cv_proto_$1" = xno; then
+ AC_DEFINE(HAVE_$5_PROTO, 1,
+ [Define if you have the $1 prototype])
+fi
+
+AH_VERBATIM([_HAVE_$5_PROTO],
+[
+#if !defined(HAVE_$5_PROTO)
+#ifdef __cplusplus
+extern "C" {
+#endif
+$4;
+#ifdef __cplusplus
+}
+#endif
+#endif
+])
+])
+
+AC_DEFUN([AC_CHECK_SETENV],
+[
+ KDE_CHECK_FUNC_EXT(setenv, [
+#include <stdlib.h>
+],
+ [setenv("VAR", "VALUE", 1);],
+ [int setenv (const char *, const char *, int)],
+ [SETENV])
+])
+
+AC_DEFUN([AC_CHECK_UNSETENV],
+[
+ KDE_CHECK_FUNC_EXT(unsetenv, [
+#include <stdlib.h>
+],
+ [unsetenv("VAR");],
+ [void unsetenv (const char *)],
+ [UNSETENV])
+])
+
+AC_DEFUN([AC_CHECK_GETDOMAINNAME],
+[
+ KDE_CHECK_FUNC_EXT(getdomainname, [
+#include <stdlib.h>
+#include <unistd.h>
+#include <netdb.h>
+],
+ [
+char buffer[200];
+getdomainname(buffer, 200);
+],
+ [#include <sys/types.h>
+ int getdomainname (char *, size_t)],
+ [GETDOMAINNAME])
+])
+
+AC_DEFUN([AC_CHECK_GETHOSTNAME],
+[
+ KDE_CHECK_FUNC_EXT(gethostname, [
+#include <stdlib.h>
+#include <unistd.h>
+],
+ [
+char buffer[200];
+gethostname(buffer, 200);
+],
+ [int gethostname (char *, unsigned int)],
+ [GETHOSTNAME])
+])
+
+AC_DEFUN([AC_CHECK_USLEEP],
+[
+ KDE_CHECK_FUNC_EXT(usleep, [
+#include <unistd.h>
+],
+ [
+usleep(200);
+],
+ [int usleep (unsigned int)],
+ [USLEEP])
+])
+
+
+AC_DEFUN([AC_CHECK_RANDOM],
+[
+ KDE_CHECK_FUNC_EXT(random, [
+#include <stdlib.h>
+],
+ [
+random();
+],
+ [long int random(void)],
+ [RANDOM])
+
+ KDE_CHECK_FUNC_EXT(srandom, [
+#include <stdlib.h>
+],
+ [
+srandom(27);
+],
+ [void srandom(unsigned int)],
+ [SRANDOM])
+
+])
+
+AC_DEFUN([AC_CHECK_INITGROUPS],
+[
+ KDE_CHECK_FUNC_EXT(initgroups, [
+#include <sys/types.h>
+#include <unistd.h>
+#include <grp.h>
+],
+ [
+char buffer[200];
+initgroups(buffer, 27);
+],
+ [int initgroups(const char *, gid_t)],
+ [INITGROUPS])
+])
+
+AC_DEFUN([AC_CHECK_MKSTEMPS],
+[
+ KDE_CHECK_FUNC_EXT(mkstemps, [
+#include <stdlib.h>
+#include <unistd.h>
+],
+ [
+mkstemps("/tmp/aaaXXXXXX", 6);
+],
+ [int mkstemps(char *, int)],
+ [MKSTEMPS])
+])
+
+AC_DEFUN([AC_CHECK_MKSTEMP],
+[
+ KDE_CHECK_FUNC_EXT(mkstemp, [
+#include <stdlib.h>
+#include <unistd.h>
+],
+ [
+mkstemp("/tmp/aaaXXXXXX");
+],
+ [int mkstemp(char *)],
+ [MKSTEMP])
+])
+
+AC_DEFUN([AC_CHECK_MKDTEMP],
+[
+ KDE_CHECK_FUNC_EXT(mkdtemp, [
+#include <stdlib.h>
+#include <unistd.h>
+],
+ [
+mkdtemp("/tmp/aaaXXXXXX");
+],
+ [char *mkdtemp(char *)],
+ [MKDTEMP])
+])
+
+
+AC_DEFUN([AC_CHECK_RES_INIT],
+[
+ AC_MSG_CHECKING([if res_init needs -lresolv])
+ kde_libs_safe="$LIBS"
+ LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
+ AC_TRY_LINK(
+ [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+ ],
+ [
+ res_init();
+ ],
+ [
+ LIBRESOLV="-lresolv"
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
+ ],
+ [ AC_MSG_RESULT(no) ]
+ )
+ LIBS=$kde_libs_safe
+ AC_SUBST(LIBRESOLV)
+
+ KDE_CHECK_FUNC_EXT(res_init,
+ [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+ ],
+ [res_init()],
+ [int res_init(void)],
+ [RES_INIT])
+])
+
+AC_DEFUN([AC_CHECK_STRLCPY],
+[
+ KDE_CHECK_FUNC_EXT(strlcpy, [
+#include <string.h>
+],
+[ char buf[20];
+ strlcpy(buf, "KDE function test", sizeof(buf));
+],
+ [unsigned long strlcpy(char*, const char*, unsigned long)],
+ [STRLCPY])
+])
+
+AC_DEFUN([AC_CHECK_STRLCAT],
+[
+ KDE_CHECK_FUNC_EXT(strlcat, [
+#include <string.h>
+],
+[ char buf[20];
+ buf[0]='\0';
+ strlcat(buf, "KDE function test", sizeof(buf));
+],
+ [unsigned long strlcat(char*, const char*, unsigned long)],
+ [STRLCAT])
+])
+
+AC_DEFUN([AC_CHECK_RES_QUERY],
+[
+ KDE_CHECK_FUNC_EXT(res_query, [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+#include <netdb.h>
+],
+[
+res_query(NULL, 0, 0, NULL, 0);
+],
+ [int res_query(const char *, int, int, unsigned char *, int)],
+ [RES_QUERY])
+])
+
+AC_DEFUN([AC_CHECK_DN_SKIPNAME],
+[
+ KDE_CHECK_FUNC_EXT(dn_skipname, [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+],
+[
+dn_skipname (NULL, NULL);
+],
+ [int dn_skipname (unsigned char *, unsigned char *)],
+ [DN_SKIPNAME])
+])
+
+
+AC_DEFUN([AC_FIND_GIF],
+ [AC_MSG_CHECKING([for giflib])
+AC_CACHE_VAL(ac_cv_lib_gif,
+[ac_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
+else
+LIBS="$all_libraries -lgif"
+fi
+AC_TRY_LINK(dnl
+[
+#ifdef __cplusplus
+extern "C" {
+#endif
+int GifLastError(void);
+#ifdef __cplusplus
+}
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+],
+ [return GifLastError();],
+ eval "ac_cv_lib_gif=yes",
+ eval "ac_cv_lib_gif=no")
+LIBS="$ac_save_LIBS"
+])dnl
+if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
+else
+ AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
+fi
+])
+
+AC_DEFUN([KDE_FIND_JPEG_HELPER],
+[
+AC_MSG_CHECKING([for libjpeg$2])
+AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
+[
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(
+[
+#ifdef __cplusplus
+extern "C" {
+#endif
+void jpeg_CreateDecompress();
+#ifdef __cplusplus
+}
+#endif
+],
+[jpeg_CreateDecompress();],
+ eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
+ eval "ac_cv_lib_jpeg_$1=no")
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+])
+
+if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
+ LIBJPEG="$ac_cv_lib_jpeg_$1"
+ AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
+else
+ AC_MSG_RESULT(no)
+ $3
+fi
+
+])
+
+AC_DEFUN([AC_FIND_JPEG],
+[
+dnl first look for libraries
+KDE_FIND_JPEG_HELPER(6b, 6b,
+ KDE_FIND_JPEG_HELPER(normal, [],
+ [
+ LIBJPEG=
+ ]
+ )
+)
+
+dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
+dnl requires system dependent includes loaded before it)
+jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
+AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
+test "x$jpeg_incdir" = xNO && jpeg_incdir=
+
+dnl if headers _and_ libraries are missing, this is no error, and we
+dnl continue with a warning (the user will get no jpeg support in khtml)
+dnl if only one is missing, it means a configuration error, but we still
+dnl only warn
+if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
+ AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
+else
+ if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
+ AC_MSG_WARN([
+There is an installation error in jpeg support. You seem to have only one
+of either the headers _or_ the libraries installed. You may need to either
+provide correct --with-extra-... options, or the development package of
+libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
+Disabling JPEG support.
+])
+ else
+ AC_MSG_WARN([libjpeg not found. disable JPEG support.])
+ fi
+ jpeg_incdir=
+ LIBJPEG=
+fi
+
+AC_SUBST(LIBJPEG)
+AH_VERBATIM(_AC_CHECK_JPEG,
+[/*
+ * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
+ * headers and I'm too lazy to write a configure test as long as only
+ * unixware is related
+ */
+#ifdef _UNIXWARE
+#define HAVE_BOOLEAN
+#endif
+])
+])
+
+AC_DEFUN([KDE_CHECK_QT_JPEG],
+[
+if test -n "$LIBJPEG"; then
+AC_MSG_CHECKING([if Qt needs $LIBJPEG])
+AC_CACHE_VAL(kde_cv_qt_jpeg,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
+LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
+ac_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(
+[#include <qapplication.h>],
+ [
+ int argc;
+ char** argv;
+ QApplication app(argc, argv);],
+ eval "kde_cv_qt_jpeg=no",
+ eval "kde_cv_qt_jpeg=yes")
+LIBS="$ac_save_LIBS"
+CXXFLAGS="$ac_save_CXXFLAGS"
+AC_LANG_RESTORE
+fi
+])
+
+if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
+ AC_MSG_RESULT(yes)
+ LIBJPEG_QT='$(LIBJPEG)'
+else
+ AC_MSG_RESULT(no)
+ LIBJPEG_QT=
+fi
+
+])
+
+AC_DEFUN([AC_FIND_ZLIB],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_MSG_CHECKING([for libz])
+AC_CACHE_VAL(ac_cv_lib_z,
+[
+kde_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(dnl
+[
+#include<zlib.h>
+],
+[
+ char buf[42];
+ gzFile f = (gzFile) 0;
+ /* this would segfault.. but we only link, don't run */
+ (void) gzgets(f, buf, sizeof(buf));
+
+ return (zlibVersion() == ZLIB_VERSION);
+],
+ eval "ac_cv_lib_z='-lz'",
+ eval "ac_cv_lib_z=no")
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+])dnl
+if test ! "$ac_cv_lib_z" = no; then
+ AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
+ LIBZ="$ac_cv_lib_z"
+ AC_MSG_RESULT($ac_cv_lib_z)
+else
+ AC_MSG_ERROR(not found.
+ Possibly configure picks up an outdated version
+ installed by XFree86. Remove it from your system.
+
+ Check your installation and look into config.log)
+ LIBZ=""
+fi
+AC_SUBST(LIBZ)
+])
+
+AC_DEFUN([KDE_TRY_TIFFLIB],
+[
+AC_MSG_CHECKING([for libtiff $1])
+
+AC_CACHE_VAL(kde_cv_libtiff_$1,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+kde_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
+else
+LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
+fi
+kde_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+
+AC_TRY_LINK(dnl
+[
+#include<tiffio.h>
+],
+ [return (TIFFOpen( "", "r") == 0); ],
+[
+ kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
+], [
+ kde_cv_libtiff_$1=no
+])
+
+LIBS="$kde_save_LIBS"
+CXXFLAGS="$kde_save_CXXFLAGS"
+AC_LANG_RESTORE
+])
+
+if test "$kde_cv_libtiff_$1" = "no"; then
+ AC_MSG_RESULT(no)
+ LIBTIFF=""
+ $3
+else
+ LIBTIFF="$kde_cv_libtiff_$1"
+ AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
+ $2
+fi
+
+])
+
+AC_DEFUN([AC_FIND_TIFF],
+[
+AC_REQUIRE([K_PATH_X])
+AC_REQUIRE([AC_FIND_ZLIB])
+AC_REQUIRE([AC_FIND_JPEG])
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+KDE_TRY_TIFFLIB(tiff, [],
+ KDE_TRY_TIFFLIB(tiff34))
+
+AC_SUBST(LIBTIFF)
+])
+
+AC_DEFUN([KDE_FIND_LIBEXR],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_REQUIRE([AC_FIND_ZLIB])
+AC_CACHE_VAL(ac_cv_libexr,
+[
+ if test -z "$PKG_CONFIG"; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ fi
+
+ AC_MSG_CHECKING([for OpenEXR libraries])
+
+ if test "$PKG_CONFIG" = "no" ; then
+ AC_MSG_RESULT(no)
+ echo "*** The pkg-config script could not be found. Make sure it is"
+ echo "*** in your path, or set the PKG_CONFIG environment variable"
+ echo "*** to the full path to pkg-config."
+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+ else
+ if !(`$PKG_CONFIG --exists OpenEXR`) ; then
+ AC_MSG_RESULT(no)
+ EXRSTATUS=no
+ else
+ if !(`$PKG_CONFIG --atleast-version="1.1.1" OpenEXR`) ; then
+ AC_MSG_RESULT(no)
+ EXRSTATUS=old
+ else
+ kde_save_LIBS="$LIBS"
+ LIBS="$LIBS $all_libraries $USER_LDFLAGS `pkg-config --libs OpenEXR` $LIBZ"
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ kde_save_CXXFLAGS="$CXXFLAGS"
+ EXR_FLAGS=`$PKG_CONFIG --cflags OpenEXR`
+ CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES $EXR_FLAGS"
+
+ AC_TRY_LINK(dnl
+ [
+ #include <ImfRgbaFile.h>
+ ],
+ [
+ using namespace Imf;
+ RgbaInputFile file ("dummy");
+ return 0;
+ ],
+ eval "ac_cv_libexr='`pkg-config --libs OpenEXR`'",
+ eval "ac_cv_libexr=no"
+ )
+ LIBS="$kde_save_LIBS"
+ CXXFLAGS="$kde_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])dnl
+ if eval "test ! \"`echo $ac_cv_libexr`\" = no"; then
+ AC_DEFINE_UNQUOTED(HAVE_EXR, 1, [Define if you have OpenEXR])
+ LIB_EXR="$ac_cv_libexr"
+ AC_MSG_RESULT($ac_cv_libexr)
+ else
+ AC_MSG_RESULT(no)
+ LIB_EXR=""
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST(LIB_EXR)
+ AC_SUBST(EXR_FLAGS)
+])
+
+
+
+AC_DEFUN([AC_FIND_PNG],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_REQUIRE([AC_FIND_ZLIB])
+AC_MSG_CHECKING([for libpng])
+AC_CACHE_VAL(ac_cv_lib_png,
+[
+kde_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
+else
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
+fi
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+
+AC_TRY_LINK(dnl
+ [
+ #include<png.h>
+ ],
+ [
+ png_structp png_ptr = png_create_read_struct( /* image ptr */
+ PNG_LIBPNG_VER_STRING, 0, 0, 0 );
+ return( png_ptr != 0 );
+ ],
+ eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
+ eval "ac_cv_lib_png=no"
+)
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+])dnl
+if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
+ AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
+ LIBPNG="$ac_cv_lib_png"
+ AC_SUBST(LIBPNG)
+ AC_MSG_RESULT($ac_cv_lib_png)
+else
+ AC_MSG_RESULT(no)
+ LIBPNG=""
+ AC_SUBST(LIBPNG)
+fi
+])
+
+
+AC_DEFUN([AC_FIND_JASPER],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_REQUIRE([AC_FIND_JPEG])
+AC_MSG_CHECKING([for jasper])
+AC_CACHE_VAL(ac_cv_jasper,
+[
+kde_save_LIBS="$LIBS"
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+
+AC_TRY_LINK(dnl
+ [
+ #include<jasper/jasper.h>
+ ],
+ [
+ return( jas_init() );
+ ],
+ eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
+ eval "ac_cv_jasper=no"
+)
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+])dnl
+if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
+ AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
+ LIB_JASPER="$ac_cv_jasper"
+ AC_MSG_RESULT($ac_cv_jasper)
+else
+ AC_MSG_RESULT(no)
+ LIB_JASPER=""
+fi
+AC_SUBST(LIB_JASPER)
+])
+
+AC_DEFUN([AC_CHECK_BOOL],
+[
+ AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
+])
+
+AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
+[
+AC_MSG_CHECKING(if you need GNU extensions)
+AC_CACHE_VAL(ac_cv_gnu_extensions,
+[
+cat > conftest.c << EOF
+#include <features.h>
+
+#ifdef __GNU_LIBRARY__
+yes
+#endif
+EOF
+
+if (eval "$ac_cpp conftest.c") 2>&5 |
+ egrep "yes" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_gnu_extensions=yes
+else
+ ac_cv_gnu_extensions=no
+fi
+])
+
+AC_MSG_RESULT($ac_cv_gnu_extensions)
+if test "$ac_cv_gnu_extensions" = "yes"; then
+ AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
+fi
+])
+
+AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
+[
+AC_MSG_CHECKING([whether $CXX supports -$1])
+kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
+AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
+[
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -$1"
+ AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
+ CXXFLAGS="$save_CXXFLAGS"
+ AC_LANG_RESTORE
+])
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ :
+ $2
+else
+ AC_MSG_RESULT(no)
+ :
+ $3
+fi
+])
+
+AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
+[
+AC_MSG_CHECKING([whether $CC supports -$1])
+kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
+AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
+[
+ AC_LANG_SAVE
+ AC_LANG_C
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -$1"
+ AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
+ CFLAGS="$save_CFLAGS"
+ AC_LANG_RESTORE
+])
+if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ :
+ $2
+else
+ AC_MSG_RESULT(no)
+ :
+ $3
+fi
+])
+
+
+dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
+dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
+dnl it's all white-space separated
+AC_DEFUN([AC_REMOVE_FORBIDDEN],
+[ __val=$$1
+ __forbid=" $2 "
+ if test -n "$__val"; then
+ __new=""
+ ac_save_IFS=$IFS
+ IFS=" "
+ for i in $__val; do
+ case "$__forbid" in
+ *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
+ *) # Careful to not add spaces, where there were none, because otherwise
+ # libtool gets confused, if we change e.g. CXX
+ if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
+ esac
+ done
+ IFS=$ac_save_IFS
+ $1=$__new
+ fi
+])
+
+
+AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
+[
+ AC_MSG_CHECKING([whether $CC is blacklisted])
+
+ dnl In theory we have tu run this test against $CC and $CXX
+ dnl in C and in C++ mode, because its perfectly legal for
+ dnl the user to mix compiler versions, since C has a defined
+ dnl ABI.
+ dnl
+ dnl For now, we assume the user is not on crack.
+
+ AC_TRY_COMPILE([
+#ifdef __GNUC__
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
+choke me
+#endif
+#endif
+], ,
+ kde_bad_compiler=no,
+ kde_bad_compiler=yes
+)
+
+ AC_MSG_RESULT($kde_bad_compiler)
+
+if test "$kde_bad_compiler" = "yes"; then
+ AC_MSG_ERROR([
+
+This particular compiler version is blacklisted because it
+is known to miscompile KDE. Please use a newer version, or
+if that is not yet available, choose an older version.
+
+Please do not report a bug or bother us reporting this
+configure error. We know about it, and we introduced
+it by intention to avoid untraceable bugs or crashes in KDE.
+
+])
+fi
+
+])
+
+
+AC_DEFUN([KDE_CHECK_FOR_OPT_NOINLINE_MATCH],
+[
+ AC_CACHE_CHECK([whether system headers can cope with -O2 -fno-inline],
+ kde_cv_opt_noinline_match,
+ [
+ kde_cv_opt_noinline_match=irrelevant
+ dnl if we don't use both -O2 and -fno-inline, this check is moot
+ if echo "$CFLAGS" | grep -e -O2 >/dev/null 2>/dev/null \
+ && echo "$CFLAGS" | grep -e -fno-inline >/dev/null 2>/dev/null ; then
+
+ ac_cflags_save="$CFLAGS"
+ CFLAGS="$CFLAGS -D_USE_GNU"
+
+ AC_TRY_LINK([
+ #include <string.h>
+], [ const char *pt, *et;
+ et = __extension__ ({ char __a0, __a1, __a2; (__builtin_constant_p ( ";," ) && ((size_t)(const void *)(( ";," )+ 1) - (size_t)(const void *)( ";," ) == 1) ? ((__a0 =((__const char *) ( ";," ))[0], __a0 == '\0') ? ((void) ( pt ),((void *)0) ) : ((__a1 = ((__const char *) ( ";," ))[1], __a1== '\0') ? (__extension__ (__builtin_constant_p ( __a0 ) && ( __a0 ) == '\0' ? (char *) __rawmemchr ( pt , __a0) : strchr( pt , __a0 ))) : ((__a2 = ((__const char *) ( ";," ))[2], __a2 == '\0') ? __strpbrk_c2 ( pt , __a0, __a1) :(((__const char *) ( ";," ))[3] == '\0' ? __strpbrk_c3 ( pt ,__a0, __a1, __a2): strpbrk ( pt , ";," ))))) : strpbrk ( pt , ";," )); }) ;
+],
+ kde_cv_opt_noinline_match=yes,
+ kde_cv_opt_noinline_match=no
+ )
+
+ CFLAGS="$ac_cflags_save"
+ fi
+ ])
+])
+
+
+dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
+AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
+[dnl
+if test "x$kde_use_qt_emb" != "xyes"; then
+ AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
+ AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
+else
+ AC_REMOVE_FORBIDDEN(CXX, [-rpath])
+ AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
+fi
+])
+
+AC_DEFUN([AC_CHECK_COMPILERS],
+[
+ AC_ARG_ENABLE(debug,
+ AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
+ [
+ case $enableval in
+ yes)
+ kde_use_debug_code="yes"
+ kde_use_debug_define=no
+ ;;
+ full)
+ kde_use_debug_code="full"
+ kde_use_debug_define=no
+ ;;
+ *)
+ kde_use_debug_code="no"
+ kde_use_debug_define=yes
+ ;;
+ esac
+ ],
+ [kde_use_debug_code="no"
+ kde_use_debug_define=no
+ ])
+
+ dnl Just for configure --help
+ AC_ARG_ENABLE(dummyoption,
+ AC_HELP_STRING([--disable-debug],
+ [disables debug output and debug symbols [default=no]]),
+ [],[])
+
+ AC_ARG_ENABLE(strict,
+ AC_HELP_STRING([--enable-strict],
+ [compiles with strict compiler options (may not work!)]),
+ [
+ if test $enableval = "no"; then
+ kde_use_strict_options="no"
+ else
+ kde_use_strict_options="yes"
+ fi
+ ], [kde_use_strict_options="no"])
+
+ AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
+ [
+ if test $enableval = "no"; then
+ kde_use_warnings="no"
+ else
+ kde_use_warnings="yes"
+ fi
+ ], [kde_use_warnings="yes"])
+
+ dnl enable warnings for debug build
+ if test "$kde_use_debug_code" != "no"; then
+ kde_use_warnings=yes
+ fi
+
+ AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
+ [kde_use_profiling=$enableval],
+ [kde_use_profiling="no"]
+ )
+
+ dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
+ CFLAGS=" $CFLAGS"
+
+ AC_PROG_CC
+
+ AC_PROG_CPP
+
+ if test "$GCC" = "yes"; then
+ if test "$kde_use_debug_code" != "no"; then
+ if test $kde_use_debug_code = "full"; then
+ CFLAGS="-g3 -fno-inline $CFLAGS"
+ else
+ CFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CFLAGS"
+ fi
+ else
+ CFLAGS="-O2 $CFLAGS"
+ fi
+ fi
+
+ if test "$kde_use_debug_define" = "yes"; then
+ CFLAGS="-DNDEBUG $CFLAGS"
+ fi
+
+
+ case "$host" in
+ *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
+ *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
+ esac
+
+ if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
+ LDFLAGS=""
+ fi
+
+ CXXFLAGS=" $CXXFLAGS"
+
+ AC_PROG_CXX
+
+ KDE_CHECK_FOR_BAD_COMPILER
+
+ if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
+ if test "$kde_use_debug_code" != "no"; then
+ if test "$CXX" = "KCC"; then
+ CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
+ else
+ if test "$kde_use_debug_code" = "full"; then
+ CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
+ else
+ CXXFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CXXFLAGS"
+ fi
+ fi
+ KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
+
+ dnl convenience compiler flags
+ KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
+ AC_SUBST(WOVERLOADED_VIRTUAL)
+ else
+ if test "$CXX" = "KCC"; then
+ CXXFLAGS="+K3 $CXXFLAGS"
+ else
+ CXXFLAGS="-O2 $CXXFLAGS"
+ fi
+ fi
+ fi
+
+ if test "$kde_use_debug_define" = "yes"; then
+ CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
+ fi
+
+ if test "$kde_use_profiling" = "yes"; then
+ KDE_CHECK_COMPILER_FLAG(pg,
+ [
+ CFLAGS="-pg $CFLAGS"
+ CXXFLAGS="-pg $CXXFLAGS"
+ ])
+ fi
+
+ if test "$kde_use_warnings" = "yes"; then
+ if test "$GCC" = "yes"; then
+ CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
+ case $host in
+ *-*-linux-gnu)
+ CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
+ CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
+ KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
+ KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
+ ;;
+ esac
+ KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
+ KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
+ dnl ### FIXME: revert for KDE 4
+ KDE_CHECK_COMPILER_FLAG(Wno-non-virtual-dtor,[CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"])
+ fi
+ fi
+
+ if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
+ CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
+ fi
+
+ AC_ARG_ENABLE(pch,
+ AC_HELP_STRING([--enable-pch],
+ [enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
+ [ kde_use_pch=$enableval ],[ kde_use_pch=no ])
+
+ HAVE_GCC_VISIBILITY=0
+ AC_SUBST([HAVE_GCC_VISIBILITY])
+
+ if test "$GXX" = "yes"; then
+ gcc_no_reorder_blocks=NO
+ KDE_CHECK_COMPILER_FLAG(fno-reorder-blocks,[gcc_no_reorder_blocks=YES])
+ if test $kde_use_debug_code != "no" && \
+ test $kde_use_debug_code != "full" && \
+ test "YES" = "$gcc_no_reorder_blocks" ; then
+ CXXFLAGS="$CXXFLAGS -fno-reorder-blocks"
+ CFLAGS="$CFLAGS -fno-reorder-blocks"
+ fi
+ KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
+ KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
+ KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
+ KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
+ ENABLE_PERMISSIVE_FLAG="-fpermissive"
+
+ if test "$kde_use_pch" = "yes"; then
+ AC_MSG_CHECKING(whether gcc supports precompiling c header files)
+ echo >conftest.h
+ if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
+ kde_gcc_supports_pch=yes
+ AC_MSG_RESULT(yes)
+ else
+ kde_gcc_supports_pch=no
+ AC_MSG_RESULT(no)
+ fi
+ if test "$kde_gcc_supports_pch" = "yes"; then
+ AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
+ if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
+ kde_gcc_supports_pch=yes
+ AC_MSG_RESULT(yes)
+ else
+ kde_gcc_supports_pch=no
+ AC_MSG_RESULT(no)
+ fi
+ fi
+ rm -f conftest.h conftest.h.gch
+ fi
+
+ KDE_CHECK_FOR_OPT_NOINLINE_MATCH
+ if test "x$kde_cv_opt_noinline_match" = "xno" ; then
+ CFLAGS="`echo "$CFLAGS" | sed "s/ -fno-inline//"`"
+ fi
+ fi
+ AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
+ if test "$CXX" = "KCC"; then
+ dnl unfortunately we currently cannot disable exception support in KCC
+ dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
+ dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
+ dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
+
+ if test "$kde_use_pch" = "yes"; then
+ dnl TODO: support --pch-dir!
+ KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
+ dnl the below works (but the dir must exist), but it's
+ dnl useless for a whole package.
+ dnl The are precompiled headers for each source file, so when compiling
+ dnl from scratch, it doesn't make a difference, and they take up
+ dnl around ~5Mb _per_ sourcefile.
+ dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
+ dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
+ fi
+ dnl this flag controls inlining. by default KCC inlines in optimisation mode
+ dnl all implementations that are defined inside the class {} declaration.
+ dnl because of templates-compatibility with broken gcc compilers, this
+ dnl can cause excessive inlining. This flag limits it to a sane level
+ KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
+ KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
+ KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
+ KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
+ dnl Some source files are shared between multiple executables
+ dnl (or libraries) and some of those need template instantiations.
+ dnl In that case KCC needs to compile those sources with
+ dnl --one_instantiation_per_object. To make it easy for us we compile
+ dnl _all_ objects with that flag (--one_per is a shorthand).
+ KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
+ fi
+ AC_SUBST(USE_EXCEPTIONS)
+ dnl obsolete macro - provided to keep things going
+ USE_RTTI=
+ AC_SUBST(USE_RTTI)
+
+ case "$host" in
+ *-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
+ *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
+ *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
+ *-*-solaris*)
+ if test "$GXX" = yes; then
+ libstdcpp=`$CXX -print-file-name=libstdc++.so`
+ if test ! -f $libstdcpp; then
+ AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
+ fi
+ fi
+ ;;
+ esac
+
+ AC_VALIDIFY_CXXFLAGS
+
+ AC_PROG_CXXCPP
+
+ if test "$GCC" = yes; then
+ NOOPT_CFLAGS=-O0
+ fi
+ KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
+
+ AC_ARG_ENABLE(coverage,
+ AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
+ if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
+ ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
+ ac_coverage_linker="-lgcc"
+ elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
+ ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
+ ac_coverage_linker=""
+ else
+ AC_MSG_ERROR([coverage with your compiler is not supported])
+ fi
+ CFLAGS="$CFLAGS $ac_coverage_compiler"
+ CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
+ LDFLAGS="$LDFLAGS $ac_coverage_linker"
+ ])
+
+ AC_SUBST(NOOPT_CXXFLAGS)
+ AC_SUBST(NOOPT_CFLAGS)
+ AC_SUBST(ENABLE_PERMISSIVE_FLAG)
+
+ KDE_CHECK_NEW_LDFLAGS
+ KDE_CHECK_FINAL
+ KDE_CHECK_CLOSURE
+ KDE_CHECK_NMCHECK
+
+ ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
+])
+
+AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
+ [
+ AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ safe_CXXFLAGS=$CXXFLAGS
+ safe_LDFLAGS=$LDFLAGS
+ CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
+ LDFLAGS="$LDFLAGS -shared -fPIC"
+
+ AC_TRY_LINK(
+ [
+ /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
+ #include <string>
+ int some_function( void ) __attribute__ ((visibility("default")));
+ int some_function( void )
+ {
+ std::string s("blafasel");
+ return 0;
+ }
+ ], [/* elvis is alive */],
+ kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
+
+ CXXFLAGS=$safe_CXXFLAGS
+ LDFLAGS=$safe_LDFLAGS
+ AC_LANG_RESTORE
+ ]
+ )
+
+ if test x$kde_cv_val_gcc_visibility_bug = xno; then
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+ fi
+ ]
+)
+
+AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
+[
+ AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY])
+
+ AC_MSG_CHECKING([grepping for visibility push/pop in headers])
+
+ if test "x$GXX" = "xyes"; then
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_EGREP_CPP(
+ [GCC visibility push],
+ [ #include <exception>
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ kde_stdc_visibility_patched=yes ],
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([Your libstdc++ doesn't appear to be patched for
+ visibility support. Disabling -fvisibility=hidden])
+
+ kde_stdc_visibility_patched=no ])
+
+ AC_LANG_RESTORE
+
+ kde_have_gcc_visibility=no
+ KDE_CHECK_COMPILER_FLAG(fvisibility=hidden,
+ [
+ kde_have_gcc_visibility=yes
+ dnl the whole toolchain is just a mess, gcc is just too buggy
+ dnl to handle STL with visibility enabled. Lets reconsider
+ dnl when gcc 4.2 is out or when things get fixed in the compiler.
+ dnl Contact mueller@kde.org for details.
+ AC_ARG_ENABLE(gcc-hidden-visibility,
+ AC_HELP_STRING([--enable-gcc-hidden-visibility],[toolchain hidden visibility [default=no]]),
+ [kde_have_gcc_visibility=$enableval],
+ [kde_have_gcc_visibility=no])
+
+ AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ safe_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS $all_includes"
+
+ AC_TRY_COMPILE(
+ [
+#include <qglobal.h>
+#if Q_EXPORT - 0 != 0
+/* if this compiles, then Q_EXPORT is undefined */
+/* if Q_EXPORT is nonempty, this will break compilation */
+#endif
+ ], [/* elvis is alive */],
+ kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes)
+
+ CXXFLAGS=$safe_CXXFLAGS
+ AC_LANG_RESTORE
+ ]
+ )
+
+ if test x$kde_have_gcc_visibility = "xyes" && test x$kde_stdc_visibility_patched = "xyes" && test x$kde_cv_val_qt_gcc_visibility_patched = "xyes"; then
+ CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+ KDE_CHECK_VISIBILITY_GCC_BUG
+ HAVE_GCC_VISIBILITY=1
+ AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
+ fi
+ ])
+ fi
+])
+
+AC_DEFUN([KDE_ADD_DEPENDENCIES],
+[
+ [A]M_DEPENDENCIES(CC)
+ [A]M_DEPENDENCIES(CXX)
+])
+
+dnl just a wrapper to clean up configure.in
+AC_DEFUN([KDE_PROG_LIBTOOL],
+[
+AC_REQUIRE([AC_CHECK_COMPILERS])
+AC_REQUIRE([AC_ENABLE_SHARED])
+AC_REQUIRE([AC_ENABLE_STATIC])
+
+AC_REQUIRE([AC_LIBTOOL_DLOPEN])
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+AC_OBJEXT
+AC_EXEEXT
+
+AM_PROG_LIBTOOL
+AC_LIBTOOL_CXX
+
+LIBTOOL_SHELL="/bin/sh ./libtool"
+# LIBTOOL="$LIBTOOL --silent"
+KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
+AC_SUBST(KDE_PLUGIN)
+
+# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
+KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
+AC_SUBST(KDE_CHECK_PLUGIN)
+
+# we patch configure quite some so we better keep that consistent for incremental runs
+AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
+])
+
+AC_DEFUN([KDE_CHECK_LIB64],
+[
+ AC_ARG_ENABLE(libsuffix,
+ AC_HELP_STRING([--enable-libsuffix],
+ [/lib directory suffix (64,32,none,auto[=default])]),
+ kdelibsuff=$enableval, kdelibsuff="auto")
+
+ if test "$kdelibsuff" = "auto"; then
+
+cat > conftest.c << EOF
+#include <stdio.h>
+int main() {
+ return 0;
+}
+EOF
+ kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
+ s,.*/lib\([[^\/]]*\)/.*,\1,
+ p
+}'`
+ rm -rf conftest.*
+ fi
+
+ if test "$kdelibsuff" = "no" || test "$kdelibsuff" = "none"; then
+ kdelibsuff=
+ fi
+ if test -z "$kdelibsuff"; then
+ AC_MSG_RESULT([not using lib directory suffix])
+ AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
+ else
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir="$libdir${kdelibsuff}"
+ AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
+ fi
+ AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
+ AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
+ fi
+])
+
+AC_DEFUN([KDE_CHECK_TYPES],
+[ AC_CHECK_SIZEOF(int, 4)dnl
+ AC_CHECK_SIZEOF(short)dnl
+ AC_CHECK_SIZEOF(long, 4)dnl
+ AC_CHECK_SIZEOF(char *, 4)dnl
+])dnl
+
+dnl Not used - kept for compat only?
+AC_DEFUN([KDE_DO_IT_ALL],
+[
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
+AM_INIT_AUTOMAKE($1, $2)
+AM_DISABLE_LIBRARIES
+AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
+AC_CHECK_COMPILERS
+KDE_PROG_LIBTOOL
+AM_KDE_WITH_NLS
+AC_PATH_KDE
+])
+
+AC_DEFUN([AC_CHECK_RPATH],
+[
+AC_MSG_CHECKING(for rpath)
+AC_ARG_ENABLE(rpath,
+ AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
+ USE_RPATH=$enableval, USE_RPATH=yes)
+
+if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
+
+ KDE_RPATH="-R \$(libdir)"
+
+ if test "$kde_libraries" != "$libdir"; then
+ KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
+ fi
+
+ if test -n "$qt_libraries"; then
+ KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
+ fi
+ dnl $x_libraries is set to /usr/lib in case
+ if test -n "$X_LDFLAGS"; then
+ X_RPATH="-R \$(x_libraries)"
+ KDE_RPATH="$KDE_RPATH $X_RPATH"
+ fi
+ if test -n "$KDE_EXTRA_RPATH"; then
+ KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
+ fi
+fi
+AC_SUBST(KDE_EXTRA_RPATH)
+AC_SUBST(KDE_RPATH)
+AC_SUBST(X_RPATH)
+AC_MSG_RESULT($USE_RPATH)
+])
+
+dnl Check for the type of the third argument of getsockname
+AC_DEFUN([AC_CHECK_SOCKLEN_T],
+[
+ AC_MSG_CHECKING(for socklen_t)
+ AC_CACHE_VAL(kde_cv_socklen_t,
+ [
+ AC_LANG_PUSH(C++)
+ kde_cv_socklen_t=no
+ AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ],
+ [
+ socklen_t len;
+ getpeername(0,0,&len);
+ ],
+ [
+ kde_cv_socklen_t=yes
+ kde_cv_socklen_t_equiv=socklen_t
+ ])
+ AC_LANG_POP(C++)
+ ])
+ AC_MSG_RESULT($kde_cv_socklen_t)
+ if test $kde_cv_socklen_t = no; then
+ AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
+ AC_CACHE_VAL(kde_cv_socklen_t_equiv,
+ [
+ kde_cv_socklen_t_equiv=int
+ AC_LANG_PUSH(C++)
+ for t in int size_t unsigned long "unsigned long"; do
+ AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ],
+ [
+ $t len;
+ getpeername(0,0,&len);
+ ],
+ [
+ kde_cv_socklen_t_equiv="$t"
+ break
+ ])
+ done
+ AC_LANG_POP(C++)
+ ])
+ AC_MSG_RESULT($kde_cv_socklen_t_equiv)
+ fi
+ AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
+ [type to use in place of socklen_t if not defined])
+ AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
+ [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
+])
+
+dnl This is a merge of some macros out of the gettext aclocal.m4
+dnl since we don't need anything, I took the things we need
+dnl the copyright for them is:
+dnl >
+dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+dnl This Makefile.in is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+dnl >
+dnl for this file it is relicensed under LGPL
+
+AC_DEFUN([AM_KDE_WITH_NLS],
+ [
+ dnl If we use NLS figure out what method
+
+ AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
+ [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+ if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
+ AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
+ GMSGFMT=":"
+ fi
+ MSGFMT=$GMSGFMT
+ AC_SUBST(GMSGFMT)
+ AC_SUBST(MSGFMT)
+
+ AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext programs is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+ AC_SUBST(XGETTEXT)
+
+ ])
+
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+# serial 1
+# Stephan Kulow: I appended a _KDE against name conflicts
+
+dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# serial 1
+
+AC_DEFUN([AM_LC_MESSAGES],
+ [if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
+ fi
+ fi])
+
+dnl From Jim Meyering.
+dnl FIXME: migrate into libit.
+
+AC_DEFUN([AM_FUNC_OBSTACK],
+[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
+ [AC_TRY_LINK([#include "obstack.h"],
+ [struct obstack *mem;obstack_free(mem,(char *) 0)],
+ am_cv_func_obstack=yes,
+ am_cv_func_obstack=no)])
+ if test $am_cv_func_obstack = yes; then
+ AC_DEFINE(HAVE_OBSTACK)
+ else
+ LIBOBJS="$LIBOBJS obstack.o"
+ fi
+])
+
+dnl From Jim Meyering. Use this if you use the GNU error.[ch].
+dnl FIXME: Migrate into libit
+
+AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
+[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
+ [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
+ am_cv_lib_error_at_line=yes,
+ am_cv_lib_error_at_line=no)])
+ if test $am_cv_lib_error_at_line = no; then
+ LIBOBJS="$LIBOBJS error.o"
+ fi
+ AC_SUBST(LIBOBJS)dnl
+])
+
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# serial 1
+# Stephan Kulow: I put a KDE in it to avoid name conflicts
+
+AC_DEFUN([AM_KDE_GNU_GETTEXT],
+ [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+ AC_REQUIRE([AM_KDE_WITH_NLS])dnl
+ AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
+ AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next])
+
+ AC_MSG_CHECKING(for stpcpy)
+ AC_CACHE_VAL(kde_cv_func_stpcpy,
+ [
+ kde_safe_cxxflags=$CXXFLAGS
+ CXXFLAGS="-Werror"
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ #include <string.h>
+ ],
+ [
+ char buffer[200];
+ stpcpy(buffer, buffer);
+ ],
+ kde_cv_func_stpcpy=yes,
+ kde_cv_func_stpcpy=no)
+ AC_LANG_RESTORE
+ CXXFLAGS=$kde_safe_cxxflags
+ ])
+ AC_MSG_RESULT($kde_cv_func_stpcpy)
+ if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
+ AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
+ fi
+
+ AM_LC_MESSAGES
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ ])
+
+AC_DEFUN([AC_HAVE_XPM],
+ [AC_REQUIRE_CPP()dnl
+ AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+ test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
+ test -z "$XPM_INCLUDE" && XPM_INCLUDE=
+
+ AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
+ xpm_test=$withval, xpm_test="yes")
+ if test "x$xpm_test" = xno; then
+ ac_cv_have_xpm=no
+ else
+ AC_MSG_CHECKING(for XPM)
+ AC_CACHE_VAL(ac_cv_have_xpm,
+ [
+ ac_save_ldflags="$LDFLAGS"
+ ac_save_cflags="$CFLAGS"
+ if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+ LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
+ else
+ LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
+ fi
+ CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
+ test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
+ AC_TRY_LINK([#include <X11/xpm.h>],[],
+ ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
+ LDFLAGS="$ac_save_ldflags"
+ CFLAGS="$ac_save_cflags"
+ ])dnl
+
+ if test "$ac_cv_have_xpm" = no; then
+ AC_MSG_RESULT(no)
+ XPM_LDFLAGS=""
+ XPMINC=""
+ $2
+ else
+ AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
+ if test "$XPM_LDFLAGS" = ""; then
+ XPMLIB='-lXpm $(LIB_X11)'
+ else
+ XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
+ fi
+ if test "$XPM_INCLUDE" = ""; then
+ XPMINC=""
+ else
+ XPMINC="-I$XPM_INCLUDE"
+ fi
+ AC_MSG_RESULT(yes)
+ $1
+ fi
+ fi
+ AC_SUBST(XPMINC)
+ AC_SUBST(XPMLIB)
+])
+
+AC_DEFUN([AC_HAVE_DPMS],
+ [AC_REQUIRE_CPP()dnl
+ AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+ test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
+ test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
+ DPMS_LIB=
+
+ AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
+ dpms_test=$withval, dpms_test="yes")
+ if test "x$dpms_test" = xno; then
+ ac_cv_have_dpms=no
+ else
+ AC_MSG_CHECKING(for DPMS)
+ dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
+ dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
+ AC_CACHE_VAL(ac_cv_have_dpms,
+ [
+ if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
+ AC_MSG_RESULT(no)
+ ac_cv_have_dpms="no"
+ else
+ ac_save_ldflags="$LDFLAGS"
+ ac_save_cflags="$CFLAGS"
+ ac_save_libs="$LIBS"
+ LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries"
+ LIBS="-lX11 -lXext $LIBSOCKET"
+ CFLAGS="$CFLAGS $X_INCLUDES"
+ test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+ AC_TRY_LINK([
+ #include <X11/Xproto.h>
+ #include <X11/X.h>
+ #include <X11/Xlib.h>
+ #include <X11/extensions/dpms.h>
+ int foo_test_dpms()
+ { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+ ac_cv_have_dpms="yes", [
+ LIBS="-lXdpms $LIBS"
+ AC_TRY_LINK([
+ #include <X11/Xproto.h>
+ #include <X11/X.h>
+ #include <X11/Xlib.h>
+ #include <X11/extensions/dpms.h>
+ int foo_test_dpms()
+ { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+ [
+ ac_cv_have_dpms="-lXdpms"
+ ],ac_cv_have_dpms="no")
+ ])
+ LDFLAGS="$ac_save_ldflags"
+ CFLAGS="$ac_save_cflags"
+ LIBS="$ac_save_libs"
+ fi
+ ])dnl
+
+ if test "$ac_cv_have_dpms" = no; then
+ AC_MSG_RESULT(no)
+ DPMS_LDFLAGS=""
+ DPMSINC=""
+ $2
+ else
+ AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
+ if test "$ac_cv_have_dpms" = "-lXdpms"; then
+ DPMS_LIB="-lXdpms"
+ fi
+ if test "$DPMS_LDFLAGS" = ""; then
+ DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
+ else
+ DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
+ fi
+ if test "$DPMS_INCLUDE" = ""; then
+ DPMSINC=""
+ else
+ DPMSINC="-I$DPMS_INCLUDE"
+ fi
+ AC_MSG_RESULT(yes)
+ $1
+ fi
+ fi
+ ac_save_cflags="$CFLAGS"
+ CFLAGS="$CFLAGS $X_INCLUDES"
+ test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+ AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
+ [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
+ AC_CHECK_DECL(DPMSCapable,
+ AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
+ [#include <X11/Xlib.h>
+ #include <X11/extensions/dpms.h>])
+ AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
+ [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
+ AC_CHECK_DECL(DPMSInfo,
+ AC_DEFINE(HAVE_DPMSINFO_PROTO),,
+ [#include <X11/Xlib.h>
+ #include <X11/extensions/dpms.h>])
+ CFLAGS="$ac_save_cflags"
+ AC_SUBST(DPMSINC)
+ AC_SUBST(DPMSLIB)
+])
+
+AC_DEFUN([AC_HAVE_GL],
+ [AC_REQUIRE_CPP()dnl
+ AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+ test -z "$GL_LDFLAGS" && GL_LDFLAGS=
+ test -z "$GL_INCLUDE" && GL_INCLUDE=
+
+ AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
+ gl_test=$withval, gl_test="yes")
+ if test "x$kde_use_qt_emb" = "xyes"; then
+ # GL and Qt Embedded is a no-go for now.
+ ac_cv_have_gl=no
+ elif test "x$gl_test" = xno; then
+ ac_cv_have_gl=no
+ else
+ AC_MSG_CHECKING(for GL)
+ AC_CACHE_VAL(ac_cv_have_gl,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_ldflags=$LDFLAGS
+ ac_save_cxxflags=$CXXFLAGS
+ ac_save_libs=$LIBS
+ LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
+ LIBS="$LIBS -lGL -lGLU"
+ test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
+ LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
+ CXXFLAGS="$CFLAGS $X_INCLUDES"
+ test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
+ AC_TRY_LINK([#include <GL/gl.h>
+#include <GL/glu.h>
+], [],
+ ac_cv_have_gl="yes", ac_cv_have_gl="no")
+ AC_LANG_RESTORE
+ LDFLAGS=$ac_save_ldflags
+ CXXFLAGS=$ac_save_cxxflags
+ LIBS=$ac_save_libs
+ ])dnl
+
+ if test "$ac_cv_have_gl" = "no"; then
+ AC_MSG_RESULT(no)
+ GL_LDFLAGS=""
+ GLINC=""
+ $2
+ else
+ AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
+ if test "$GL_LDFLAGS" = ""; then
+ GLLIB='-lGLU -lGL $(LIB_X11)'
+ else
+ GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
+ fi
+ if test "$GL_INCLUDE" = ""; then
+ GLINC=""
+ else
+ GLINC="-I$GL_INCLUDE"
+ fi
+ AC_MSG_RESULT($ac_cv_have_gl)
+ $1
+ fi
+ fi
+ AC_SUBST(GLINC)
+ AC_SUBST(GLLIB)
+])
+
+
+ dnl shadow password and PAM magic - maintained by ossi@kde.org
+
+AC_DEFUN([KDE_PAM], [
+ AC_REQUIRE([KDE_CHECK_LIBDL])
+
+ want_pam=
+ AC_ARG_WITH(pam,
+ AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
+ [ if test "x$withval" = "xyes"; then
+ want_pam=yes
+ pam_service=kde
+ elif test "x$withval" = "xno"; then
+ want_pam=no
+ else
+ want_pam=yes
+ pam_service=$withval
+ fi
+ ], [ pam_service=kde ])
+
+ use_pam=
+ PAMLIBS=
+ if test "x$want_pam" != xno; then
+ AC_CHECK_LIB(pam, pam_start, [
+ AC_CHECK_HEADER(security/pam_appl.h,
+ [ pam_header=security/pam_appl.h ],
+ [ AC_CHECK_HEADER(pam/pam_appl.h,
+ [ pam_header=pam/pam_appl.h ],
+ [
+ AC_MSG_WARN([PAM detected, but no headers found!
+Make sure you have the necessary development packages installed.])
+ ]
+ )
+ ]
+ )
+ ], , $LIBDL)
+ if test -z "$pam_header"; then
+ if test "x$want_pam" = xyes; then
+ AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
+ fi
+ else
+ AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
+ PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
+ use_pam=yes
+
+ dnl darwin claims to be something special
+ if test "$pam_header" = "pam/pam_appl.h"; then
+ AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
+ fi
+
+ dnl test whether struct pam_message is const (Linux) or not (Sun)
+ AC_MSG_CHECKING(for const pam_message)
+ AC_EGREP_HEADER([struct pam_message], $pam_header,
+ [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
+ [AC_MSG_RESULT([const: Linux-type PAM])],
+ [AC_MSG_RESULT([nonconst: Sun-type PAM])
+ AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
+ )],
+ [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
+ fi
+ fi
+
+ AC_SUBST(PAMLIBS)
+])
+
+dnl DEF_PAM_SERVICE(arg name, full name, define name)
+AC_DEFUN([DEF_PAM_SERVICE], [
+ AC_ARG_WITH($1-pam,
+ AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
+ [ if test "x$use_pam" = xyes; then
+ $3_PAM_SERVICE=$withval
+ else
+ AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
+You may want to enforce it by using --with-pam.])
+ fi
+ ],
+ [ if test "x$use_pam" = xyes; then
+ $3_PAM_SERVICE="$pam_service"
+ fi
+ ])
+ if test -n "$$3_PAM_SERVICE"; then
+ AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
+ AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
+ fi
+ AC_SUBST($3_PAM_SERVICE)
+])
+
+AC_DEFUN([KDE_SHADOWPASSWD], [
+ AC_REQUIRE([KDE_PAM])
+
+ AC_CHECK_LIB(shadow, getspent,
+ [ LIBSHADOW="-lshadow"
+ ac_use_shadow=yes
+ ],
+ [ dnl for UnixWare
+ AC_CHECK_LIB(gen, getspent,
+ [ LIBGEN="-lgen"
+ ac_use_shadow=yes
+ ],
+ [ AC_CHECK_FUNC(getspent,
+ [ ac_use_shadow=yes ],
+ [ ac_use_shadow=no ])
+ ])
+ ])
+ AC_SUBST(LIBSHADOW)
+ AC_SUBST(LIBGEN)
+
+ AC_MSG_CHECKING([for shadow passwords])
+
+ AC_ARG_WITH(shadow,
+ AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
+ [ if test "x$withval" != "xno"; then
+ use_shadow=yes
+ else
+ use_shadow=no
+ fi
+ ], [
+ use_shadow="$ac_use_shadow"
+ ])
+
+ if test "x$use_shadow" = xyes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
+ else
+ AC_MSG_RESULT(no)
+ LIBSHADOW=
+ LIBGEN=
+ fi
+
+ dnl finally make the relevant binaries setuid root, if we have shadow passwds.
+ dnl this still applies, if we could use it indirectly through pam.
+ if test "x$use_shadow" = xyes ||
+ ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
+ case $host in
+ *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
+ SETUIDFLAGS="-m 4755 -o root";;
+ *)
+ SETUIDFLAGS="-m 4755";;
+ esac
+ fi
+ AC_SUBST(SETUIDFLAGS)
+
+])
+
+AC_DEFUN([KDE_PASSWDLIBS], [
+ AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
+ AC_REQUIRE([KDE_PAM])
+ AC_REQUIRE([KDE_SHADOWPASSWD])
+
+ if test "x$use_pam" = "xyes"; then
+ PASSWDLIBS="$PAMLIBS"
+ else
+ PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
+ fi
+
+ dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
+ dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
+ dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
+ dnl may need to read /etc/master.passwd).
+ case $host in
+ *-*-freebsd*)
+ SETUIDFLAGS="-m 4755 -o root"
+ ;;
+ *)
+ ;;
+ esac
+
+ AC_SUBST(PASSWDLIBS)
+])
+
+AC_DEFUN([KDE_CHECK_LIBDL],
+[
+AC_CHECK_LIB(dl, dlopen, [
+LIBDL="-ldl"
+ac_cv_have_dlfcn=yes
+])
+
+AC_CHECK_LIB(dld, shl_unload, [
+LIBDL="-ldld"
+ac_cv_have_shload=yes
+])
+
+AC_SUBST(LIBDL)
+])
+
+AC_DEFUN([KDE_CHECK_DLOPEN],
+[
+KDE_CHECK_LIBDL
+AC_CHECK_HEADERS(dlfcn.h dl.h)
+if test "$ac_cv_header_dlfcn_h" = "no"; then
+ ac_cv_have_dlfcn=no
+fi
+
+if test "$ac_cv_header_dl_h" = "no"; then
+ ac_cv_have_shload=no
+fi
+
+dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
+dnl (MM)
+AC_ARG_ENABLE(dlopen,
+AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
+enable_dlopen=$enableval,
+enable_dlopen=yes)
+
+# override the user's opinion, if we know it better ;)
+if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
+ enable_dlopen=no
+fi
+
+if test "$ac_cv_have_dlfcn" = "yes"; then
+ AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
+fi
+
+if test "$ac_cv_have_shload" = "yes"; then
+ AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
+fi
+
+if test "$enable_dlopen" = no ; then
+ test -n "$1" && eval $1
+else
+ test -n "$2" && eval $2
+fi
+
+])
+
+AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
+[
+KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
+KDE_PROG_LIBTOOL
+AC_MSG_CHECKING([dynamic loading])
+eval "`egrep '^build_libtool_libs=' libtool`"
+if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
+ dynamic_loading=yes
+ AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
+else
+ dynamic_loading=no
+fi
+AC_MSG_RESULT($dynamic_loading)
+if test "$dynamic_loading" = "yes"; then
+ $1
+else
+ $2
+fi
+])
+
+AC_DEFUN([KDE_ADD_INCLUDES],
+[
+if test -z "$1"; then
+ test_include="Pix.h"
+else
+ test_include="$1"
+fi
+
+AC_MSG_CHECKING([for libg++ ($test_include)])
+
+AC_CACHE_VAL(kde_cv_libgpp_includes,
+[
+kde_cv_libgpp_includes=no
+
+ for ac_dir in \
+ \
+ /usr/include/g++ \
+ /usr/include \
+ /usr/unsupported/include \
+ /opt/include \
+ $extra_include \
+ ; \
+ do
+ if test -r "$ac_dir/$test_include"; then
+ kde_cv_libgpp_includes=$ac_dir
+ break
+ fi
+ done
+])
+
+AC_MSG_RESULT($kde_cv_libgpp_includes)
+if test "$kde_cv_libgpp_includes" != "no"; then
+ all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
+fi
+])
+])
+
+AC_DEFUN([KDE_CHECK_LIBPTHREAD],
+[
+ dnl This code is here specifically to handle the
+ dnl various flavors of threading library on FreeBSD
+ dnl 4-, 5-, and 6-, and the (weird) rules around it.
+ dnl There may be an environment PTHREAD_LIBS that
+ dnl specifies what to use; otherwise, search for it.
+ dnl -pthread is special cased and unsets LIBPTHREAD
+ dnl below if found.
+ LIBPTHREAD=""
+
+ if test -n "$PTHREAD_LIBS"; then
+ if test "x$PTHREAD_LIBS" = "x-pthread" ; then
+ LIBPTHREAD="PTHREAD"
+ else
+ PTHREAD_LIBS_save="$PTHREAD_LIBS"
+ PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
+ AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
+ KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
+ LIBPTHREAD="$PTHREAD_LIBS_save"])
+ PTHREAD_LIBS="$PTHREAD_LIBS_save"
+ fi
+ fi
+
+ dnl Is this test really needed, in the face of the Tru64 test below?
+ if test -z "$LIBPTHREAD"; then
+ AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
+ fi
+
+ dnl This is a special Tru64 check, see BR 76171 issue #18.
+ if test -z "$LIBPTHREAD" ; then
+ AC_MSG_CHECKING([for pthread_create in -lpthread])
+ kde_safe_libs=$LIBS
+ LIBS="$LIBS -lpthread"
+ AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
+ AC_MSG_RESULT(yes)
+ LIBPTHREAD="-lpthread"],[
+ AC_MSG_RESULT(no)])
+ LIBS=$kde_safe_libs
+ fi
+
+ dnl Un-special-case for FreeBSD.
+ if test "x$LIBPTHREAD" = "xPTHREAD" ; then
+ LIBPTHREAD=""
+ fi
+
+ AC_SUBST(LIBPTHREAD)
+])
+
+AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
+[
+ USE_THREADS=""
+ if test -z "$LIBPTHREAD"; then
+ KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
+ fi
+
+ AH_VERBATIM(__svr_define, [
+#if defined(__SVR4) && !defined(__svr4__)
+#define __svr4__ 1
+#endif
+])
+ case $host_os in
+ solaris*)
+ KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
+ CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
+ ;;
+ freebsd*)
+ CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
+ ;;
+ aix*)
+ CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+ LIBPTHREAD="$LIBPTHREAD -lc_r"
+ ;;
+ linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+ if test "$CXX" = "KCC"; then
+ CXXFLAGS="$CXXFLAGS --thread_safe"
+ NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
+ fi
+ ;;
+ *)
+ ;;
+ esac
+ AC_SUBST(USE_THREADS)
+ AC_SUBST(LIBPTHREAD)
+])
+
+AC_DEFUN([KDE_CHECK_THREADING],
+[
+ AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
+ AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
+ dnl default is yes if libpthread is found and no if no libpthread is available
+ if test -z "$LIBPTHREAD"; then
+ if test -z "$USE_THREADS"; then
+ kde_check_threading_default=no
+ else
+ kde_check_threading_default=yes
+ fi
+ else
+ kde_check_threading_default=yes
+ fi
+ AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
+ kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
+ if test "x$kde_use_threading" = "xyes"; then
+ AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
+ fi
+])
+
+AC_DEFUN([KDE_TRY_LINK_PYTHON],
+[
+if test "$kde_python_link_found" = no; then
+
+if test "$1" = normal; then
+ AC_MSG_CHECKING(if a Python application links)
+else
+ AC_MSG_CHECKING(if Python depends on $2)
+fi
+
+AC_CACHE_VAL(kde_cv_try_link_python_$1,
+[
+kde_save_cflags="$CFLAGS"
+CFLAGS="$CFLAGS $PYTHONINC"
+kde_save_libs="$LIBS"
+LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
+kde_save_ldflags="$LDFLAGS"
+LDFLAGS="$LDFLAGS $PYTHONLIB"
+
+AC_TRY_LINK(
+[
+#include <Python.h>
+],[
+ PySys_SetArgv(1, 0);
+],
+ [kde_cv_try_link_python_$1=yes],
+ [kde_cv_try_link_python_$1=no]
+)
+CFLAGS="$kde_save_cflags"
+LIBS="$kde_save_libs"
+LDFLAGS="$kde_save_ldflags"
+])
+
+if test "$kde_cv_try_link_python_$1" = "yes"; then
+ AC_MSG_RESULT(yes)
+ kde_python_link_found=yes
+ if test ! "$1" = normal; then
+ LIBPYTHON="$LIBPYTHON $2"
+ fi
+ $3
+else
+ AC_MSG_RESULT(no)
+ $4
+fi
+
+fi
+
+])
+
+AC_DEFUN([KDE_CHECK_PYTHON_DIR],
+[
+AC_MSG_CHECKING([for Python directory])
+
+AC_CACHE_VAL(kde_cv_pythondir,
+[
+ if test -z "$PYTHONDIR"; then
+ kde_cv_pythondir=/usr/local
+ else
+ kde_cv_pythondir="$PYTHONDIR"
+ fi
+])
+
+AC_ARG_WITH(pythondir,
+AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
+[
+ ac_python_dir=$withval
+], ac_python_dir=$kde_cv_pythondir
+)
+
+AC_MSG_RESULT($ac_python_dir)
+])
+
+AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
+[
+AC_REQUIRE([KDE_CHECK_LIBDL])
+AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
+AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
+
+if test -z "$1"; then
+ version="1.5"
+else
+ version="$1"
+fi
+
+AC_MSG_CHECKING([for Python$version])
+
+python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
+AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
+if test ! -r $python_incdir/Python.h; then
+ AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
+ python_incdir=$python_incdir/python$version
+ if test ! -r $python_incdir/Python.h; then
+ python_incdir=no
+ fi
+fi
+
+PYTHONINC=-I$python_incdir
+
+python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
+AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
+if test ! -r $python_libdir/libpython$version.so; then
+ AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
+ if test ! -r $python_libdir/libpython$version.a; then
+ AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
+ python_libdir=$python_libdir/python$version/config
+ if test ! -r $python_libdir/libpython$version.a; then
+ python_libdir=no
+ fi
+ fi
+fi
+
+PYTHONLIB=-L$python_libdir
+kde_orig_LIBPYTHON=$LIBPYTHON
+if test -z "$LIBPYTHON"; then
+ LIBPYTHON=-lpython$version
+fi
+
+AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
+python_moddir=$python_moddir/python$version
+if test ! -r $python_moddir/copy.py; then
+ python_moddir=no
+fi
+
+PYTHONMODDIR=$python_moddir
+
+AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
+
+if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
+ LIBPYTHON=$kde_orig_LIBPYTHON
+ test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
+ test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
+ $2
+else
+ dnl Note: this test is very weak
+ kde_python_link_found=no
+ KDE_TRY_LINK_PYTHON(normal)
+ KDE_TRY_LINK_PYTHON(m, -lm)
+ KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
+ KDE_TRY_LINK_PYTHON(tcl, -ltcl)
+ KDE_TRY_LINK_PYTHON(db2, -ldb2)
+ KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
+ KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
+ KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
+ KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
+ KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
+ KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
+ KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
+ KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
+ [AC_MSG_WARN([it seems, Python depends on another library.
+ Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
+ and contact the authors to let them know about this problem])
+ ])
+
+ LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
+ AC_SUBST(PYTHONINC)
+ AC_SUBST(PYTHONLIB)
+ AC_SUBST(LIBPYTHON)
+ AC_SUBST(PYTHONMODDIR)
+ AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
+fi
+
+])
+
+
+AC_DEFUN([KDE_CHECK_PYTHON],
+[
+ KDE_CHECK_PYTHON_INTERN("2.5",
+ [KDE_CHECK_PYTHON_INTERN("2.4",
+ [KDE_CHECK_PYTHON_INTERN("2.3",
+ [KDE_CHECK_PYTHON_INTERN("2.2",
+ [KDE_CHECK_PYTHON_INTERN("2.1",
+ [KDE_CHECK_PYTHON_INTERN("2.0",
+ [KDE_CHECK_PYTHON_INTERN($1, $2) ])
+ ])
+ ])
+ ])
+ ])
+ ])
+])
+
+AC_DEFUN([KDE_CHECK_STL],
+[
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
+
+ AC_MSG_CHECKING([if C++ programs can be compiled])
+ AC_CACHE_VAL(kde_cv_stl_works,
+ [
+ AC_TRY_COMPILE([
+#include <string>
+using namespace std;
+],[
+ string astring="Hallo Welt.";
+ astring.erase(0, 6); // now astring is "Welt"
+ return 0;
+], kde_cv_stl_works=yes,
+ kde_cv_stl_works=no)
+])
+
+ AC_MSG_RESULT($kde_cv_stl_works)
+
+ if test "$kde_cv_stl_works" = "yes"; then
+ # back compatible
+ AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
+ else
+ AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
+Check config.log for details - if you're using a Linux distribution you might miss
+a package named similar to libstdc++-dev.])
+ fi
+
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+])
+
+AC_DEFUN([AC_FIND_QIMGIO],
+ [AC_REQUIRE([AC_FIND_JPEG])
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_MSG_CHECKING([for qimgio])
+AC_CACHE_VAL(ac_cv_lib_qimgio,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_save_LIBS="$LIBS"
+ac_save_CXXFLAGS="$CXXFLAGS"
+LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
+CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+AC_TRY_RUN(dnl
+[
+#include <qimageio.h>
+#include <qstring.h>
+int main() {
+ QString t = "hallo";
+ t.fill('t');
+ qInitImageIO();
+}
+],
+ ac_cv_lib_qimgio=yes,
+ ac_cv_lib_qimgio=no,
+ ac_cv_lib_qimgio=no)
+LIBS="$ac_save_LIBS"
+CXXFLAGS="$ac_save_CXXFLAGS"
+AC_LANG_RESTORE
+])dnl
+if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
+ LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
+ AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
+ AC_SUBST(LIBQIMGIO)
+else
+ AC_MSG_RESULT(not found)
+fi
+])
+
+AC_DEFUN([AM_DISABLE_LIBRARIES],
+[
+ AC_PROVIDE([AM_ENABLE_STATIC])
+ AC_PROVIDE([AM_ENABLE_SHARED])
+ enable_static=no
+ enable_shared=yes
+])
+
+
+AC_DEFUN([AC_CHECK_UTMP_FILE],
+[
+ AC_MSG_CHECKING([for utmp file])
+
+ AC_CACHE_VAL(kde_cv_utmp_file,
+ [
+ kde_cv_utmp_file=no
+
+ for ac_file in \
+ \
+ /var/run/utmp \
+ /var/adm/utmp \
+ /etc/utmp \
+ ; \
+ do
+ if test -r "$ac_file"; then
+ kde_cv_utmp_file=$ac_file
+ break
+ fi
+ done
+ ])
+
+ if test "$kde_cv_utmp_file" != "no"; then
+ AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
+ $1
+ AC_MSG_RESULT($kde_cv_utmp_file)
+ else
+ $2
+ AC_MSG_RESULT([non found])
+ fi
+])
+
+
+AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
+[
+
+DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
+TOPSUBDIRS=""
+
+if test ! -s $srcdir/subdirs; then
+ dnl Note: Makefile.common creates subdirs, so this is just a fallback
+ files=`cd $srcdir && ls -1`
+ dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
+ for i in $dirs; do
+ echo $i >> $srcdir/subdirs
+ done
+fi
+
+ac_topsubdirs=
+if test -s $srcdir/inst-apps; then
+ ac_topsubdirs="`cat $srcdir/inst-apps`"
+elif test -s $srcdir/subdirs; then
+ ac_topsubdirs="`cat $srcdir/subdirs`"
+fi
+
+for i in $ac_topsubdirs; do
+ AC_MSG_CHECKING([if $i should be compiled])
+ if test -d $srcdir/$i; then
+ install_it="yes"
+ for j in $DO_NOT_COMPILE; do
+ if test $i = $j; then
+ install_it="no"
+ fi
+ done
+ else
+ install_it="no"
+ fi
+ AC_MSG_RESULT($install_it)
+ vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
+ if test $install_it = "yes"; then
+ TOPSUBDIRS="$TOPSUBDIRS $i"
+ eval "$vari""_SUBDIR_included=yes"
+ else
+ eval "$vari""_SUBDIR_included=no"
+ fi
+done
+
+AC_SUBST(TOPSUBDIRS)
+])
+
+AC_DEFUN([KDE_CHECK_NAMESPACES],
+[
+AC_MSG_CHECKING(whether C++ compiler supports namespaces)
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE([
+],
+[
+namespace Foo {
+ extern int i;
+ namespace Bar {
+ extern int i;
+ }
+}
+
+int Foo::i = 0;
+int Foo::Bar::i = 1;
+],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_NAMESPACES)
+], [
+AC_MSG_RESULT(no)
+])
+AC_LANG_RESTORE
+])
+
+dnl ------------------------------------------------------------------------
+dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_CHECK_S_ISSOCK],
+[
+AC_MSG_CHECKING(for S_ISSOCK)
+AC_CACHE_VAL(ac_cv_have_s_issock,
+[
+AC_TRY_LINK(
+[
+#include <sys/stat.h>
+],
+[
+struct stat buff;
+int b = S_ISSOCK( buff.st_mode );
+],
+ac_cv_have_s_issock=yes,
+ac_cv_have_s_issock=no)
+])
+AC_MSG_RESULT($ac_cv_have_s_issock)
+if test "$ac_cv_have_s_issock" = "yes"; then
+ AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
+fi
+
+AH_VERBATIM(_ISSOCK,
+[
+#ifndef HAVE_S_ISSOCK
+#define HAVE_S_ISSOCK
+#define S_ISSOCK(mode) (1==0)
+#endif
+])
+
+])
+
+dnl ------------------------------------------------------------------------
+dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
+[
+AC_MSG_CHECKING(for MAXPATHLEN)
+AC_CACHE_VAL(ac_cv_maxpathlen,
+[
+cat > conftest.$ac_ext <<EOF
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+#include <stdio.h>
+#include <sys/param.h>
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 1024
+#endif
+
+KDE_HELLO MAXPATHLEN
+
+EOF
+
+ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
+
+if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
+ ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
+else
+ ac_cv_maxpathlen=1024
+fi
+
+rm conftest.*
+
+])
+AC_MSG_RESULT($ac_cv_maxpathlen)
+AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
+])
+
+AC_DEFUN([KDE_CHECK_HEADER],
+[
+ kde_safe_cppflags=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $all_includes"
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_CHECK_HEADER([$1], [$2], [$3], [$4])
+ AC_LANG_RESTORE
+ CPPFLAGS=$kde_safe_cppflags
+])
+
+AC_DEFUN([KDE_CHECK_HEADERS],
+[
+ AH_CHECK_HEADERS([$1])
+ AC_LANG_SAVE
+ kde_safe_cppflags=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $all_includes"
+ AC_LANG_CPLUSPLUS
+ AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
+ CPPFLAGS=$kde_safe_cppflags
+ AC_LANG_RESTORE
+])
+
+AC_DEFUN([KDE_FAST_CONFIGURE],
+[
+ dnl makes configure fast (needs perl)
+ AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
+ with_fast_perl=$enableval, with_fast_perl=yes)
+])
+
+AC_DEFUN([KDE_CONF_FILES],
+[
+ val=
+ if test -f $srcdir/configure.files ; then
+ val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
+ fi
+ CONF_FILES=
+ if test -n "$val" ; then
+ for i in $val ; do
+ CONF_FILES="$CONF_FILES $i"
+ done
+ fi
+ AC_SUBST(CONF_FILES)
+])dnl
+
+dnl This sets the prefix, for arts and kdelibs
+dnl Do NOT use in any other module.
+dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
+AC_DEFUN([KDE_SET_PREFIX_CORE],
+[
+ unset CDPATH
+ dnl make $KDEDIR the default for the installation
+ AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
+
+ if test "x$prefix" = "xNONE"; then
+ prefix=$ac_default_prefix
+ ac_configure_args="$ac_configure_args --prefix=$prefix"
+ fi
+ # And delete superfluous '/' to make compares easier
+ prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+ exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+
+ kde_libs_prefix='$(prefix)'
+ kde_libs_htmldir='$(kde_htmldir)'
+ AC_SUBST(kde_libs_prefix)
+ AC_SUBST(kde_libs_htmldir)
+ KDE_FAST_CONFIGURE
+ KDE_CONF_FILES
+])
+
+
+AC_DEFUN([KDE_SET_PREFIX],
+[
+ unset CDPATH
+ dnl We can't give real code to that macro, only a value.
+ dnl It only matters for --help, since we set the prefix in this function anyway.
+ AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
+
+ KDE_SET_DEFAULT_BINDIRS
+ if test "x$prefix" = "xNONE"; then
+ dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
+ KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
+ else
+ dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
+ kde_save_PATH="$PATH"
+ PATH="$exec_prefix/bin:$prefix/bin:$PATH"
+ KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
+ PATH="$kde_save_PATH"
+ fi
+
+ kde_libs_prefix=`$KDECONFIG --prefix`
+ if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
+ AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
+ This means it has been moved since you installed it.
+ This won't work. Please recompile kdelibs for the new prefix.
+ ])
+ fi
+ kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
+
+ AC_MSG_CHECKING([where to install])
+ if test "x$prefix" = "xNONE"; then
+ prefix=$kde_libs_prefix
+ AC_MSG_RESULT([$prefix (as returned by kde-config)])
+ else
+ dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
+ given_prefix=$prefix
+ AC_MSG_RESULT([$prefix (as requested)])
+ fi
+
+ # And delete superfluous '/' to make compares easier
+ prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+ exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+ given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+
+ AC_SUBST(KDECONFIG)
+ AC_SUBST(kde_libs_prefix)
+ AC_SUBST(kde_libs_htmldir)
+
+ KDE_FAST_CONFIGURE
+ KDE_CONF_FILES
+])
+
+pushdef([AC_PROG_INSTALL],
+[
+ dnl our own version, testing for a -p flag
+ popdef([AC_PROG_INSTALL])
+ dnl as AC_PROG_INSTALL works as it works we first have
+ dnl to save if the user didn't specify INSTALL, as the
+ dnl autoconf one overwrites INSTALL and we have no chance to find
+ dnl out afterwards
+ test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
+ test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
+ test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
+ AC_PROG_INSTALL
+
+ if test -z "$kde_save_INSTALL_given" ; then
+ # OK, user hasn't given any INSTALL, autoconf found one for us
+ # now we test, if it supports the -p flag
+ AC_MSG_CHECKING(for -p flag to install)
+ rm -f confinst.$$.* > /dev/null 2>&1
+ echo "Testtest" > confinst.$$.orig
+ ac_res=no
+ if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
+ if test -f confinst.$$.new ; then
+ # OK, -p seems to do no harm to install
+ INSTALL="${INSTALL} -p"
+ ac_res=yes
+ fi
+ fi
+ rm -f confinst.$$.*
+ AC_MSG_RESULT($ac_res)
+ fi
+ dnl the following tries to resolve some signs and wonders coming up
+ dnl with different autoconf/automake versions
+ dnl e.g.:
+ dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
+ dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
+ dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
+ dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
+ dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
+ dnl install-@DIR@PROGRAMS targets to explicitly use that flag
+ dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
+ dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
+ dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
+ dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
+ dnl automake (due to broken Makefile.am or whatever) to install programs,
+ dnl and so does not see the -s flag in automake > 1.4
+ dnl to clean up that mess we:
+ dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
+ dnl which cleans KDE's program with automake > 1.4;
+ dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
+ dnl with automake<=1.4
+ dnl note that dues to this sometimes two '-s' flags are used (if KDE
+ dnl properly uses install-@DIR@PROGRAMS, but I don't care
+ dnl
+ dnl And to all this comes, that I even can't write in comments variable
+ dnl names used by automake, because it is so stupid to think I wanted to
+ dnl _use_ them, therefor I have written A_M_... instead of AM_
+ dnl hmm, I wanted to say something ... ahh yes: Arghhh.
+
+ if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
+ INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
+ fi
+ if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
+ INSTALL_SCRIPT='${INSTALL}'
+ fi
+])dnl
+
+AC_DEFUN([KDE_LANG_CPLUSPLUS],
+[AC_LANG_CPLUSPLUS
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
+pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
+])
+
+pushdef([AC_LANG_CPLUSPLUS],
+[popdef([AC_LANG_CPLUSPLUS])
+KDE_LANG_CPLUSPLUS
+])
+
+AC_DEFUN([KDE_CHECK_LONG_LONG],
+[
+AC_MSG_CHECKING(for long long)
+AC_CACHE_VAL(kde_cv_c_long_long,
+[
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_LINK([], [
+ long long foo = 0;
+ foo = foo+1;
+ ],
+ kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
+ AC_LANG_RESTORE
+])
+AC_MSG_RESULT($kde_cv_c_long_long)
+if test "$kde_cv_c_long_long" = yes; then
+ AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
+fi
+])
+
+AC_DEFUN([KDE_CHECK_LIB],
+[
+ kde_save_LDFLAGS="$LDFLAGS"
+ dnl AC_CHECK_LIB modifies LIBS, so save it here
+ kde_save_LIBS="$LIBS"
+ LDFLAGS="$LDFLAGS $all_libraries"
+ case $host_os in
+ aix*) LDFLAGS="-brtl $LDFLAGS"
+ test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
+ ;;
+ esac
+ AC_CHECK_LIB($1, $2, $3, $4, $5)
+ LDFLAGS="$kde_save_LDFLAGS"
+ LIBS="$kde_save_LIBS"
+])
+
+AC_DEFUN([KDE_JAVA_PREFIX],
+[
+ dir=`dirname "$1"`
+ base=`basename "$1"`
+ list=`ls -1 $dir 2> /dev/null`
+ for entry in $list; do
+ if test -d $dir/$entry/bin; then
+ case $entry in
+ $base)
+ javadirs="$javadirs $dir/$entry/bin"
+ ;;
+ esac
+ elif test -d $dir/$entry/jre/bin; then
+ case $entry in
+ $base)
+ javadirs="$javadirs $dir/$entry/jre/bin"
+ ;;
+ esac
+ fi
+ done
+])
+
+dnl KDE_CHEC_JAVA_DIR(onlyjre)
+AC_DEFUN([KDE_CHECK_JAVA_DIR],
+[
+
+AC_ARG_WITH(java,
+AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
+[ ac_java_dir=$withval
+], ac_java_dir=""
+)
+
+AC_MSG_CHECKING([for Java])
+
+dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
+if test "x$ac_java_dir" = "xno"; then
+ kde_java_bindir=no
+ kde_java_includedir=no
+ kde_java_libjvmdir=no
+ kde_java_libgcjdir=no
+ kde_java_libhpidir=no
+else
+ if test "x$ac_java_dir" = "x"; then
+
+
+ dnl No option set -> collect list of candidate paths
+ if test -n "$JAVA_HOME"; then
+ KDE_JAVA_PREFIX($JAVA_HOME)
+ fi
+ KDE_JAVA_PREFIX(/usr/j2se)
+ KDE_JAVA_PREFIX(/usr/lib/j2se)
+ KDE_JAVA_PREFIX(/usr/j*dk*)
+ KDE_JAVA_PREFIX(/usr/lib/j*dk*)
+ KDE_JAVA_PREFIX(/opt/j*sdk*)
+ KDE_JAVA_PREFIX(/usr/lib/java*)
+ KDE_JAVA_PREFIX(/usr/java*)
+ KDE_JAVA_PREFIX(/usr/java/j*dk*)
+ KDE_JAVA_PREFIX(/usr/java/j*re*)
+ KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
+ KDE_JAVA_PREFIX(/usr/lib/SunJava*)
+ KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
+ KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
+ KDE_JAVA_PREFIX(/opt/java*)
+
+ kde_cv_path="NONE"
+ kde_save_IFS=$IFS
+ IFS=':'
+ for dir in $PATH; do
+ if test -d "$dir"; then
+ javadirs="$javadirs $dir"
+ fi
+ done
+ IFS=$kde_save_IFS
+ jredirs=
+
+ dnl Now javadirs contains a list of paths that exist, all ending with bin/
+ for dir in $javadirs; do
+ dnl Check for the java executable
+ if test -x "$dir/java"; then
+ dnl And also check for a libjvm.so somewhere under there
+ dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
+ if test "$dir" != "/usr/bin"; then
+ libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
+ if test ! -f $libjvmdir/libjvm.so; then continue; fi
+ jredirs="$jredirs $dir"
+ fi
+ fi
+ done
+
+ dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
+ JAVAC=
+ JAVA=
+ kde_java_bindir=no
+ for dir in $jredirs; do
+ JAVA="$dir/java"
+ kde_java_bindir=$dir
+ if test -x "$dir/javac"; then
+ JAVAC="$dir/javac"
+ break
+ fi
+ done
+
+ if test -n "$JAVAC"; then
+ dnl this substitution might not work - well, we test for jni.h below
+ kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
+ else
+ kde_java_includedir=no
+ fi
+ else
+ dnl config option set
+ kde_java_bindir=$ac_java_dir/bin
+ if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
+ kde_java_includedir=no
+ else
+ kde_java_includedir=$ac_java_dir/include
+ fi
+ fi
+fi
+
+dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
+if test "x$kde_java_bindir" != "xno"; then
+
+ dnl Look for libjvm.so
+ kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
+ dnl Look for libgcj.so
+ kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
+ dnl Look for libhpi.so and avoid green threads
+ kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
+
+ dnl Now check everything's fine under there
+ dnl the include dir is our flag for having the JDK
+ if test -d "$kde_java_includedir"; then
+ if test ! -x "$kde_java_bindir/javac"; then
+ AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
+ fi
+ if test ! -x "$kde_java_bindir/javah"; then
+ AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
+ fi
+ if test ! -x "$kde_java_bindir/jar"; then
+ AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
+ fi
+ if test ! -r "$kde_java_includedir/jni.h"; then
+ AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
+ fi
+
+ jni_includes="-I$kde_java_includedir"
+ dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
+ dnl and under linux here..
+
+ dnl not needed for gcj
+
+ if test "x$kde_java_libgcjdir" = "x"; then
+ test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
+ test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
+ test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
+ fi
+
+ else
+ JAVAC=
+ jni_includes=
+ fi
+
+ if test "x$kde_java_libgcjdir" = "x"; then
+ if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
+ AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
+ fi
+ else
+ if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
+ AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
+ fi
+ fi
+
+ if test ! -x "$kde_java_bindir/java"; then
+ AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
+ fi
+
+ dnl not needed for gcj compile
+
+ if test "x$kde_java_libgcjdir" = "x"; then
+ if test ! -r "$kde_java_libhpidir/libhpi.so"; then
+ AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
+ fi
+ fi
+
+ if test -n "$jni_includes"; then
+ dnl Check for JNI version
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_cxxflags_safe="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
+
+ AC_TRY_COMPILE([
+ #include <jni.h>
+ ],
+ [
+ #ifndef JNI_VERSION_1_2
+ Syntax Error
+ #endif
+ ],[ kde_jni_works=yes ],
+ [ kde_jni_works=no ])
+
+ if test $kde_jni_works = no; then
+ AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
+ You need to have Java Development Kit (JDK) version 1.2.
+
+ Use --with-java to specify another location.
+ Use --without-java to configure without java support.
+ Or download a newer JDK and try again.
+ See e.g. http://java.sun.com/products/jdk/1.2 ])
+ fi
+
+ CXXFLAGS="$ac_cxxflags_safe"
+ AC_LANG_RESTORE
+
+ dnl All tests ok, inform and subst the variables
+
+ JAVAC=$kde_java_bindir/javac
+ JAVAH=$kde_java_bindir/javah
+ JAR=$kde_java_bindir/jar
+ AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
+ if test "x$kde_java_libgcjdir" = "x"; then
+ JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
+ else
+ JVMLIBS="-L$kde_java_libgcjdir -lgcj"
+ fi
+ AC_MSG_RESULT([java JDK in $kde_java_bindir])
+
+ else
+ AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
+ AC_MSG_RESULT([java JRE in $kde_java_bindir])
+ fi
+elif test -d "/Library/Java/Home"; then
+ kde_java_bindir="/Library/Java/Home/bin"
+ jni_includes="-I/Library/Java/Home/include"
+
+ JAVAC=$kde_java_bindir/javac
+ JAVAH=$kde_java_bindir/javah
+ JAR=$kde_java_bindir/jar
+ JVMLIBS="-Wl,-framework,JavaVM"
+
+ AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
+ AC_MSG_RESULT([Apple Java Framework])
+else
+ AC_MSG_RESULT([none found])
+fi
+
+AC_SUBST(JAVAC)
+AC_SUBST(JAVAH)
+AC_SUBST(JAR)
+AC_SUBST(JVMLIBS)
+AC_SUBST(jni_includes)
+
+# for backward compat
+kde_cv_java_includedir=$kde_java_includedir
+kde_cv_java_bindir=$kde_java_bindir
+])
+
+dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
+dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
+dnl big packages, m4_foreach is dog-slow. So use our own version of
+dnl it. (matz@kde.org)
+m4_define([mm_foreach],
+[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
+m4_define([mm_car], [[$1]])
+m4_define([mm_car2], [[$@]])
+m4_define([_mm_foreach],
+[m4_if(m4_quote($2), [], [],
+ [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
+ mm_car2(m4_shift($2)),
+ [$3])])])
+m4_define([AC_FOREACH],
+[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
+
+AC_DEFUN([KDE_NEED_FLEX],
+[
+kde_libs_safe=$LIBS
+LIBS="$LIBS $USER_LDFLAGS"
+AM_PROG_LEX
+LIBS=$kde_libs_safe
+if test -z "$LEXLIB"; then
+ AC_MSG_ERROR([You need to have flex installed.])
+fi
+AC_SUBST(LEXLIB)
+])
+
+AC_DEFUN([AC_PATH_QTOPIA],
+[
+ dnl TODO: use AC_CACHE_VAL
+
+ if test -z "$1"; then
+ qtopia_minver_maj=1
+ qtopia_minver_min=5
+ qtopia_minver_pat=0
+ else
+ qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
+ qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
+ qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
+ fi
+
+ qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
+ qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
+
+ AC_REQUIRE([AC_PATH_QT])
+
+ AC_MSG_CHECKING([for Qtopia])
+
+ LIB_QTOPIA="-lqpe"
+ AC_SUBST(LIB_QTOPIA)
+
+ kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
+
+ ac_qtopia_incdir=NO
+
+ AC_ARG_WITH(qtopia-dir,
+ AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
+ [ ac_qtopia_incdir="$withval"/include] )
+
+ qtopia_incdirs=""
+ for dir in $kde_qtopia_dirs; do
+ qtopia_incdirs="$qtopia_incdirs $dir/include"
+ done
+
+ if test ! "$ac_qtopia_incdir" = "NO"; then
+ qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
+ fi
+
+ qtopia_incdir=""
+ AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
+ ac_qtopia_incdir="$qtopia_incdir"
+
+ if test -z "$qtopia_incdir"; then
+ AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
+ fi
+
+ qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
+ qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
+ qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
+
+ qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
+ qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
+ if test "$qtopia_ver" -lt "$qtopia_minver"; then
+ AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
+is required.])
+ fi
+
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ ac_cxxflags_safe="$CXXFLAGS"
+ ac_ldflags_safe="$LDFLAGS"
+ ac_libs_safe="$LIBS"
+
+ CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
+ LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
+ LIBS="$LIBS $LIB_QTOPIA $LIBQT"
+
+ cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <qpe/qpeapplication.h>
+#include <qpe/version.h>
+
+int main( int argc, char **argv )
+{
+ QPEApplication app( argc, argv );
+ return 0;
+}
+EOF
+
+ if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ rm -f conftest*
+ else
+ rm -f conftest*
+ AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
+the end of config.log])
+ fi
+
+ CXXFLAGS="$ac_cxxflags_safe"
+ LDFLAGS="$ac_ldflags_safe"
+ LIBS="$ac_libs_safe"
+
+ AC_LANG_RESTORE
+
+ QTOPIA_INCLUDES="-I$qtopia_incdir"
+ AC_SUBST(QTOPIA_INCLUDES)
+
+ AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
+])
+
+
+AC_DEFUN([KDE_INIT_DOXYGEN],
+[
+AC_MSG_CHECKING([for Qt docs])
+kde_qtdir=
+if test "${with_qt_dir+set}" = set; then
+ kde_qtdir="$with_qt_dir"
+fi
+
+AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
+AC_MSG_RESULT($QTDOCDIR)
+
+AC_SUBST(QTDOCDIR)
+
+KDE_FIND_PATH(dot, DOT, [], [])
+if test -n "$DOT"; then
+ KDE_HAVE_DOT="YES"
+else
+ KDE_HAVE_DOT="NO"
+fi
+AC_SUBST(KDE_HAVE_DOT)
+KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
+AC_SUBST(DOXYGEN)
+
+DOXYGEN_PROJECT_NAME="$1"
+DOXYGEN_PROJECT_NUMBER="$2"
+AC_SUBST(DOXYGEN_PROJECT_NAME)
+AC_SUBST(DOXYGEN_PROJECT_NUMBER)
+
+KDE_HAS_DOXYGEN=no
+if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
+ KDE_HAS_DOXYGEN=yes
+fi
+AC_SUBST(KDE_HAS_DOXYGEN)
+
+])
+
+
+AC_DEFUN([AC_FIND_BZIP2],
+[
+AC_MSG_CHECKING([for bzDecompress in libbz2])
+AC_CACHE_VAL(ac_cv_lib_bzip2,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+kde_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
+kde_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(dnl
+[
+#define BZ_NO_STDIO
+#include<bzlib.h>
+],
+ [ bz_stream s; (void) bzDecompress(&s); ],
+ eval "ac_cv_lib_bzip2='-lbz2'",
+ eval "ac_cv_lib_bzip2=no")
+LIBS="$kde_save_LIBS"
+CXXFLAGS="$kde_save_CXXFLAGS"
+AC_LANG_RESTORE
+])dnl
+AC_MSG_RESULT($ac_cv_lib_bzip2)
+
+if test ! "$ac_cv_lib_bzip2" = no; then
+ BZIP2DIR=bzip2
+
+ LIBBZ2="$ac_cv_lib_bzip2"
+ AC_SUBST(LIBBZ2)
+
+else
+
+ cxx_shared_flag=
+ ld_shared_flag=
+ KDE_CHECK_COMPILER_FLAG(shared, [
+ ld_shared_flag="-shared"
+ ])
+ KDE_CHECK_COMPILER_FLAG(fPIC, [
+ cxx_shared_flag="-fPIC"
+ ])
+
+ AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
+ AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ kde_save_LIBS="$LIBS"
+ LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
+ kde_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
+
+ AC_TRY_LINK(dnl
+ [
+ #define BZ_NO_STDIO
+ #include<bzlib.h>
+ ],
+ [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
+ eval "ac_cv_lib_bzip2_prefix='-lbz2'",
+ eval "ac_cv_lib_bzip2_prefix=no")
+ LIBS="$kde_save_LIBS"
+ CXXFLAGS="$kde_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])dnl
+
+ AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
+
+ if test ! "$ac_cv_lib_bzip2_prefix" = no; then
+ BZIP2DIR=bzip2
+
+ LIBBZ2="$ac_cv_lib_bzip2_prefix"
+ AC_SUBST(LIBBZ2)
+
+ AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
+ dnl else, we just ignore this
+ fi
+
+fi
+AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
+])
+
+dnl ------------------------------------------------------------------------
+dnl Try to find the SSL headers and libraries.
+dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
+dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([KDE_CHECK_SSL],
+[
+LIBSSL="-lssl -lcrypto"
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+ac_ssl_includes=NO ac_ssl_libraries=NO
+ssl_libraries=""
+ssl_includes=""
+AC_ARG_WITH(ssl-dir,
+ AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
+ [ ac_ssl_includes="$withval"/include
+ ac_ssl_libraries="$withval"/lib$kdelibsuff
+ ])
+
+want_ssl=yes
+AC_ARG_WITH(ssl,
+ AC_HELP_STRING([--without-ssl],[disable SSL checks]),
+ [want_ssl=$withval])
+
+if test $want_ssl = yes; then
+
+AC_MSG_CHECKING(for OpenSSL)
+
+AC_CACHE_VAL(ac_cv_have_ssl,
+[#try to guess OpenSSL locations
+
+ ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
+ ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
+ AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
+ ac_ssl_includes="$ssl_incdir"
+
+ ssl_libdirs="/usr/lib$kdelibsuff /usr/local/lib$kdelibsuff /usr/ssl/lib$kdelibsuff /usr/local/ssl/lib$kdelibsuff $libdir $prefix/lib$kdelibsuff $exec_prefix/lib$kdelibsuff $kde_extra_libs"
+ if test ! "$ac_ssl_libraries" = "NO"; then
+ ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
+ fi
+
+ test=NONE
+ ssl_libdir=NONE
+ for dir in $ssl_libdirs; do
+ try="ls -1 $dir/libssl*"
+ if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
+ done
+
+ ac_ssl_libraries="$ssl_libdir"
+
+ ac_ldflags_safe="$LDFLAGS"
+ ac_libs_safe="$LIBS"
+
+ LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
+ LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
+
+ AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
+ ac_ssl_rsaref="yes"
+ ,
+ ac_ssl_rsaref="no"
+ )
+
+ LDFLAGS="$ac_ldflags_safe"
+ LIBS="$ac_libs_safe"
+
+ if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
+ have_ssl=no
+ else
+ have_ssl=yes;
+ fi
+
+ ])
+
+ eval "$ac_cv_have_ssl"
+
+ AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
+
+ AC_MSG_CHECKING([whether OpenSSL uses rsaref])
+ AC_MSG_RESULT($ac_ssl_rsaref)
+
+ AC_MSG_CHECKING([for easter eggs])
+ AC_MSG_RESULT([none found])
+
+else
+ have_ssl=no
+fi
+
+if test "$have_ssl" = yes; then
+ AC_MSG_CHECKING(for OpenSSL version)
+ dnl Check for SSL version
+ AC_CACHE_VAL(ac_cv_ssl_version,
+ [
+
+ cat >conftest.$ac_ext <<EOF
+#include <openssl/opensslv.h>
+#include <stdio.h>
+ int main() {
+
+#ifndef OPENSSL_VERSION_NUMBER
+ printf("ssl_version=\\"error\\"\n");
+#else
+ if (OPENSSL_VERSION_NUMBER < 0x00906000)
+ printf("ssl_version=\\"old\\"\n");
+ else
+ printf("ssl_version=\\"ok\\"\n");
+#endif
+ return (0);
+ }
+EOF
+
+ ac_save_CPPFLAGS=$CPPFLAGS
+ if test "$ac_ssl_includes" != "/usr/include"; then
+ CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
+ fi
+
+ if AC_TRY_EVAL(ac_link); then
+
+ if eval `./conftest 2>&5`; then
+ if test $ssl_version = error; then
+ AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
+ else
+ if test $ssl_version = old; then
+ AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
+ have_ssl=no
+ fi
+ fi
+ ac_cv_ssl_version="ssl_version=$ssl_version"
+ else
+ AC_MSG_ERROR([Your system couldn't run a small SSL test program.
+ Check config.log, and if you can't figure it out, send a mail to
+ David Faure <faure@kde.org>, attaching your config.log])
+ fi
+
+ else
+ AC_MSG_ERROR([Your system couldn't link a small SSL test program.
+ Check config.log, and if you can't figure it out, send a mail to
+ David Faure <faure@kde.org>, attaching your config.log])
+ fi
+ CPPFLAGS=$ac_save_CPPFLAGS
+
+ ])
+
+ eval "$ac_cv_ssl_version"
+ AC_MSG_RESULT($ssl_version)
+fi
+
+if test "$have_ssl" != yes; then
+ LIBSSL="";
+else
+ AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
+ ac_cv_have_ssl="have_ssl=yes \
+ ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
+
+
+ ssl_libraries="$ac_ssl_libraries"
+ ssl_includes="$ac_ssl_includes"
+
+ if test "$ac_ssl_rsaref" = yes; then
+ LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
+ fi
+
+ if test $ssl_version = "old"; then
+ AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
+ fi
+fi
+
+SSL_INCLUDES=
+
+if test "$ssl_includes" = "/usr/include"; then
+ if test -f /usr/kerberos/include/krb5.h; then
+ SSL_INCLUDES="-I/usr/kerberos/include"
+ fi
+elif test "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
+ SSL_INCLUDES="-I$ssl_includes"
+fi
+
+if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
+ SSL_LDFLAGS=""
+else
+ SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
+fi
+
+AC_SUBST(SSL_INCLUDES)
+AC_SUBST(SSL_LDFLAGS)
+AC_SUBST(LIBSSL)
+])
+
+AC_DEFUN([KDE_CHECK_STRLCPY],
+[
+ AC_REQUIRE([AC_CHECK_STRLCAT])
+ AC_REQUIRE([AC_CHECK_STRLCPY])
+ AC_CHECK_SIZEOF(size_t)
+ AC_CHECK_SIZEOF(unsigned long)
+
+ AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
+ AC_TRY_COMPILE(,[
+ #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
+ choke me
+ #endif
+ ],AC_MSG_RESULT([yes]),[
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([
+ Apparently on your system our assumption sizeof size_t == sizeof unsigned long
+ does not apply. Please mail kde-devel@kde.org with a description of your system!
+ ])
+ ])
+])
+
+AC_DEFUN([KDE_CHECK_BINUTILS],
+[
+ AC_MSG_CHECKING([if ld supports unversioned version maps])
+
+ kde_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
+ echo "{ local: extern \"C++\" { foo }; };" > conftest.map
+ AC_TRY_LINK([int foo;],
+[
+#ifdef __INTEL_COMPILER
+icc apparently does not support libtools version-info and version-script
+at the same time. Dunno where the bug is, but until somebody figured out,
+better disable the optional version scripts.
+#endif
+
+ foo = 42;
+], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
+ LDFLAGS="$kde_save_LDFLAGS"
+ rm -f conftest.map
+ AM_CONDITIONAL(include_VERSION_SCRIPT,
+ [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
+
+ AC_MSG_RESULT($kde_supports_versionmaps)
+])
+
+AC_DEFUN([AM_PROG_OBJC],[
+AC_CHECK_PROGS(OBJC, gcc, gcc)
+test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
+if test "x${OBJCFLAGS-unset}" = xunset; then
+ OBJCFLAGS="-g -O2"
+fi
+AC_SUBST(OBJCFLAGS)
+_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
+])
+
+AC_DEFUN([KDE_CHECK_PERL],
+[
+ KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
+ AC_MSG_ERROR([No Perl found in your $PATH.
+We need perl to generate some code.])
+ ])
+ AC_SUBST(PERL)
+])
+
+AC_DEFUN([KDE_CHECK_LARGEFILE],
+[
+AC_SYS_LARGEFILE
+if test "$ac_cv_sys_file_offset_bits" != no; then
+ CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
+fi
+
+if test "x$ac_cv_sys_large_files" != "xno"; then
+ CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
+fi
+
+])
+
+dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
+dnl which allows to search for libs that get installed into the KDE prefix.
+dnl
+dnl Syntax: KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
+dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
+dnl also defines KSTUFF_PKG_ERRORS on error
+AC_DEFUN([KDE_PKG_CHECK_MODULES], [
+
+ PKG_CONFIG_PATH="$prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
+ if test "$prefix" != "$kde_libs_prefix"; then
+ PKG_CONFIG_PATH="$kde_libs_prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
+ fi
+ export PKG_CONFIG_PATH
+ PKG_CHECK_MODULES([$1],[$2],[$3],[$4])
+])
+
+
+dnl Check for PIE support in the compiler and linker
+AC_DEFUN([KDE_CHECK_PIE_SUPPORT],
+[
+ AC_CACHE_CHECK([for PIE support], kde_cv_val_pie_support,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ safe_CXXFLAGS=$CXXFLAGS
+ safe_LDFLAGS=$LDFLAGS
+ CXXFLAGS="$CXXFLAGS -fPIE"
+ LDFLAGS="$LDFLAGS -pie"
+
+ AC_TRY_LINK([int foo;], [], [kde_cv_val_pie_support=yes], [kde_cv_val_pie_support=no])
+
+ CXXFLAGS=$safe_CXXFLAGS
+ LDFLAGS=$safe_LDFLAGS
+ AC_LANG_RESTORE
+ ])
+
+ AC_MSG_CHECKING(if enabling -pie/fPIE support)
+
+ AC_ARG_ENABLE(pie,
+ AC_HELP_STRING([--enable-pie],[platform supports PIE linking [default=detect]]),
+ [kde_has_pie_support=$enableval],
+ [kde_has_pie_support=detect])
+
+ if test "$kde_has_pie_support" = "detect"; then
+ kde_has_pie_support=$kde_cv_val_pie_support
+ fi
+
+ AC_MSG_RESULT([$kde_has_pie_support])
+
+ KDE_USE_FPIE=""
+ KDE_USE_PIE=""
+
+ AC_SUBST([KDE_USE_FPIE])
+ AC_SUBST([KDE_USE_PIE])
+
+ if test "$kde_has_pie_support" = "yes"; then
+ KDE_USE_FPIE="-fPIE"
+ KDE_USE_PIE="-pie"
+ fi
+])
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+## Copyright 1996, 1997, 1998, 1999, 2000, 2001
+## Free Software Foundation, Inc.
+## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+##
+## As a special exception to the GNU General Public License, if you
+## distribute this file as part of a program that contains a
+## configuration script generated by Autoconf, you may include it under
+## the same distribution terms that you use for the rest of that program.
+
+# serial 47 AC_PROG_LIBTOOL
+
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+ [],
+ [m4_define([AC_PROVIDE_IFELSE],
+ [m4_ifdef([AC_PROVIDE_$1],
+ [$2], [$3])])])
+
+
+# AC_PROG_LIBTOOL
+# ---------------
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+ AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [AC_LIBTOOL_CXX],
+ [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+ ])])
+dnl And a similar setup for Fortran 77 support
+ AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [AC_LIBTOOL_F77],
+ [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [AC_LIBTOOL_GCJ],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [AC_LIBTOOL_GCJ],
+ [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+ [AC_LIBTOOL_GCJ],
+ [ifdef([AC_PROG_GCJ],
+ [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+ ifdef([A][M_PROG_GCJ],
+ [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+ ifdef([LT_AC_PROG_GCJ],
+ [define([LT_AC_PROG_GCJ],
+ defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])# _AC_PROG_LIBTOOL
+
+
+# AC_LIBTOOL_SETUP
+# ----------------
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
+
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+ ;;
+ *)
+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ AC_PATH_MAGIC
+ fi
+ ;;
+esac
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
+
+AC_ARG_ENABLE([libtool-lock],
+ [AC_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+AC_ARG_WITH([pic],
+ [AC_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
+
+
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
+
+
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+[_LT_AC_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+ ;;
+esac
+
+echo=${ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X[$]1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+[$]*
+EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+ echo_test_string="`eval $cmd`" &&
+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+ then
+ break
+ fi
+ done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ echo="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$echo" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ echo='print -r'
+ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ else
+ # Try using printf.
+ echo='printf %s\n'
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ echo="$CONFIG_SHELL [$]0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ echo="$CONFIG_SHELL [$]0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "[$]0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ echo=echo
+ fi
+ fi
+ fi
+ fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+ ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+])])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AC_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ LINUX_64_MODE="32"
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ LINUX_64_MODE="64"
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+ ])
+esac
+
+need_locks="$enable_libtool_lock"
+
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test ! -s conftest.err; then
+ $2=yes
+ fi
+ fi
+ $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ ifelse([$5], , :, [$5])
+else
+ ifelse([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ else
+ $2=yes
+ fi
+ fi
+ $rm conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ ifelse([$4], , :, [$4])
+else
+ ifelse([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ testring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ *)
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
+ = "XX$testring") >/dev/null 2>&1 &&
+ new_result=`expr "X$testring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ testring=$testring$testring
+ done
+ testring=
+ # Add a significant safety factor because C++ compilers can tack on massive
+ # amounts of additional arguments before passing them to the linker.
+ # It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# --------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
+
+
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+
+ exit (status);
+}]
+EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_unknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
+
+
+# AC_LIBTOOL_DLOPEN_SELF
+# -------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_AC_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ LDFLAGS="$LDFLAGS $link_static_flag"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_AC_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+])# AC_LIBTOOL_DLOPEN_SELF
+
+
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $rm -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+ # that will create temporary files in the current directory regardless of
+ # the output directory. Thus, making CWD read-only will cause this test
+ # to fail, enabling locking or at least warning the user not to do parallel
+ # builds.
+ chmod -w .
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test ! -s out/conftest.err; then
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w .
+ $rm conftest* out/*
+ rmdir out
+ cd ..
+ rmdir conftest
+ $rm conftest*
+])
+])# AC_LIBTOOL_PROG_CC_C_O
+
+
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
+# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
+
+hard_links="nottested"
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $rm conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+
+
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+])# AC_LIBTOOL_OBJDIR
+
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
+# Check hardcoding attributes.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+ test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
+ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
+
+ # We can hardcode non-existant directories.
+ if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_AC_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+])# AC_LIBTOOL_SYS_LIB_STRIP
+
+
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix4* | aix5*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi4*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32*)
+ version_type=windows
+ shrext=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $rm \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext='$(test .$module = .yes && echo .so || echo .dylib)'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+ else
+ sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+ fi
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+kfreebsd*-gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='GNU ld.so'
+ ;;
+
+freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ *) # from 3.2 on
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case "$host_cpu" in
+ ia64*)
+ shrext='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ libsuff=
+ if test "x$LINUX_64_MODE" = x64; then
+ # Some platforms are per default 64-bit, so there's no /lib64
+ if test -d /lib64; then
+ libsuff=64
+ fi
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+nto-qnx*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+openbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+sco3.2v5*)
+ version_type=osf
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_ARG_WITH([tags],
+ [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+ [include additional configurations @<:@automatic@:>@])],
+ [tagnames="$withval"])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+ if test ! -f "${ofile}"; then
+ AC_MSG_WARN([output file `$ofile' does not exist])
+ fi
+
+ if test -z "$LTCC"; then
+ eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+ if test -z "$LTCC"; then
+ AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+ else
+ AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+ fi
+ fi
+
+ # Extract list of available tagged configurations in $ofile.
+ # Note that this assumes the entire list is on one line.
+ available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for tagname in $tagnames; do
+ IFS="$lt_save_ifs"
+ # Check whether tagname contains only valid characters
+ case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+ "") ;;
+ *) AC_MSG_ERROR([invalid tag name: $tagname])
+ ;;
+ esac
+
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+ then
+ AC_MSG_ERROR([tag name \"$tagname\" already exists])
+ fi
+
+ # Update the list of available tags.
+ if test -n "$tagname"; then
+ echo appending configuration tag \"$tagname\" to $ofile
+
+ case $tagname in
+ CXX)
+ if test -n "$CXX" && test "X$CXX" != "Xno"; then
+ AC_LIBTOOL_LANG_CXX_CONFIG
+ else
+ tagname=""
+ fi
+ ;;
+
+ F77)
+ if test -n "$F77" && test "X$F77" != "Xno"; then
+ AC_LIBTOOL_LANG_F77_CONFIG
+ else
+ tagname=""
+ fi
+ ;;
+
+ GCJ)
+ if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+ AC_LIBTOOL_LANG_GCJ_CONFIG
+ else
+ tagname=""
+ fi
+ ;;
+
+ RC)
+ AC_LIBTOOL_LANG_RC_CONFIG
+ ;;
+
+ *)
+ AC_MSG_ERROR([Unsupported tag name: $tagname])
+ ;;
+ esac
+
+ # Append the new tag name to the list of available tags.
+ if test -n "$tagname" ; then
+ available_tags="$available_tags $tagname"
+ fi
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ # Now substitute the updated list of available tags.
+ if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+ mv "${ofile}T" "$ofile"
+ chmod +x "$ofile"
+ else
+ rm -f "${ofile}T"
+ AC_MSG_ERROR([unable to update list of available tagged configurations.])
+ fi
+fi
+])# _LT_AC_TAGCONFIG
+
+
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
+
+
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 dll's
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
+
+
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+ [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
+
+
+# AC_DISABLE_SHARED
+# -----------------
+#- set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)
+])# AC_DISABLE_SHARED
+
+
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+ [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
+
+
+# AC_DISABLE_STATIC
+# -----------------
+# set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)
+])# AC_DISABLE_STATIC
+
+
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+ [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
+
+
+# AC_DISABLE_FAST_INSTALL
+# -----------------------
+# set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)
+])# AC_DISABLE_FAST_INSTALL
+
+
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
+
+
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+ [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="ifelse([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+ [AC_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])# AC_PROG_LD
+
+
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+])# AC_PROG_LD_RELOAD_FLAG
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognise dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi4*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+mingw* | pw32*)
+ # win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='win32_libid'
+ ;;
+
+darwin* | rhapsody*)
+ # this will be overwritten by pass_all, but leave it in just in case
+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
+ ;;
+ *) # Darwin 1.3 on
+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+ ;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | kfreebsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case "$host_cpu" in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ irix5* | nonstopux*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
+ ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux*)
+ case $host_cpu in
+ alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
+ lt_cv_deplibs_check_method=pass_all ;;
+ # the debian people say, arm and glibc 2.3.1 works for them with pass_all
+ arm* )
+ lt_cv_deplibs_check_method=pass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+nto-qnx*)
+ lt_cv_deplibs_check_method=unknown
+ ;;
+
+openbsd*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
+ else
+ lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/${ac_tool_prefix}nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+])# AC_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
+# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
+# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
+# '${top_srcdir}/' (note the single quotes!). If your package is not
+# flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately in the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+ case $enable_ltdl_convenience in
+ no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+ "") enable_ltdl_convenience=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+ esac
+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+ LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+ # For backwards non-gettext consistent compatibility...
+ INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
+# DIRECTORY is not provided and an installed libltdl is not found, it is
+# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
+# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
+# quotes!). If your package is not flat and you're not using automake,
+# define top_builddir and top_srcdir appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+ AC_CHECK_LIB(ltdl, lt_dlinit,
+ [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+ [if test x"$enable_ltdl_install" = xno; then
+ AC_MSG_WARN([libltdl not installed, but installation disabled])
+ else
+ enable_ltdl_install=yes
+ fi
+ ])
+ if test x"$enable_ltdl_install" = x"yes"; then
+ ac_configure_args="$ac_configure_args --enable-ltdl-install"
+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+ LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+ else
+ ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+ LIBLTDL="-lltdl"
+ LTDLINCL=
+ fi
+ # For backwards non-gettext consistent compatibility...
+ INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
+
+
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
+
+
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
+
+
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
+
+
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+ [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+ [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+ [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+ [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# --------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
+
+
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+_LT_AC_SYS_COMPILER
+
+#
+# Check for any special shared library compilation flags.
+#
+_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
+if test "$GCC" = no; then
+ case $host_os in
+ sco3.2v5*)
+ _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
+ ;;
+ esac
+fi
+if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
+ AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
+ if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
+ else
+ AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
+ _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
+ fi
+fi
+
+
+#
+# Check to make sure the static flag actually works.
+#
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
+ _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+ $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
+ [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+# Report which librarie types wil actually be built
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+aix4*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ output_verbose_link_cmd='echo'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
+
+
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+
+# Source file extension for C++ test sources.
+ac_ext=cc
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+ unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+ unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+fi
+
+if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ AC_PROG_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+ grep 'no-whole-archive' > /dev/null; then
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # KDE requires run time linking. Make it the default.
+ aix_use_runtimelinking=yes
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_AC_TAGVAR(archive_cmds, $1)=''
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ else
+ # We have old collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='-qmkshrobj ${wl}-G'
+ else
+ shared_flag='-qmkshrobj'
+ fi
+ fi
+ fi
+
+ # Let the compiler handle the export list.
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+ lt_int_apple_cc_single_mod=yes
+ fi
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
+ fi
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ freebsd[12]*)
+ # C++ shared libraries reported to be fairly broken before switch to ELF
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ freebsd-elf*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+ freebsd* | kfreebsd*-gnu)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+ gnu*)
+ ;;
+ hpux9*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ ;;
+ *)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case "$host_cpu" in
+ hppa*64*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ *)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC)
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case "$host_cpu" in
+ ia64*|hppa*64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC)
+ # SGI C++
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+ fi
+ fi
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+ linux*)
+ case $cc_basename in
+ KCC)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc)
+ # Intel C++
+ with_gnu_ld=yes
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ cxx)
+ # Compaq C++
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ esac
+ ;;
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+ osf3*)
+ case $cc_basename in
+ KCC)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ osf4* | osf5*)
+ case $cc_basename in
+ KCC)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
+ $rm $lib.exp'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ sco*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The C++ compiler is used as linker so we must use $wl
+ # flag to pass the commands to the underlying system
+ # linker.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | grep -v '^2\.7' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+ fi
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ fi
+ ;;
+ esac
+ ;;
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+AC_LIBTOOL_POSTDEP_PREDEP($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+])# AC_LIBTOOL_LANG_CXX_CONFIG
+
+# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+# ------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+int a;
+void foo (void) { a = 0; }
+EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+EOF
+],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ # The `*' in the case matches for architectures that use `case' in
+ # $output_verbose_cmd can trigger glob expansion during the loop
+ # eval without this substitution.
+ output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+
+ for p in `eval $output_verbose_link_cmd`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" \
+ || test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+ _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext|*.$libext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+ _LT_AC_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+ _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$rm -f confest.$objext
+
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
+
+# AC_LIBTOOL_LANG_F77_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code=" subroutine t\n return\n end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code=" program t\n end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+aix4*)
+ test "$enable_shared" = yes && enable_static=no
+ ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_CONFIG
+
+
+# AC_LIBTOOL_LANG_GCJ_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_GCJ_CONFIG
+
+
+# AC_LIBTOOL_LANG_RC_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the Windows resource compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_RC_CONFIG
+
+
+# AC_LIBTOOL_CONFIG([TAGNAME])
+# ----------------------------
+# If TAGNAME is not passed, then create an initial libtool script
+# with a default configuration from the untagged config vars. Otherwise
+# add code to config.status for appending the configuration named by
+# TAGNAME from the matching tagged config vars.
+AC_DEFUN([AC_LIBTOOL_CONFIG],
+[# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+ # See if we are running on zsh, and set the options which allow our commands through
+ # without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+ # Now quote all the things that may contain metacharacters while being
+ # careful not to overquote the AC_SUBSTed values. We take copies of the
+ # variables and quote the copies for generation of the libtool script.
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
+ libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+ old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+ deplibs_check_method reload_flag reload_cmds need_locks \
+ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+ lt_cv_sys_global_symbol_to_c_name_address \
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+ old_postinstall_cmds old_postuninstall_cmds \
+ _LT_AC_TAGVAR(compiler, $1) \
+ _LT_AC_TAGVAR(CC, $1) \
+ _LT_AC_TAGVAR(LD, $1) \
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+ _LT_AC_TAGVAR(old_archive_cmds, $1) \
+ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+ _LT_AC_TAGVAR(predep_objects, $1) \
+ _LT_AC_TAGVAR(postdep_objects, $1) \
+ _LT_AC_TAGVAR(predeps, $1) \
+ _LT_AC_TAGVAR(postdeps, $1) \
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+ _LT_AC_TAGVAR(archive_cmds, $1) \
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+ _LT_AC_TAGVAR(postinstall_cmds, $1) \
+ _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+ _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+ _LT_AC_TAGVAR(no_undefined_flag, $1) \
+ _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+ _LT_AC_TAGVAR(hardcode_automatic, $1) \
+ _LT_AC_TAGVAR(module_cmds, $1) \
+ _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+ _LT_AC_TAGVAR(exclude_expsyms, $1) \
+ _LT_AC_TAGVAR(include_expsyms, $1); do
+
+ case $var in
+ _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+ _LT_AC_TAGVAR(archive_cmds, $1) | \
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+ _LT_AC_TAGVAR(module_cmds, $1) | \
+ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+ extract_expsyms_cmds | reload_cmds | finish_cmds | \
+ postinstall_cmds | postuninstall_cmds | \
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ # Double-quote double-evaled strings.
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+ ;;
+ *)
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+ ;;
+ esac
+ done
+
+ case $lt_echo in
+ *'\[$]0 --fallback-echo"')
+ lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
+ ;;
+ esac
+
+ifelse([$1], [],
+ [cfgfile="${ofile}T"
+ trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+ $rm -f "$cfgfile"
+ AC_MSG_NOTICE([creating $ofile])],
+ [cfgfile="$ofile"])
+
+ cat <<__EOF__ >> "$cfgfile"
+ifelse([$1], [],
+[#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG],
+[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
+
+# Is the compiler the GNU C compiler?
+with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext='$shrext'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
+
+# Symbols that must always be exported.
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
+
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
+
+__EOF__
+
+ifelse([$1],[], [
+ case $host_os in
+ aix3*)
+ cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+EOF
+ ;;
+ esac
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" || \
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+])
+else
+ # If there is no Makefile yet, we rely on a make rule to execute
+ # `config.status --recheck' to rerun these tests and create the
+ # libtool script then.
+ test -f Makefile && make "$ltmain"
+fi
+])# AC_LIBTOOL_CONFIG
+
+
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+ AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+
+
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*) # Its linker distinguishes data from code symbols
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+ lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris* | sysv5*)
+ symcode='[[BDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGISTW]]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Write the raw and C identifiers.
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if grep ' nm_test_var$' "$nlist" >/dev/null; then
+ if grep ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+ cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+ cat <<\EOF >> conftest.$ac_ext
+ {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | os2* | pw32*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix4* | aix5*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68)
+ # Green Hills C++ Compiler
+ # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | kfreebsd*-gnu)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux*)
+ case $cc_basename in
+ KCC)
+ # KAI C++ Compiler
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ icpc)
+ # Intel C++
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ cxx)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx)
+ # Digital/Compaq C++
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ sco*)
+ case $cc_basename in
+ CC)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.x
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc)
+ # Lucid
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC)
+ # NonStop-UX NCC 3.20
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ unixware*)
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+
+ beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ newsos6)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ linux*)
+ case $CC in
+ icc* | ecc*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ ccc*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ esac
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ sco3.2v5*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
+ ;;
+
+ solaris*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sunos4*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ uts4*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+ _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+ [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+case "$host_os" in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+])
+
+
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ifelse([$1],[CXX],[
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix4* | aix5*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw*)
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ *)
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+],[
+ runpath_var=
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_AC_TAGVAR(archive_cmds, $1)=
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+ _LT_AC_TAGVAR(module_cmds, $1)=
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_AC_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+ fi
+ ;;
+
+ amigaos*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sunos4*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
+ runpath_var=LD_RUN_PATH
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$link_static_flag"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ fi
+
+ # KDE requires run time linking. Make it the default.
+ aix_use_runtimelinking=yes
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_AC_TAGVAR(archive_cmds, $1)=''
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ else
+ # We have old collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='-qmkshrobj ${wl}-G'
+ else
+ shared_flag='-qmkshrobj'
+ fi
+ fi
+ fi
+
+ # Let the compiler handle the export list.
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ # see comment about different semantics on the GNU ld section
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ bsdi4*)
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ darwin* | rhapsody*)
+ if test "$GXX" = yes ; then
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+ lt_int_apple_cc_single_mod=yes
+ fi
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
+ fi
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ dgux*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ freebsd1*)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | kfreebsd*-gnu)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10* | hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
+ ;;
+ esac
+ else
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ *)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ openbsd*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+
+ os2*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ sco3.2v5*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ;;
+
+ solaris*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+ esac
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4.2uw2*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ hardcode_runpath_var=yes
+ runpath_var=LD_RUN_PATH
+ ;;
+
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
+ fi
+ runpath_var='LD_RUN_PATH'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv5*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+ ;;
+
+ uts4*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_AC_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+ $rm conftest*
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+ then
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $rm conftest*
+ AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+ ;;
+ esac
+ fi
+ ;;
+esac
+])# AC_LIBTOOL_PROG_LD_SHLIBS
+
+
+# _LT_AC_FILE_LTDLL_C
+# -------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# # ifdef __CYGWIN32__
+# # define __CYGWIN__ __CYGWIN32__
+# # endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+# __hDllInstance_base = hInst;
+# return TRUE;
+# }
+# /* ltdll.c ends here */
+])# _LT_AC_FILE_LTDLL_C
+
+
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+
+
+# old names
+AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
+
+# This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])
+
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)
+])
+
+AC_DEFUN([LT_AC_PROG_RC],
+[AC_CHECK_TOOL(RC, windres, no)
+])
+
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && break
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_MSG_RESULT([$SED])
+])
+
+dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
+dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
+dnl also defines GSTUFF_PKG_ERRORS on error
+AC_DEFUN([PKG_CHECK_MODULES], [
+ succeeded=no
+
+ if test -z "$PKG_CONFIG"; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ fi
+
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** The pkg-config script could not be found. Make sure it is"
+ echo "*** in your path, or set the PKG_CONFIG environment variable"
+ echo "*** to the full path to pkg-config."
+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+ else
+ PKG_CONFIG_MIN_VERSION=0.9.0
+ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+ AC_MSG_CHECKING(for $2)
+
+ if $PKG_CONFIG --exists "$2" ; then
+ AC_MSG_RESULT(yes)
+ succeeded=yes
+
+ AC_MSG_CHECKING($1_CFLAGS)
+ $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
+ AC_MSG_RESULT($$1_CFLAGS)
+
+ AC_MSG_CHECKING($1_LIBS)
+ $1_LIBS=`$PKG_CONFIG --libs "$2"`
+ AC_MSG_RESULT($$1_LIBS)
+ else
+ $1_CFLAGS=""
+ $1_LIBS=""
+ ## If we have a custom action on failure, don't print errors, but
+ ## do set a variable so people can do so.
+ $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ ifelse([$4], ,echo $$1_PKG_ERRORS,)
+ fi
+
+ AC_SUBST($1_CFLAGS)
+ AC_SUBST($1_LIBS)
+ else
+ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+ echo "*** See http://www.freedesktop.org/software/pkgconfig"
+ fi
+ fi
+
+ if test $succeeded = yes; then
+ ifelse([$3], , :, [$3])
+ else
+ ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
+ fi
+])
+
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..dd92cb3
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,863 @@
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.9.6])])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out. Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([acinclude.m4])
diff --git a/am_edit b/am_edit
new file mode 100644
index 0000000..0320926
--- /dev/null
+++ b/am_edit
@@ -0,0 +1,2015 @@
+#!/usr/bin/perl -w
+
+# Expands the specialised KDE tags in Makefile.in to (hopefully) valid
+# make syntax.
+# When called without file parameters, we work recursively on all Makefile.in
+# in and below the current subdirectory. When called with file parameters,
+# only those Makefile.in are changed.
+# The currently supported tags are
+#
+# {program}_METASOURCES
+# where you have a choice of two styles
+# {program}_METASOURCES = name1.moc name2.moc ... [\]
+# {program}_METASOURCES = AUTO
+# The second style requires other tags as well.
+#
+# To install icons :
+# KDE_ICON = iconname iconname2 ...
+# KDE_ICON = AUTO
+#
+# For documentation :
+# ...
+#
+# and more new tags TBD!
+#
+# The concept (and base code) for this program came from automoc,
+# supplied by the following
+#
+# Matthias Ettrich <ettrich@kde.org> (The originator)
+# Kalle Dalheimer <kalle@kde.org> (The original implementator)
+# Harri Porten <porten@tu-harburg.de>
+# Alex Zepeda <jazepeda@pacbell.net>
+# David Faure <faure@kde.org>
+# Stephan Kulow <coolo@kde.org>
+
+use Cwd;
+use File::Find;
+use File::Basename;
+
+# Prototype the functions
+sub initialise ();
+sub processMakefile ($);
+sub updateMakefile ();
+sub restoreMakefile ();
+
+sub removeLine ($$);
+sub appendLines ($);
+sub substituteLine ($$);
+
+sub findMocCandidates ();
+sub pruneMocCandidates ($);
+sub checkMocCandidates ();
+sub addMocRules ();
+
+sub tag_AUTOMAKE ();
+sub tag_META_INCLUDES ();
+sub tag_METASOURCES ();
+sub tag_POFILES ();
+sub tag_DOCFILES ();
+sub tag_LOCALINSTALL();
+sub tag_IDLFILES();
+sub tag_UIFILES();
+sub tag_SUBDIRS();
+sub tag_ICON();
+sub tag_CLOSURE();
+sub tag_DIST();
+
+# Some global globals...
+$verbose = 0; # a debug flag
+$thisProg = "$0"; # This programs name
+$topdir = cwd(); # The current directory
+@makefiles = (); # Contains all the files we'll process
+@foreignfiles = ();
+$start = (times)[0]; # some stats for testing - comment out for release
+$version = "v0.2";
+$errorflag = 0;
+$cppExt = "(cpp|cc|cxx|C|c\\+\\+)";
+$hExt = "(h|H|hh|hxx|hpp|h\\+\\+)";
+$progId = "KDE tags expanded automatically by " . basename($thisProg);
+$automkCall = "\n";
+$printname = ""; # used to display the directory the Makefile is in
+$use_final = 1; # create code for --enable-final
+$cleantarget = "clean";
+$dryrun = 0;
+$pathoption = 0;
+$foreign_libtool = 0;
+
+while (defined ($ARGV[0]))
+{
+ $_ = shift;
+ if (/^--version$/)
+ {
+ print STDOUT "\n";
+ print STDOUT basename($thisProg), " $version\n",
+ "This is really free software, unencumbered by the GPL.\n",
+ "You can do anything you like with it except sueing me.\n",
+ "Copyright 1998 Kalle Dalheimer <kalle\@kde.org>\n",
+ "Concept, design and unnecessary questions about perl\n",
+ " by Matthias Ettrich <ettrich\@kde.org>\n\n",
+ "Making it useful by Stephan Kulow <coolo\@kde.org> and\n",
+ "Harri Porten <porten\@kde.org>\n",
+ "Updated (Feb-1999), John Birch <jb.nz\@writeme.com>\n",
+ "Current Maintainer Stephan Kulow\n\n";
+ exit 0;
+ }
+ elsif (/^--verbose$|^-v$/)
+ {
+ $verbose = 1; # Oh is there a problem...?
+ }
+ elsif (/^-p(.+)$|^--path=(.+)$/)
+ {
+ $thisProg = "$1/".basename($thisProg) if($1);
+ $thisProg = "$2/".basename($thisProg) if($2);
+ warn ("$thisProg doesn't exist\n") if (!(-f $thisProg));
+ $pathoption=1;
+ }
+ elsif (/^--help$|^-h$/)
+ {
+ print STDOUT "Usage $thisProg [OPTION] ... [dir/Makefile.in]...\n",
+ "\n",
+ "Patches dir/Makefile.in generated by automake\n",
+ "(where dir can be an absolute or relative directory name)\n",
+ "\n",
+ " -v, --verbose verbosely list files processed\n",
+ " -h, --help print this help, then exit\n",
+ " --version print version number, then exit\n",
+ " -p, --path= use the path to am_edit if the path\n",
+ " called from is not the one to be used\n",
+ " --no-final don't patch for --enable-final\n";
+
+ exit 0;
+ }
+ elsif (/^--no-final$/)
+ {
+ $use_final = 0;
+ $thisProg .= " --no-final";
+ }
+ elsif (/^--foreign-libtool$/)
+ {
+ $foreign_libtool = 1;
+ $thisProg .= " --foreign-libtool";
+ }
+ elsif (/^-n$/)
+ {
+ $dryrun = 1;
+ }
+ else
+ {
+ # user selects what input files to check
+ # add full path if relative path is given
+ $_ = cwd()."/".$_ if (! /^\//);
+ print "User wants $_\n" if ($verbose);
+ push (@makefiles, $_);
+ }
+}
+
+if ($thisProg =~ /^\// && !$pathoption )
+{
+ print STDERR "Illegal full pathname call performed...\n",
+ "The call to \"$thisProg\"\nwould be inserted in some Makefile.in.\n",
+ "Please use option --path.\n";
+ exit 1;
+}
+
+# Only scan for files when the user hasn't entered data
+if (!@makefiles)
+{
+ print STDOUT "Scanning for Makefile.in\n" if ($verbose);
+ find (\&add_makefile, cwd());
+ #chdir('$topdir');
+} else {
+ print STDOUT "Using input files specified by user\n" if ($verbose);
+}
+
+foreach $makefile (sort(@makefiles))
+{
+ processMakefile ($makefile);
+ last if ($errorflag);
+}
+
+# Just some debug statistics - comment out for release as it uses printf.
+printf STDOUT "Time %.2f CPU sec\n", (times)[0] - $start if ($verbose);
+
+exit $errorflag; # causes make to fail if erroflag is set
+
+#-----------------------------------------------------------------------------
+
+# In conjunction with the "find" call, this builds the list of input files
+sub add_makefile ()
+{
+ push (@makefiles, $File::Find::name) if (/Makefile.in$/);
+}
+
+#-----------------------------------------------------------------------------
+
+# Processes a single make file
+# The parameter contains the full path name of the Makefile.in to use
+sub processMakefile ($)
+{
+ # some useful globals for the subroutines called here
+ local ($makefile) = @_;
+ local @headerdirs = ('.');
+ local $haveAutomocTag = 0;
+ local $MakefileData = "";
+
+ local $cxxsuffix = "KKK";
+
+ local @programs = (); # lists the names of programs and libraries
+ local $program = "";
+
+ local %realObjs = (); # lists the objects compiled into $program
+ local %sources = (); # lists the sources used for $program
+ local %finalObjs = (); # lists the objects compiled when final
+ local %realname = (); # the binary name of program variable
+ local %idlfiles = (); # lists the idl files used for $program
+ local %globalmocs = ();# list of all mocfiles (in %mocFiles format)
+ local %important = (); # list of files to be generated asap
+ local %uiFiles = ();
+
+ local $allidls = "";
+ local $idl_output = "";# lists all idl generated files for cleantarget
+ local $ui_output = "";# lists all uic generated files for cleantarget
+
+ local %depedmocs = ();
+
+ local $metasourceTags = 0;
+ local $dep_files = "";
+ local $dep_finals = "";
+ local %target_adds = (); # the targets to add
+ local $kdelang = "";
+ local @cleanfiles = ();
+ local $cleanMoc = "";
+ local $closure_output = "";
+
+ local %varcontent = ();
+
+ $makefileDir = dirname($makefile);
+ chdir ($makefileDir);
+ $printname = $makefile;
+ $printname =~ s/^\Q$topdir\E\///;
+ $makefile = basename($makefile);
+
+ print STDOUT "Processing makefile $printname\n" if ($verbose);
+
+ # Setup and see if we need to do this.
+ return if (!initialise());
+
+ tag_AUTOMAKE (); # Allows a "make" to redo the Makefile.in
+ tag_META_INCLUDES (); # Supplies directories for src locations
+
+ foreach $program (@programs) {
+ $sources_changed{$program} = 0;
+ $depedmocs{$program} = "";
+ $important{$program} = "";
+ tag_IDLFILES(); # Sorts out idl rules
+ tag_CLOSURE();
+ tag_UIFILES(); # Sorts out ui rules
+ tag_METASOURCES (); # Sorts out the moc rules
+ if ($sources_changed{$program}) {
+ my $lookup = "$program" . '_SOURCES\s*=\s*(.*)';
+ substituteLine($lookup, "$program\_SOURCES=" . $sources{$program});
+ }
+ if ($important{$program}) {
+ local %source_dict = ();
+ for $source (split(/[\034\s]+/, $sources{$program})) {
+ $source_dict{$source} = 1;
+ }
+ for $source (@cleanfiles) {
+ $source_dict{$source} = 0;
+ }
+ for $source (keys %source_dict) {
+ next if (!$source);
+ if ($source_dict{$source}) {
+ # sanity check
+ if (! -f $source) {
+ print STDERR "Error: $source is listed in a _SOURCE line in $printname, but doesn't exist yet. Put it in DISTCLEANFILES!\n";
+ } else {
+ $target_adds{"\$(srcdir)/$source"} .= $important{$program};
+ }
+ }
+ }
+ }
+ }
+ if ($cleanMoc) {
+ # Always add dist clean tag
+ # Add extra *.moc.cpp files created for USE_AUTOMOC because they
+ # aren't included in the normal *.moc clean rules.
+ appendLines ("$cleantarget-metasources:\n\t-rm -f $cleanMoc\n");
+ $target_adds{"$cleantarget-am"} .= "$cleantarget-metasources ";
+ }
+
+ tag_DIST() unless ($kdeopts{"noautodist"});
+
+ if ($idl_output) {
+ appendLines ("$cleantarget-idl:\n\t-rm -f $idl_output\n");
+ $target_adds{"$cleantarget-am"} .= "$cleantarget-idl ";
+ }
+
+ if ($ui_output) {
+ appendLines ("$cleantarget-ui:\n\t-rm -f $ui_output\n");
+ $target_adds{"$cleantarget-am"} .= "$cleantarget-ui ";
+ }
+
+ if ($closure_output) {
+ appendLines ("$cleantarget-closures:\n\t-rm -f $closure_output\n");
+ $target_adds{"$cleantarget-am"} .= "$cleantarget-closures ";
+ }
+
+ if ($MakefileData =~ /\nKDE_LANG\s*=\s*(\S*)\s*\n/) {
+ $kdelang = '$(KDE_LANG)'
+ } else {
+ $kdelang = '';
+ }
+
+ tag_POFILES (); # language rules for po directory
+ tag_DOCFILES (); # language rules for doc directories
+ tag_LOCALINSTALL(); # add $(DESTDIR) before all kde_ dirs
+ tag_ICON();
+ tag_SUBDIRS();
+
+ my $tmp = "force-reedit:\n";
+ $tmp .= "\t$automkCall\n\tcd \$(top_srcdir) && perl $thisProg $printname\n\n";
+ appendLines($tmp);
+
+ make_meta_classes();
+ tag_COMPILE_FIRST();
+ tag_FINAL() if (!$kdeopts{"nofinal"});
+
+ my $final_lines = "final:\n\t\$(MAKE) ";
+ my $final_install_lines = "final-install:\n\t\$(MAKE) ";
+ my $nofinal_lines = "no-final:\n\t\$(MAKE) ";
+ my $nofinal_install_lines = "no-final-install:\n\t\$(MAKE) ";
+
+ foreach $program (@programs) {
+
+ my $lookup = "$program\_OBJECTS.*=[^\n]*";
+
+ my $new = "";
+
+ my @list = split(/[\034\s]+/, $realObjs{$program});
+
+ if (!$kdeopts{"nofinal"} && @list > 1 && $finalObjs{$program}) {
+
+ $new .= "$program\_final\_OBJECTS = " . $finalObjs{$program};
+ $new .= "\n$program\_nofinal\_OBJECTS = " . $realObjs{$program};
+ $new .= "\n\@KDE_USE_FINAL_FALSE\@$program\_OBJECTS = \$($program\_nofinal\_OBJECTS)";
+ $new .= "\n\@KDE_USE_FINAL_TRUE\@$program\_OBJECTS = \$($program\_final\_OBJECTS)";
+
+ $final_lines .= "$program\_OBJECTS=\"\$($program\_final_OBJECTS)\" ";
+ $final_install_lines .= "$program\_OBJECTS=\"\$($program\_final_OBJECTS)\" ";
+ $nofinal_lines .= "$program\_OBJECTS=\"\$($program\_nofinal\_OBJECTS)\" ";
+ $nofinal_install_lines .= "$program\_OBJECTS=\"\$($program\_nofinal_OBJECTS)\" ";
+ } else {
+ $new = "$program\_OBJECTS = " . $realObjs{$program};
+ }
+ substituteLine ($lookup, $new);
+ }
+ appendLines($final_lines . "all-am");
+ appendLines($final_install_lines . "install-am");
+ appendLines($nofinal_lines . "all-am");
+ appendLines($nofinal_install_lines . "install-am");
+
+ my $lookup = 'DEP_FILES\s*=([^\n]*)';
+ if ($MakefileData =~ /\n$lookup\n/o) {
+ $depfiles = $1;
+
+ if ($dep_finals) {
+ $lines = "\@KDE_USE_FINAL_TRUE\@DEP_FILES = $dep_files $dep_finals \034\t$depfiles\n";
+ $lines .= "\@KDE_USE_FINAL_FALSE\@DEP_FILES = $dep_files $depfiles\n";
+ } else {
+ $lines = "DEP_FILES = $dep_files $depfiles\n";
+ }
+ substituteLine($lookup, $lines);
+ }
+
+ my $cvs_lines = "cvs-clean:\n";
+ $cvs_lines .= "\t\$(MAKE) admindir=\$(top_srcdir)/admin -f \$(top_srcdir)/admin/Makefile.common cvs-clean\n";
+ appendLines($cvs_lines);
+
+ $cvs_lines = "kde-rpo-clean:\n";
+ $cvs_lines .= "\t-rm -f *.rpo\n";
+ appendLines($cvs_lines);
+ $target_adds{"clean"} .= "kde-rpo-clean ";
+
+ my %target_dels = ("install-data-am" => "");
+
+ # some strange people like to do a install-exec, and expect that also
+ # all modules are installed. automake doesn't know this, so we need to move
+ # this here from install-data to install-exec.
+ if ($MakefileData =~ m/\nkde_module_LTLIBRARIES\s*=/) {
+ $target_adds{"install-exec-am"} .= "install-kde_moduleLTLIBRARIES ";
+ $target_dels{"install-data-am"} .= "install-kde_moduleLTLIBRARIES ";
+ $target_adds{"install-data-am"} .= " ";
+ }
+
+ my $lines = "";
+
+ foreach $add (keys %target_adds) {
+ my $lookup = quotemeta($add) . ':([^\n]*)';
+ if ($MakefileData =~ /\n$lookup\n/) {
+ my $newlines = $1;
+ my $oldlines = $lookup;
+ if (defined $target_dels{$add}) {
+ foreach $del (split(' ', $target_dels{$add})) {
+ $newlines =~ s/\s*$del\s*/ /g;
+ }
+ }
+ substituteLine($oldlines, "$add: " . $target_adds{$add} . $newlines);
+ } else {
+ $lines .= "$add: " . $target_adds{$add} . "\n";
+ }
+ }
+ if ($lines) {
+ appendLines($lines);
+ }
+
+ my $found = 1;
+
+ while ($found) {
+ if ($MakefileData =~ m/\n(.*)\$\(CXXFLAGS\)(.*)\n/) {
+ my $vor = $1; # "vor" means before in German
+ my $nach = $2; # "nach" means after in German
+ my $lookup = quotemeta("$1\$(CXXFLAGS)$2");
+ my $replacement = "$1\$(KCXXFLAGS)$2";
+ $MakefileData =~ s/$lookup/$replacement/;
+ $lookup =~ s/\\\$\\\(CXXFLAGS\\\)/\\\$\\\(KCXXFLAGS\\\)/;
+ $replacement = "$vor\$(KCXXFLAGS) \$(KDE_CXXFLAGS)$nach";
+ substituteLine($lookup, $replacement);
+ } else {
+ $found = 0;
+ }
+ }
+
+ if($foreign_libtool == 0) {
+ $lookup = '(\n[^#].*\$\(LIBTOOL\) --mode=link) (\$\(CXXLD\).*\$\(KCXXFLAGS\))';
+
+ if ($MakefileData =~ m/$lookup/ ) {
+ $MakefileData =~ s/$lookup/$1 --tag=CXX $2/;
+ }
+
+ $lookup = '(\n[^#].*\$\(LIBTOOL\) --mode=compile)\s+(\$\(CXX\)\s+)';
+ if ($MakefileData =~ m/$lookup/ ) {
+ $MakefileData =~ s/$lookup/$1 --tag=CXX $2/;
+ }
+ }
+
+ $MakefileData =~ s/\$\(KCXXFLAGS\)/\$\(CXXFLAGS\)/g;
+
+ $lookup = '(.*)cp -pr \$\$/\$\$file \$\(distdir\)/\$\$file(.*)';
+ if ($MakefileData =~ m/\n$lookup\n/) {
+ substituteLine($lookup, "$1cp -pr \$\$d/\$\$file \$(distdir)/\$\$file$2");
+ }
+
+ # Always update the Makefile.in
+ updateMakefile ();
+ return;
+}
+
+#-----------------------------------------------------------------------------
+
+# Beware: This procedure is not complete. E.g. it also parses lines
+# containing a '=' in rules (for instance setting shell vars). For our
+# usage this us enough, though.
+sub read_variables ()
+{
+ while ($MakefileData =~ /\n\s*(\S+)\s*=([^\n]*)/g) {
+ $varcontent{$1} = $2;
+ }
+}
+
+# Check to see whether we should process this make file.
+# This is where we look for tags that we need to process.
+# A small amount of initialising on the tags is also done here.
+# And of course we open and/or create the needed make files.
+sub initialise ()
+{
+ if (! -r "Makefile.am") {
+ print STDOUT "found Makefile.in without Makefile.am\n" if ($verbose);
+ return 0;
+ }
+
+ # Checking for files to process...
+ open (FILEIN, $makefile)
+ || die "Could not open $makefileDir/$makefile: $!\n";
+ # Read the file
+ # stat(FILEIN)[7] might look more elegant, but is slower as it
+ # requires stat'ing the file
+ seek(FILEIN, 0, 2);
+ my $fsize = tell(FILEIN);
+ seek(FILEIN, 0, 0);
+ read FILEIN, $MakefileData, $fsize;
+ close FILEIN;
+ print "DOS CRLF within $makefileDir/$makefile!\n" if($MakefileData =~ y/\r//d);
+
+ # Remove the line continuations, but keep them marked
+ # Note: we lose the trailing spaces but that's ok.
+ $MakefileData =~ s/\\\s*\n\s*/\034/g;
+
+ # If we've processed the file before...
+ restoreMakefile () if ($MakefileData =~ /$progId/);
+
+ foreach $dir (@foreignfiles) {
+ if (substr($makefileDir,0,length($dir)) eq $dir) {
+ return 0;
+ }
+ }
+
+ %kdeopts = ();
+ $kdeopts{"foreign"} = 0;
+ $kdeopts{"qtonly"} = 0;
+ $kdeopts{"noautodist"} = 0;
+ $kdeopts{"foreign-libtool"} = $foreign_libtool;
+ $kdeopts{"nofinal"} = !$use_final; # default
+
+ read_variables();
+
+ if ($MakefileData =~ /\nKDE_OPTIONS\s*=\s*([^\n]*)\n/) {
+ local @kde_options = split(/[\s\034]/, $1);
+ if (grep(/^foreign$/, @kde_options)) {
+ push(@foreignfiles, $makefileDir . "/");
+ return 0; # don't touch me
+ }
+ for $opt (@kde_options) {
+ if (!defined $kdeopts{$opt}) {
+ print STDERR "Warning: unknown option $opt in $printname\n";
+ } else {
+ $kdeopts{$opt} = 1;
+ }
+ }
+ }
+
+ # Look for the tags that mean we should process this file.
+ $metasourceTags = 0;
+ $metasourceTags++ while ($MakefileData =~ /\n[^=\#]*METASOURCES\s*=/g);
+
+ my $pofileTag = 0;
+ $pofileTag++ while ($MakefileData =~ /\nPOFILES\s*=/g);
+ if ($pofileTag > 1)
+ {
+ print STDERR "Error: Only one POFILES tag allowed\n";
+ $errorflag = 1;
+ }
+
+ while ($MakefileData =~ /\n\.SUFFIXES:([^\n]+)\n/g) {
+ my @list=split(' ', $1);
+ foreach $ext (@list) {
+ if ($ext =~ /^\.$cppExt$/) {
+ $cxxsuffix = $ext;
+ $cxxsuffix =~ s/\.//g;
+ print STDOUT "will use suffix $cxxsuffix\n" if ($verbose);
+ last;
+ }
+ }
+ }
+
+ while ($MakefileData =~ /\n(\S*)_OBJECTS\s*=[ \t\034]*([^\n]*)\n/g) {
+
+ my $program = $1;
+ my $objs = $2; # safe them
+
+ my $ocv = 0;
+
+ my @objlist = split(/[\s\034]+/, $objs);
+ foreach $obj (@objlist) {
+ if ($obj =~ /(\S*)\$\((\S+)\)/ ) {
+ my $pre = $1;
+ my $variable = $2;
+ if ($pre eq '' && exists($varcontent{$variable})) {
+ my @addlist = split(/[\s\034]+/, $varcontent{$variable});
+ push(@objlist, @addlist);
+ } elsif ($variable !~ 'OBJEXT') {
+ $ocv = 1;
+ }
+ }
+ }
+
+ next if ($ocv);
+
+ $program =~ s/^am_// if ($program =~ /^am_/);
+
+ my $sourceprogram = $program;
+ $sourceprogram =~ s/\@am_/\@/ if($sourceprogram =~ /^.*\@am_.+/);
+
+ print STDOUT "found program $program\n" if ($verbose);
+ push(@programs, $program);
+
+ $realObjs{$program} = $objs;
+
+ if ($MakefileData =~ /\n$sourceprogram\_SOURCES\s*=\s*(.*)\n/) {
+ $sources{$program} = $1;
+ }
+ else {
+ $sources{$program} = "";
+ print STDERR "found program with no _SOURCES: $program\n";
+ }
+
+ my $realprogram = $program;
+ $realprogram =~ s/_/\\./g; # unmask to regexp
+ if ($MakefileData =~ /\n($realprogram)(\$\(EXEEXT\)?)?:.*\$\($program\_OBJECTS\)/) {
+ $realname{$program} = $1;
+ } else {
+ # not standard Makefile - nothing to worry about
+ $realname{$program} = "";
+ }
+ }
+
+ my $lookup = '\nDEPDIR\s*=.*';
+ if ($MakefileData !~ /($lookup)\n/o) {
+ $lookup = '\nbindir\s*=.*';
+ if ($MakefileData =~ /($lookup)\n/) {
+ substituteLine ($lookup, "DEPDIR = .deps\n$1");
+ }
+ }
+
+ my @marks = ('MAINTAINERCLEANFILES', 'CLEANFILES', 'DISTCLEANFILES');
+ foreach $mark (@marks) {
+ while ($MakefileData =~ /\n($mark)\s*=\s*([^\n]*)/g) {
+ foreach $file (split('[\034\s]', $2)) {
+ $file =~ s/\.\///;
+ push(@cleanfiles, $file);
+ }
+ }
+ }
+
+ my $localTag = 0;
+ $localTag++ if ($MakefileData =~ /\ninstall-\S+-local:/);
+
+ return (!$errorflag);
+}
+
+#-----------------------------------------------------------------------------
+
+# Gets the list of user defined directories - relative to $srcdir - where
+# header files could be located.
+sub tag_META_INCLUDES ()
+{
+ my $lookup = '[^=\n]*META_INCLUDES\s*=\s*(.*)';
+ return 1 if ($MakefileData !~ /($lookup)\n/o);
+ print STDOUT "META_INCLUDE processing <$1>\n" if ($verbose);
+
+ my $headerStr = $2;
+ removeLine ($lookup, $1);
+
+ $headerStr =~ tr/\034/ /;
+ my @headerlist = split(' ', $headerStr);
+
+ foreach $dir (@headerlist)
+ {
+ $dir =~ s#\$\(srcdir\)#.#;
+ if (! -d $dir)
+ {
+ print STDERR "Warning: $dir can't be found. ",
+ "Must be a relative path to \$(srcdir)\n";
+ }
+ else
+ {
+ push (@headerdirs, $dir);
+ }
+ }
+
+ return 0;
+}
+
+#-----------------------------------------------------------------------------
+
+sub tag_FINAL()
+{
+ my @final_names = ();
+
+ foreach $program (@programs) {
+
+ if ($sources{$program} =~ /\(/) {
+ print STDOUT "found ( in $program\_SOURCES. skipping\n" if ($verbose);
+ next;
+ }
+
+ my $mocs = ""; # Moc files (in this program)
+ my $moc_cpp_added = 0; # If we added some .moc.cpp files, due to
+ # no other .cpp file including the .moc one.
+
+ my @progsources = split(/[\s\034]+/, $sources{$program});
+ my %shash = ();
+ @shash{@progsources} = 1; # we are only interested in the existence
+ my %sourcelist = ();
+
+ foreach $source (@progsources) {
+ my $suffix = $source;
+ $suffix =~ s/^.*\.([^\.]+)$/$1/;
+
+ $sourcelist{$suffix} .= $source . " ";
+ }
+ foreach my $mocFile (keys (%globalmocs))
+ {
+ my ($dir, $hFile, $cppFile) = split ("\035", $globalmocs{$mocFile}, 3);
+ if (defined ($cppFile)) {
+ $mocs .= " $mocFile.moc" if exists $shash{$cppFile};
+ } else {
+ $sourcelist{$cxxsuffix} .= $mocFile . ".moc." . $cxxsuffix;
+ $moc_cpp_added = 1;
+ }
+ }
+ foreach $suffix (keys %sourcelist) {
+
+ # See if this file contains c++ code. (i.e., just check the file's suffix against c++ extensions)
+ my $suffix_is_cxx = 0;
+ if($suffix =~ /($cppExt)$/) {
+ $cxxsuffix = $1;
+ $suffix_is_cxx = 1;
+ }
+
+ my $mocfiles_in = ($suffix eq $cxxsuffix) && $moc_cpp_added;
+
+ my @sourcelist = split(/[\s\034]+/, $sourcelist{$suffix});
+
+ if ((@sourcelist == 1 && !$mocfiles_in) || $suffix_is_cxx != 1 ) {
+
+ # we support IDL on our own
+ if ($suffix eq "skel" || $suffix =~ /^stub/ || $suffix =~ /^signals/
+ || $suffix eq "h" || $suffix eq "ui" ) {
+ next;
+ }
+
+ foreach $file (@sourcelist) {
+
+ $file =~ s/\Q$suffix\E$//;
+
+ $finalObjs{$program} .= $file;
+ if ($program =~ /_la$/) {
+ $finalObjs{$program} .= "lo ";
+ } else {
+ $finalObjs{$program} .= "o ";
+ }
+ }
+ next; # suffix
+ }
+
+ my $source_deps = "";
+ foreach $source (@sourcelist) {
+ if (-f $source) {
+ $source_deps .= " \$(srcdir)/$source";
+ } else {
+ $source_deps .= " $source";
+ }
+ }
+
+ $handling = "$program.all_$suffix.$suffix: \$(srcdir)/Makefile.in" . $source_deps . " " . join(' ', $mocs) . "\n";
+ $handling .= "\t\@echo 'creating $program.all_$suffix.$suffix ...'; \\\n";
+ $handling .= "\trm -f $program.all_$suffix.files $program.all_$suffix.final; \\\n";
+ $handling .= "\techo \"#define KDE_USE_FINAL 1\" >> $program.all_$suffix.final; \\\n";
+ $handling .= "\tfor file in " . $sourcelist{$suffix} . "; do \\\n";
+ $handling .= "\t echo \"#include \\\"\$\$file\\\"\" >> $program.all_$suffix.files; \\\n";
+ $handling .= "\t test ! -f \$\(srcdir\)/\$\$file || egrep '^#pragma +implementation' \$\(srcdir\)/\$\$file >> $program.all_$suffix.final; \\\n";
+ $handling .= "\tdone; \\\n";
+ $handling .= "\tcat $program.all_$suffix.final $program.all_$suffix.files > $program.all_$suffix.$suffix; \\\n";
+ $handling .= "\trm -f $program.all_$suffix.final $program.all_$suffix.files\n";
+
+ appendLines($handling);
+
+ push(@final_names, "$program.all_$suffix.$suffix");
+ my $finalObj = "$program.all_$suffix.";
+ if ($program =~ /_la$/) {
+ $finalObj .= "lo";
+ } else {
+ $finalObj .= "o";
+ }
+ $finalObjs{$program} .= $finalObj . " ";
+ }
+ }
+
+ if (!$kdeopts{"nofinal"} && @final_names >= 1) {
+ # add clean-final target
+ my $lines = "$cleantarget-final:\n";
+ $lines .= "\t-rm -f " . join(' ', @final_names) . "\n" if (@final_names);
+ appendLines($lines);
+ $target_adds{"$cleantarget-am"} .= "$cleantarget-final ";
+
+ foreach $finalfile (@final_names) {
+ $finalfile =~ s/\.[^.]*$/.P/;
+ $dep_finals .= " \$(DEPDIR)/$finalfile";
+ }
+ }
+}
+
+#-----------------------------------------------------------------------------
+
+sub tag_COMPILE_FIRST()
+{
+ foreach $program (@programs) {
+ my $lookup = "$program" . '_COMPILE_FIRST\s*=\s*(.*)';
+ if ($MakefileData =~ m/\n$lookup\n/) {
+ my @compilefirst = split(/[\s\034]+/, $1);
+ my @progsources = split(/[\s\034]+/, $sources{$program});
+ my %donesources = ();
+ $handling = "";
+ foreach $source (@progsources) {
+ my @deps = ();
+ my $sdeps = "";
+ if (-f $source) {
+ $sdeps = "\$(srcdir)/$source";
+ } else {
+ $sdeps = "$source";
+ }
+ foreach $depend (@compilefirst) {
+ next if ($source eq $depend);
+ # avoid cyclic dependencies
+ next if defined($donesources{$depend});
+ push @deps, $depend;
+ }
+ $handling .= "$sdeps: " . join(' ', @deps) . "\n" if (@deps);
+ $donesources{$source} = 1;
+ }
+ appendLines($handling) if (length($handling));
+ }
+ }
+}
+
+#-----------------------------------------------------------------------------
+
+
+# Organises the list of headers that we'll use to produce moc files
+# from.
+sub tag_METASOURCES ()
+{
+ local @newObs = (); # here we add to create object files
+ local @deped = (); # here we add to create moc files
+ local $mocExt = ".moc";
+ local %mocFiles = ();
+
+ my $line = "";
+ my $postEqual = "";
+
+ my $lookup;
+ my $found = "";
+#print "$program: tag_METASOURCES\n";
+ if ($metasourceTags > 1) {
+ $lookup = $program . '_METASOURCES\s*=\s*(.*)';
+ return 1 if ($MakefileData !~ /\n($lookup)\n/);
+ $found = $1;
+ } else {
+ $lookup = $program . '_METASOURCES\s*=\s*(.*)';
+ if ($MakefileData !~ /\n($lookup)\n/) {
+ $lookup = 'METASOURCES\s*=\s*(.*)';
+ return 1 if ($MakefileData !~ /\n($lookup)\n/o);
+ $found = $1;
+ $metasourceTags = 0; # we can use the general target only once
+ } else {
+ $found = $1;
+ }
+ }
+ print STDOUT "METASOURCE processing <$found>)\n" if ($verbose);
+
+ $postEqual = $found;
+ $postEqual =~ s/[^=]*=//;
+
+ removeLine ($lookup, $found);
+
+ # Always find the header files that could be used to "moc"
+ return 1 if (findMocCandidates ());
+
+ if ($postEqual =~ /AUTO\s*(\S*)|USE_AUTOMOC\s*(\S*)/)
+ {
+ print STDERR "$printname: the argument for AUTO|USE_AUTOMOC is obsolete" if ($+);
+ $mocExt = ".moc.$cxxsuffix";
+ $haveAutomocTag = 1;
+ }
+ else
+ {
+ # Not automoc so read the list of files supplied which
+ # should be .moc files.
+
+ $postEqual =~ tr/\034/ /;
+
+ # prune out extra headers - This also checks to make sure that
+ # the list is valid.
+ pruneMocCandidates ($postEqual);
+ }
+
+ checkMocCandidates ();
+
+ if (@newObs) {
+ my $ext = ($program =~ /_la$/) ? ".moc.lo " : ".moc.o ";
+ $realObjs{$program} .= "\034" . join ($ext, @newObs) . $ext;
+ $depedmocs{$program} = join (".moc.$cxxsuffix " , @newObs) . ".moc.$cxxsuffix";
+ foreach $file (@newObs) {
+ $dep_files .= " \$(DEPDIR)/$file.moc.P" if($dep_files !~/$file.moc.P/);
+ }
+ }
+ if (@deped) {
+ $depedmocs{$program} .= " ";
+ $depedmocs{$program} .= join('.moc ', @deped) . ".moc";
+ $depedmocs{$program} .= " ";
+ }
+ addMocRules ();
+ @globalmocs{keys %mocFiles}=values %mocFiles;
+}
+
+#-----------------------------------------------------------------------------
+
+# Returns 0 if the line was processed - 1 otherwise.
+# Errors are logged in the global $errorflags
+sub tag_AUTOMAKE ()
+{
+ my $lookup = '.*cd \$\(top_srcdir\)\s+&&[\s\034]+\$\(AUTOMAKE\)(.*)';
+ return 1 if ($MakefileData !~ /\n($lookup)\n/);
+ print STDOUT "AUTOMAKE processing <$1>\n" if ($verbose);
+
+ my $newLine = $1."\n\tcd \$(top_srcdir) && perl $thisProg $printname";
+ substituteLine ($lookup, $newLine);
+ $automkCall = $1;
+ return 0;
+}
+
+#-----------------------------------------------------------------------------
+
+sub handle_TOPLEVEL()
+{
+ my $pofiles = "";
+ my @restfiles = ();
+ opendir (THISDIR, ".");
+ foreach $entry (readdir(THISDIR)) {
+ next if (-d $entry);
+
+ next if ($entry eq "CVS" || $entry =~ /^\./ || $entry =~ /^Makefile/ || $entry =~ /~$/ || $entry =~ /^\#.*\#$/ || $entry =~ /.gmo$/);
+
+ if ($entry =~ /\.po$/) {
+ next;
+ }
+ push(@restfiles, $entry);
+ }
+ closedir (THISDIR);
+
+ if (@restfiles) {
+ $target_adds{"install-data-am"} .= "install-nls-files ";
+ $lines = "install-nls-files:\n";
+ $lines .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_locale)/$kdelang\n";
+ for $file (@restfiles) {
+ $lines .= "\t\$(INSTALL_DATA) \$\(srcdir\)/$file \$(DESTDIR)\$(kde_locale)/$kdelang/$file\n";
+ }
+ $target_adds{"uninstall"} .= "uninstall-nls-files ";
+ $lines .= "uninstall-nls-files:\n";
+ for $file (@restfiles) {
+ $lines .= "\t-rm -f \$(DESTDIR)\$(kde_locale)/$kdelang/$file\n";
+ }
+ appendLines($lines);
+ }
+
+ return 0;
+}
+
+#-----------------------------------------------------------------------------
+
+sub tag_SUBDIRS ()
+{
+ if ($MakefileData !~ /\nSUBDIRS\s*=\s*\$\(AUTODIRS\)\s*\n/) {
+ return 1;
+ }
+
+ my $subdirs = ".";
+
+ opendir (THISDIR, ".");
+ foreach $entry (readdir(THISDIR)) {
+ next if ($entry eq "CVS" || $entry =~ /^\./);
+ if (-d $entry && -f $entry . "/Makefile.am") {
+ $subdirs .= " $entry";
+ next;
+ }
+ }
+ closedir (THISDIR);
+
+ my $lines = "SUBDIRS =$subdirs\n";
+ substituteLine('SUBDIRS\s*=.*', $lines);
+ return 0;
+}
+
+sub tag_IDLFILES ()
+{
+ my @psources = split(/[\034\s]+/, $sources{$program});
+ my $dep_lines = "";
+ my @cppFiles = ();
+
+ foreach $source (@psources) {
+
+ my $skel = ($source =~ m/\.skel$/);
+ my $stub = ($source =~ m/\.stub$/);
+ my $signals = ($source =~ m/\.signals$/);
+
+ if ($stub || $skel || $signals) {
+
+ my $qs = quotemeta($source);
+ $sources{$program} =~ s/$qs//;
+ $sources_changed{$program} = 1;
+
+ print STDOUT "adding IDL file $source\n" if ($verbose);
+
+ $source =~ s/\.(stub|skel|signals)$//;
+
+ my $sourcename;
+
+ if ($skel) {
+ $sourcename = "$source\_skel";
+ } elsif ($stub) {
+ $sourcename = "$source\_stub";
+ } else {
+ $sourcename = "$source\_signals";
+ }
+
+ my $sourcedir = '';
+ if (-f "$makefileDir/$source.h") {
+ $sourcedir = '$(srcdir)/';
+ } else {
+ if ($MakefileData =~ /\n$source\_DIR\s*=\s*(\S+)\n/) {
+ $sourcedir = $1;
+ $sourcedir .= "/" if ($sourcedir !~ /\/$/);
+ }
+ }
+
+ if ($allidls !~ /$source\_kidl/) {
+
+ $dep_lines .= "$source.kidl: $sourcedir$source.h \$(DCOP_DEPENDENCIES)\n";
+ $dep_lines .= "\t\$(DCOPIDL) $sourcedir$source.h > $source.kidl || ( rm -f $source.kidl ; /bin/false )\n";
+
+ $allidls .= $source . "_kidl ";
+ }
+
+ if ($allidls !~ /$sourcename/) {
+
+ $dep_lines_tmp = "";
+
+ if ($skel) {
+ $dep_lines .= "$sourcename.$cxxsuffix: $source.kidl\n";
+ $dep_lines .= "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-signals --no-stub $source.kidl\n";
+ } elsif ($stub) {
+ $dep_lines_tmp = "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-signals --no-skel $source.kidl\n";
+ } else { # signals
+ $dep_lines_tmp = "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-stub --no-skel $source.kidl\n";
+ }
+
+ if ($stub || $signals) {
+ $target_adds{"$sourcename.$cxxsuffix"} .= "$sourcename.h ";
+ $dep_lines .= "$sourcename.h: $source.kidl\n";
+ $dep_lines .= $dep_lines_tmp;
+ }
+
+ $allidls .= $sourcename . " ";
+ }
+
+ $idlfiles{$program} .= $sourcename . " ";
+
+ if ($program =~ /_la$/) {
+ $realObjs{$program} .= " $sourcename.lo";
+ } else {
+ $realObjs{$program} .= " $sourcename.\$(OBJEXT)";
+ }
+ $sources{$program} .= " $sourcename.$cxxsuffix";
+ $sources_changed{$program} = 1;
+ $important{$program} .= "$sourcename.h " if (!$skel);
+ $idl_output .= "\\\n\t$sourcename.$cxxsuffix $sourcename.h $source.kidl ";
+ push(@cleanfiles, "$sourcename.$cxxsuffix");
+ push(@cleanfiles, "$sourcename.h");
+ push(@cleanfiles, "$sourcename.kidl");
+ $dep_files .= " \$(DEPDIR)/$sourcename.P" if ($dep_files !~/$sourcename.P/);
+ }
+ }
+ if ($dep_lines) {
+ appendLines($dep_lines);
+ }
+
+ if (0) {
+ my $lookup = "($program)";
+ $lookup .= '(|\$\(EXEEXT\))';
+ $lookup =~ s/\_/./g;
+ $lookup .= ":(.*..$program\_OBJECTS..*)";
+ # $lookup = quotemeta($lookup);
+ if ($MakefileData =~ /\n$lookup\n/) {
+
+ my $line = "$1$2: ";
+ foreach $file (split(' ', $idlfiles{$program})) {
+ $line .= "$file.$cxxsuffix ";
+ }
+ $line .= $3;
+ substituteLine($lookup, $line);
+ } else {
+ print STDERR "no built dependency found $lookup\n";
+ }
+ }
+}
+
+sub tag_UIFILES ()
+{
+ my @psources = split(/[\034\s]+/, $sources{$program});
+ my $dep_lines = "";
+ my @depFiles = ();
+
+ foreach $source (@psources) {
+
+ if ($source =~ m/\.ui$/) {
+
+ print STDERR "adding UI file $source\n" if ($verbose);
+
+ my $qs = quotemeta($source);
+ $sources{$program} =~ s/$qs//;
+ $sources_changed{$program} = 1;
+
+ $source =~ s/\.ui$//;
+
+ my $sourcedir = '';
+ if (-f "$makefileDir/$source.ui") {
+ $sourcedir = '$(srcdir)/';
+ }
+
+ if (!$uiFiles{$source}) {
+
+ $dep_lines .= "$source.$cxxsuffix: $sourcedir$source.ui $source.h $source.moc\n";
+ $dep_lines .= "\trm -f $source.$cxxsuffix\n";
+ if (!$kdeopts{"qtonly"}) {
+ $dep_lines .= "\techo '#include <klocale.h>' > $source.$cxxsuffix\n";
+ my ($mangled_source) = $source;
+ $mangled_source =~ s/[^A-Za-z0-9]/_/g; # get rid of garbage
+ $dep_lines .= "\t\$(UIC) -tr \${UIC_TR} -i $source.h $sourcedir$source.ui | sed -e \"s,\${UIC_TR}( \\\"\\\" ),QString::null,g\" | sed -e \"s,\${UIC_TR}( \\\"\\\"\\, \\\"\\\" ),QString::null,g\" | sed -e \"s,image\\([0-9][0-9]*\\)_data,img\\1_" . $mangled_source . ",g\" >> $source.$cxxsuffix || rm -f $source.$cxxsuffix\n";
+ } else {
+ $dep_lines .= "\t\$(UIC) -i $source.h $sourcedir$source.ui > $source.$cxxsuffix || rm -f $source.$cxxsuffix\n";
+ }
+ $dep_lines .= "\techo '#include \"$source.moc\"' >> $source.$cxxsuffix\n\n";
+ $dep_lines .= "$source.h: $sourcedir$source.ui\n";
+ $dep_lines .= "\t\$(UIC) -o $source.h $sourcedir$source.ui\n\n";
+ $dep_lines .= "$source.moc: $source.h\n";
+ $dep_lines .= "\t\$(MOC) $source.h -o $source.moc\n";
+
+ $uiFiles{$source} = 1;
+ $depedmocs{$program} .= " $source.moc";
+ $globalmocs{$source} = "\035$source.h\035$source.cpp";
+ }
+
+ if ($program =~ /_la$/) {
+ $realObjs{$program} .= " $source.lo";
+ } else {
+ $realObjs{$program} .= " $source.\$(OBJEXT)";
+ }
+ $sources{$program} .= " $source.$cxxsuffix";
+ $sources_changed{$program} = 1;
+ $important{$program} .= "$source.h ";
+ $ui_output .= "\\\n\t$source.$cxxsuffix $source.h $source.moc ";
+ push(@cleanfiles, "$source.$cxxsuffix");
+ push(@cleanfiles, "source.h");
+ push(@cleanfiles, "$source.moc");
+ $dep_files .= " \$(DEPDIR)/$source.P" if($dep_files !~/$source.P/ );
+ }
+ }
+ if ($dep_lines) {
+ appendLines($dep_lines);
+ }
+}
+
+sub tag_ICON()
+{
+ my $lookup = '([^\s]*)_ICON\s*=\s*([^\n]*)';
+ my $install = "";
+ my $uninstall = "";
+
+ while ($MakefileData =~ /\n$lookup/og) {
+ my $destdir;
+ if ($1 eq "KDE") {
+ $destdir = "kde_icondir";
+ } else {
+ $destdir = $1 . "dir";
+ }
+ my $iconauto = ($2 =~ /AUTO\s*$/);
+ my @appnames = ();
+ if ( ! $iconauto ) {
+ my @_appnames = split(" ", $2);
+ print STDOUT "KDE_ICON processing <@_appnames>\n" if ($verbose);
+ foreach $appname (@_appnames) {
+ push(@appnames, quotemeta($appname));
+ }
+ } else {
+ print STDOUT "KDE_ICON processing <AUTO>\n" if ($verbose);
+ }
+
+ my @files = ();
+ opendir (THISDIR, ".");
+ foreach $entry (readdir(THISDIR)) {
+ next if ($entry eq "CVS" || $entry =~ /^\./ || $entry =~ /^Makefile/ || $entry =~ /~$/ || $entry =~ /^\#.*\#$/);
+ next if (! -f $entry);
+ if ( $iconauto )
+ {
+ push(@files, $entry)
+ if ($entry =~ /\.xpm/ || $entry =~ /\.png/ || $entry =~ /\.mng/);
+ } else {
+ foreach $appname (@appnames) {
+ push(@files, $entry)
+ if ($entry =~ /-$appname\.xpm/ || $entry =~ /-$appname\.png/ || $entry =~ /-$appname\.mng/);
+ }
+ }
+ }
+ closedir (THISDIR);
+
+ my %directories = ();
+
+ foreach $file (@files) {
+ my $newfile = $file;
+ my $prefix = $file;
+ $prefix =~ s/\.(png|xpm|mng)$//;
+ my $appname = $prefix;
+ $appname =~ s/^[^-]+-// if ($appname =~ /-/) ;
+ $appname =~ s/^[^-]+-// if ($appname =~ /-/) ;
+ $appname = quotemeta($appname);
+ $prefix =~ s/$appname$//;
+ $prefix =~ s/-$//;
+
+ $prefix = 'lo16-app' if ($prefix eq 'mini');
+ $prefix = 'lo32-app' if ($prefix eq 'lo');
+ $prefix = 'hi48-app' if ($prefix eq 'large');
+ $prefix .= '-app' if ($prefix =~ m/^...$/);
+
+ my $type = $prefix;
+ $type =~ s/^.*-([^-]+)$/$1/;
+ $prefix =~ s/^(.*)-[^-]+$/$1/;
+
+ my %type_hash =
+ (
+ 'action' => 'actions',
+ 'app' => 'apps',
+ 'device' => 'devices',
+ 'filesys' => 'filesystems',
+ 'mime' => 'mimetypes'
+ );
+
+ if (! defined $type_hash{$type} ) {
+ print STDERR "unknown icon type $type in $printname ($file)\n";
+ next;
+ }
+
+ my %dir_hash =
+ (
+ 'los' => 'locolor/16x16',
+ 'lom' => 'locolor/32x32',
+ 'him' => 'hicolor/32x32',
+ 'hil' => 'hicolor/48x48',
+ 'lo16' => 'locolor/16x16',
+ 'lo22' => 'locolor/22x22',
+ 'lo32' => 'locolor/32x32',
+ 'hi16' => 'hicolor/16x16',
+ 'hi22' => 'hicolor/22x22',
+ 'hi32' => 'hicolor/32x32',
+ 'hi48' => 'hicolor/48x48',
+ 'hi64' => 'hicolor/64x64',
+ 'hisc' => 'hicolor/scalable'
+ );
+
+ $newfile =~ s@.*-($appname\.(png|xpm|mng?))@$1@;
+
+ if (! defined $dir_hash{$prefix}) {
+ print STDERR "unknown icon prefix $prefix in $printname\n";
+ next;
+ }
+
+ my $dir = $dir_hash{$prefix} . "/" . $type_hash{$type};
+ if ($newfile =~ /-[^\.]/) {
+ my $tmp = $newfile;
+ $tmp =~ s/^([^-]+)-.*$/$1/;
+ $dir = $dir . "/" . $tmp;
+ $newfile =~ s/^[^-]+-//;
+ }
+
+ if (!defined $directories{$dir}) {
+ $install .= "\t\$(mkinstalldirs) \$(DESTDIR)\$($destdir)/$dir\n";
+ $directories{$dir} = 1;
+ }
+
+ $install .= "\t\$(INSTALL_DATA) \$(srcdir)/$file \$(DESTDIR)\$($destdir)/$dir/$newfile\n";
+ $uninstall .= "\t-rm -f \$(DESTDIR)\$($destdir)/$dir/$newfile\n";
+
+ }
+ }
+
+ if (length($install)) {
+ $target_adds{"install-data-am"} .= "install-kde-icons ";
+ $target_adds{"uninstall-am"} .= "uninstall-kde-icons ";
+ appendLines("install-kde-icons:\n" . $install . "\nuninstall-kde-icons:\n" . $uninstall);
+ }
+}
+
+sub handle_POFILES($$)
+{
+ my @pofiles = split(" ", $_[0]);
+ my $lang = $_[1];
+
+ # Build rules for creating the gmo files
+ my $tmp = "";
+ my $allgmofiles = "";
+ my $pofileLine = "POFILES =";
+ foreach $pofile (@pofiles)
+ {
+ $pofile =~ /(.*)\.[^\.]*$/; # Find name minus extension
+ $tmp .= "$1.gmo: $pofile\n";
+ $tmp .= "\trm -f $1.gmo; \$(GMSGFMT) -o $1.gmo \$(srcdir)/$pofile\n";
+ $tmp .= "\ttest ! -f $1.gmo || touch $1.gmo\n";
+ $allgmofiles .= " $1.gmo";
+ $pofileLine .= " $1.po";
+ }
+ appendLines ($tmp);
+ my $lookup = 'POFILES\s*=([^\n]*)';
+ if ($MakefileData !~ /\n$lookup/o) {
+ appendLines("$pofileLine\nGMOFILES =$allgmofiles");
+ } else {
+ substituteLine ($lookup, "$pofileLine\nGMOFILES =$allgmofiles");
+ }
+
+ if ($allgmofiles) {
+
+ # Add the "clean" rule so that the maintainer-clean does something
+ appendLines ("clean-nls:\n\t-rm -f $allgmofiles\n");
+
+ $target_adds{"maintainer-clean"} .= "clean-nls ";
+
+ $lookup = 'DISTFILES\s*=\s*(.*)';
+ if ($MakefileData =~ /\n$lookup\n/o) {
+ $tmp = "DISTFILES = \$(GMOFILES) \$(POFILES) $1";
+ substituteLine ($lookup, $tmp);
+ }
+ }
+
+ $target_adds{"install-data-am"} .= "install-nls ";
+
+ $tmp = "install-nls:\n";
+ if ($lang) {
+ $tmp .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES\n";
+ }
+ $tmp .= "\t\@for base in ";
+ foreach $pofile (@pofiles)
+ {
+ $pofile =~ /(.*)\.[^\.]*$/; # Find name minus extension
+ $tmp .= "$1 ";
+ }
+
+ $tmp .= "; do \\\n";
+ if ($lang) {
+ $tmp .= "\t echo \$(INSTALL_DATA) \$\$base.gmo \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES/\$\$base.mo ;\\\n";
+ $tmp .= "\t test ! -f \$\$base.gmo || \$(INSTALL_DATA) \$\$base.gmo \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES/\$\$base.mo ;\\\n"
+ } else {
+ $tmp .= "\t echo \$(INSTALL_DATA) \$\$base.gmo \$(DESTDIR)\$(kde_locale)/\$\$base/LC_MESSAGES/\$(PACKAGE).mo ;\\\n";
+ $tmp .= "\t \$(mkinstalldirs) \$(DESTDIR)\$(kde_locale)/\$\$base/LC_MESSAGES ; \\\n";
+ $tmp .= "\t test ! -f \$\$base.gmo || \$(INSTALL_DATA) \$\$base.gmo \$(DESTDIR)\$(kde_locale)/\$\$base/LC_MESSAGES/\$(PACKAGE).mo ;\\\n";
+ }
+ $tmp .= "\tdone\n\n";
+ appendLines ($tmp);
+
+ $target_adds{"uninstall"} .= "uninstall-nls ";
+
+ $tmp = "uninstall-nls:\n";
+ foreach $pofile (@pofiles)
+ {
+ $pofile =~ /(.*)\.[^\.]*$/; # Find name minus extension
+ if ($lang) {
+ $tmp .= "\trm -f \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES/$1.mo\n";
+ } else {
+ $tmp .= "\trm -f \$(DESTDIR)\$(kde_locale)/$1/LC_MESSAGES/\$(PACKAGE).mo\n";
+ }
+ }
+ appendLines($tmp);
+
+ $target_adds{"all"} .= "all-nls ";
+
+ $tmp = "all-nls: \$(GMOFILES)\n";
+
+ appendLines($tmp);
+
+ $target_adds{"distdir"} .= "distdir-nls ";
+
+ $tmp = "distdir-nls:\$(GMOFILES)\n";
+ $tmp .= "\tfor file in \$(POFILES); do \\\n";
+ $tmp .= "\t cp \$(srcdir)/\$\$file \$(distdir); \\\n";
+ $tmp .= "\tdone\n";
+ $tmp .= "\tfor file in \$(GMOFILES); do \\\n";
+ $tmp .= "\t cp \$(srcdir)/\$\$file \$(distdir); \\\n";
+ $tmp .= "\tdone\n";
+
+ appendLines ($tmp);
+
+ if (!$lang) {
+ appendLines("merge:\n\t\$(MAKE) -f \$(top_srcdir)/admin/Makefile.common package-merge POFILES=\"\${POFILES}\" PACKAGE=\${PACKAGE}\n\n");
+ }
+
+}
+
+#-----------------------------------------------------------------------------
+
+# Returns 0 if the line was processed - 1 otherwise.
+# Errors are logged in the global $errorflags
+sub tag_POFILES ()
+{
+ my $lookup = 'POFILES\s*=([^\n]*)';
+ return 1 if ($MakefileData !~ /\n$lookup/o);
+ print STDOUT "POFILES processing <$1>\n" if ($verbose);
+
+ my $tmp = $1;
+
+ # make sure these are all gone.
+ if ($MakefileData =~ /\n\.po\.gmo:\n/)
+ {
+ print STDERR "Warning: Found old .po.gmo rules in $printname. New po rules not added\n";
+ return 1;
+ }
+
+ # Either find the pofiles in the directory (AUTO) or use
+ # only the specified po files.
+ my $pofiles = "";
+ if ($tmp =~ /^\s*AUTO\s*$/)
+ {
+ opendir (THISDIR, ".");
+ $pofiles = join(" ", grep(/\.po$/, readdir(THISDIR)));
+ closedir (THISDIR);
+ print STDOUT "pofiles found = $pofiles\n" if ($verbose);
+ if (-f "charset" && -f "kdelibs.po") {
+ handle_TOPLEVEL();
+ }
+ }
+ else
+ {
+ $tmp =~ s/\034/ /g;
+ $pofiles = $tmp;
+ }
+ return 1 if (!$pofiles); # Nothing to do
+
+ handle_POFILES($pofiles, $kdelang);
+
+ return 0;
+}
+
+sub helper_LOCALINSTALL($)
+{
+ my $lookup = "\n" . $_[0] . ":";
+ if ($MakefileData =~ /($lookup)/) {
+
+ my $install = $MakefileData;
+ $install =~ s/\n/\035/g;
+ $install =~ s/.*\035$_[0]:[^\035]*\035//;
+ my $emptyline = 0;
+ while (! $emptyline) {
+ if ($install =~ /([^\035]*)\035(.*)/) {
+ local $line = $1;
+ $install = $2;
+ if ($line !~ /^\s*$/ && $line !~ /^(\@.*\@)*\t/) {
+ $emptyline = 1;
+ } else {
+ replaceDestDir($line);
+ }
+ } else {
+ $emptyline = 1;
+ }
+ }
+ }
+
+}
+
+sub tag_LOCALINSTALL ()
+{
+ helper_LOCALINSTALL('install-exec-local');
+ helper_LOCALINSTALL('install-data-local');
+ helper_LOCALINSTALL('uninstall-local');
+
+ return 0;
+}
+
+sub replaceDestDir($) {
+ local $line = $_[0];
+
+ if ( $line =~ /^\s*(\@.*\@)*\s*\$\(mkinstalldirs\)/
+ || $line =~ /^\s*(\@.*\@)*\s*\$\(INSTALL\S*\)/
+ || $line =~ /^\s*(\@.*\@)*\s*(-?rm.*) \S*$/)
+ {
+ $line =~ s/^(.*) ([^\s]+)\s*$/$1 \$(DESTDIR)$2/ if ($line !~ /\$\(DESTDIR\)/);
+ }
+
+ if ($line ne $_[0]) {
+ $_[0] = quotemeta $_[0];
+ substituteLine($_[0], $line);
+ }
+}
+
+#---------------------------------------------------------------------------
+sub tag_CLOSURE () {
+ return if ($program !~ /_la$/);
+
+ my $lookup = quotemeta($realname{$program}) . ":.*?\n\t.*?\\((.*?)\\) .*\n";
+ $MakefileData =~ m/$lookup/;
+ return if ($1 !~ /CXXLINK/);
+
+ if ($MakefileData !~ /\n$program\_LDFLAGS\s*=.*-no-undefined/ &&
+ $MakefileData !~ /\n$program\_LDFLAGS\s*=.*KDE_PLUGIN/ ) {
+ print STDERR "Report: $program contains undefined in $printname\n" if ($program =~ /^lib/ && $dryrun);
+ return;
+ }
+ my $closure = $realname{$program} . ".closure";
+ my $lines = "$closure: \$($program\_OBJECTS) \$($program\_DEPENDENCIES)\n";
+ $lines .= "\t\@echo \"int main() {return 0;}\" > $program\_closure.$cxxsuffix\n";
+ $lines .= "\t\@\$\(LTCXXCOMPILE\) -c $program\_closure.$cxxsuffix\n";
+ $lines .= "\t\$\(CXXLINK\) $program\_closure.lo \$($program\_LDFLAGS) \$($program\_OBJECTS) \$($program\_LIBADD) \$(LIBS)\n";
+ $lines .= "\t\@rm -f $program\_closure.* $closure\n";
+ $lines .= "\t\@echo \"timestamp\" > $closure\n";
+ $lines .= "\n";
+ appendLines($lines);
+ $lookup = $realname{$program} . ": (.*)";
+ if ($MakefileData =~ /\n$lookup\n/) {
+ $lines = "\@KDE_USE_CLOSURE_TRUE@". $realname{$program} . ": $closure $1";
+ $lines .= "\n\@KDE_USE_CLOSURE_FALSE@" . $realname{$program} . ": $1";
+ substituteLine($lookup, $lines);
+ }
+ $closure_output .= " $closure";
+}
+
+sub tag_DIST () {
+ my %foundfiles = ();
+ opendir (THISDIR, ".");
+ foreach $entry (readdir(THISDIR)) {
+ next if ($entry eq "CVS" || $entry =~ /^\./ || $entry eq "Makefile" || $entry =~ /~$/ || $entry =~ /^\#.*\#$/);
+ next if (! -f $entry);
+ next if ($entry =~ /\.moc/ || $entry =~ /\.moc.$cppExt$/ || $entry =~ /\.lo$/ || $entry =~ /\.la$/ || $entry =~ /\.o/);
+ next if ($entry =~ /.+meta_unload.$cppExt$/ || $entry =~ /\.all_$cppExt\.$cppExt$/);
+ $foundfiles{$entry} = 1;
+ }
+ closedir (THISDIR);
+
+ # doing this for MAINTAINERCLEANFILES would be wrong
+ my @marks = ("EXTRA_DIST", "DIST_COMMON", '\S*_SOURCES', '\S*_HEADERS', 'CLEANFILES', 'DISTCLEANFILES', '\S*_OBJECTS');
+ foreach $mark (@marks) {
+ while ($MakefileData =~ /\n($mark)\s*=\s*([^\n]*)/g) {
+ foreach $file (split('[\034\s]', $2)) {
+ $file =~ s/\.\///;
+ $foundfiles{$file} = 0 if (defined $foundfiles{$file});
+ }
+ }
+ }
+ my @files = ("Makefile", "config.cache", "config.log", "stamp-h",
+ "stamp-h1", "stamp-h1", "config.h", "Makefile",
+ "config.status", "config.h", "libtool", "core" );
+ foreach $file (@files) {
+ $foundfiles{$file} = 0 if (defined $foundfiles{$file});
+ }
+
+ my $KDE_DIST = "";
+ foreach $file (keys %foundfiles) {
+ if ($foundfiles{$file} == 1) {
+ $KDE_DIST .= "$file ";
+ }
+ }
+ if ($KDE_DIST) {
+ print "KDE_DIST $printname $KDE_DIST\n" if ($verbose);
+
+ my $lookup = "DISTFILES *=(.*)";
+ if ($MakefileData =~ /\n$lookup\n/o) {
+ substituteLine($lookup, "KDE_DIST=$KDE_DIST\n\nDISTFILES=$1 \$(KDE_DIST)\n");
+ }
+ }
+}
+
+#-----------------------------------------------------------------------------
+# Returns 0 if the line was processed - 1 otherwise.
+# Errors are logged in the global $errorflags
+sub tag_DOCFILES ()
+{
+ $target_adds{"all"} .= "docs-am ";
+
+ my $lookup = 'KDE_DOCS\s*=\s*([^\n]*)';
+ goto nodocs if ($MakefileData !~ /\n$lookup/o);
+ print STDOUT "KDE_DOCS processing <$1>\n" if ($verbose);
+
+ my $tmp = $1;
+
+ # Either find the files in the directory (AUTO) or use
+ # only the specified po files.
+ my $files = "";
+ my $appname = $tmp;
+ $appname =~ s/^(\S*)\s*.*$/$1/;
+ if ($appname =~ /AUTO/) {
+ $appname = basename($makefileDir);
+ if ("$appname" eq "en") {
+ print STDERR "Error: KDE_DOCS = AUTO relies on the directory name. Yours is 'en' - you most likely want something else, e.g. KDE_DOCS = myapp\n";
+ exit(1);
+ }
+ }
+
+ if ($tmp !~ / - /)
+ {
+ opendir (THISDIR, ".");
+ foreach $entry (readdir(THISDIR)) {
+ next if ($entry eq "CVS" || $entry =~ /^\./ || $entry =~ /^Makefile/ || $entry =~ /~$/ || $entry =~ /^\#.*\#$/);
+ next if (! -f $entry);
+ $files .= "$entry ";
+ }
+ closedir (THISDIR);
+ print STDOUT "docfiles found = $files\n" if ($verbose);
+ }
+ else
+ {
+ $tmp =~ s/\034/ /g;
+ $tmp =~ s/^\S*\s*-\s*//;
+ $files = $tmp;
+ }
+ goto nodocs if (!$files); # Nothing to do
+
+ if ($files =~ /(^| )index\.docbook($| )/) {
+
+ my $lines = "";
+ my $lookup = 'MEINPROC\s*=';
+ if ($MakefileData !~ /\n($lookup)/) {
+ $lines = "MEINPROC=/\$(kde_bindir)/meinproc\n";
+ }
+ $lookup = 'KDE_XSL_STYLESHEET\s*=';
+ if ($MakefileData !~ /\n($lookup)/) {
+ $lines .= "KDE_XSL_STYLESHEET=/\$(kde_datadir)/ksgmltools2/customization/kde-chunk.xsl\n";
+ }
+ $lookup = '\nindex.cache.bz2:';
+ if ($MakefileData !~ /\n($lookup)/) {
+ $lines .= "index.cache.bz2: \$(srcdir)/index.docbook \$(KDE_XSL_STYLESHEET) $files\n";
+ $lines .= "\t\@if test -n \"\$(MEINPROC)\"; then echo \$(MEINPROC) --check --cache index.cache.bz2 \$(srcdir)/index.docbook; \$(MEINPROC) --check --cache index.cache.bz2 \$(srcdir)/index.docbook; fi\n";
+ $lines .= "\n";
+ }
+
+ $lines .= "docs-am: index.cache.bz2\n";
+ $lines .= "\n";
+ $lines .= "install-docs: docs-am install-nls\n";
+ $lines .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname\n";
+ $lines .= "\t\@if test -f index.cache.bz2; then \\\n";
+ $lines .= "\techo \$(INSTALL_DATA) index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n";
+ $lines .= "\t\$(INSTALL_DATA) index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n";
+ $lines .= "\tfi\n";
+ $lines .= "\t-rm -f \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n";
+ $lines .= "\t\$(LN_S) \$(kde_libs_htmldir)/$kdelang/common \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n";
+
+ $lines .= "\n";
+ $lines .= "uninstall-docs:\n";
+ $lines .= "\t-rm -rf \$(kde_htmldir)/$kdelang/$appname\n";
+ $lines .= "\n";
+ $lines .= "clean-docs:\n";
+ $lines .= "\t-rm -f index.cache.bz2\n";
+ $lines .= "\n";
+ $target_adds{"install-data-am"} .= "install-docs ";
+ $target_adds{"uninstall"} .= "uninstall-docs ";
+ $target_adds{"clean-am"} .= "clean-docs ";
+ appendLines ($lines);
+ } else {
+ appendLines("docs-am: $files\n");
+ }
+
+ $target_adds{"install-data-am"} .= "install-nls ";
+ $target_adds{"uninstall"} .= "uninstall-nls ";
+
+ $tmp = "install-nls:\n";
+ $tmp .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname\n";
+ $tmp .= "\t\@for base in $files; do \\\n";
+ $tmp .= "\t echo \$(INSTALL_DATA) \$\$base \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$base ;\\\n";
+ $tmp .= "\t \$(INSTALL_DATA) \$(srcdir)/\$\$base \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$base ;\\\n";
+ $tmp .= "\tdone\n";
+ if ($appname eq 'common') {
+ $tmp .= "\t\@echo \"merging common and language specific dir\" ;\\\n";
+ $tmp .= "\tif test ! -f \$(kde_htmldir)/en/common/kde-common.css; then echo 'no english docs found in \$(kde_htmldir)/en/common/'; exit 1; fi \n";
+ $tmp .= "\t\@com_files=`cd \$(kde_htmldir)/en/common && echo *` ;\\\n";
+ $tmp .= "\tcd \$(DESTDIR)\$(kde_htmldir)/$kdelang/common ;\\\n";
+ $tmp .= "\tif test -n \"\$\$com_files\"; then for p in \$\$com_files ; do \\\n";
+ $tmp .= "\t case \" $files \" in \\\n";
+ $tmp .= "\t *\" \$\$p \"*) ;; \\\n";
+ $tmp .= "\t *) test ! -f \$\$p && echo \$(LN_S) ../../en/common/\$\$p \$(DESTDIR)\$(kde_htmldir)/$kdelang/common/\$\$p && \$(LN_S) ../../en/common/\$\$p \$\$p ;; \\\n";
+ $tmp .= "\t esac ; \\\n";
+ $tmp .= "\tdone ; fi ; true\n";
+ }
+ $tmp .= "\n";
+ $tmp .= "uninstall-nls:\n";
+ $tmp .= "\tfor base in $files; do \\\n";
+ $tmp .= "\t rm -f \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$base ;\\\n";
+ $tmp .= "\tdone\n\n";
+ appendLines ($tmp);
+
+ $target_adds{"distdir"} .= "distdir-nls ";
+
+ $tmp = "distdir-nls:\n";
+ $tmp .= "\tfor file in $files; do \\\n";
+ $tmp .= "\t cp \$(srcdir)/\$\$file \$(distdir); \\\n";
+ $tmp .= "\tdone\n";
+
+ appendLines ($tmp);
+
+ return 0;
+
+ nodocs:
+ appendLines("docs-am:\n");
+ return 1;
+}
+
+#-----------------------------------------------------------------------------
+# Find headers in any of the source directories specified previously, that
+# are candidates for "moc-ing".
+sub findMocCandidates ()
+{
+ foreach $dir (@headerdirs)
+ {
+ my @list = ();
+ opendir (SRCDIR, "$dir");
+ @hFiles = grep { /.+\.$hExt$/o && !/^\./ } readdir(SRCDIR);
+ closedir SRCDIR;
+ foreach $hf (@hFiles)
+ {
+ next if ($hf =~ /^\.\#/);
+ $hf =~ /(.*)\.[^\.]*$/; # Find name minus extension
+ next if ($uiFiles{$1});
+ open (HFIN, "$dir/$hf") || die "Could not open $dir/$hf: $!\n";
+ my $hfsize = 0;
+ seek(HFIN, 0, 2);
+ $hfsize = tell(HFIN);
+ seek(HFIN, 0, 0);
+ read HFIN, $hfData, $hfsize;
+ close HFIN;
+ # push (@list, $hf) if(index($hfData, "Q_OBJECT") >= 0); ### fast but doesn't handle //Q_OBJECT
+ if ( $hfData =~ /{([^}]*)Q_OBJECT/s ) { ## handle " { friend class blah; Q_OBJECT "
+ push (@list, $hf) unless $1 =~ m://[^\n]*Q_OBJECT[^\n]*$:s; ## handle "// Q_OBJECT"
+ }
+ }
+ # The assoc array of root of headerfile and header filename
+ foreach $hFile (@list)
+ {
+ $hFile =~ /(.*)\.[^\.]*$/; # Find name minus extension
+ if ($mocFiles{$1})
+ {
+ print STDERR "Warning: Multiple header files found for $1\n";
+ next; # Use the first one
+ }
+ $mocFiles{$1} = "$dir\035$hFile"; # Add relative dir
+ }
+ }
+
+ return 0;
+}
+
+#-----------------------------------------------------------------------------
+
+# The programmer has specified a moc list. Prune out the moc candidates
+# list that we found based on looking at the header files. This generates
+# a warning if the programmer gets the list wrong, but this doesn't have
+# to be fatal here.
+sub pruneMocCandidates ($)
+{
+ my %prunedMoc = ();
+ local @mocList = split(' ', $_[0]);
+
+ foreach $mocname (@mocList)
+ {
+ $mocname =~ s/\.moc$//;
+ if ($mocFiles{$mocname})
+ {
+ $prunedMoc{$mocname} = $mocFiles{$mocname};
+ }
+ else
+ {
+ my $print = $makefileDir;
+ $print =~ s/^\Q$topdir\E\\//;
+ # They specified a moc file but we can't find a header that
+ # will generate this moc file. That's possible fatal!
+ print STDERR "Warning: No moc-able header file for $print/$mocname\n";
+ }
+ }
+
+ undef %mocFiles;
+ %mocFiles = %prunedMoc;
+}
+
+#-----------------------------------------------------------------------------
+
+# Finds the cpp files (If they exist).
+# The cpp files get appended to the header file separated by \035
+sub checkMocCandidates ()
+{
+ my @cppFiles;
+ my $cpp2moc; # which c++ file includes which .moc files
+ my $moc2cpp; # which moc file is included by which c++ files
+
+ return unless (keys %mocFiles);
+ opendir(THISDIR, ".") || return;
+ @cppFiles = grep { /.+\.$cppExt$/o && !/.+\.moc\.$cppExt$/o
+ && !/.+\.all_$cppExt\.$cppExt$/o
+ && !/^\./ } readdir(THISDIR);
+ closedir THISDIR;
+ return unless (@cppFiles);
+ my $files = join (" ", @cppFiles);
+ $cpp2moc = {};
+ $moc2cpp = {};
+ foreach $cxxf (@cppFiles)
+ {
+ open (CXXFIN, $cxxf) || die "Could not open $cxxf: $!\n";
+ seek(CXXFIN, 0, 2);
+ my $cxxfsize = tell(CXXFIN);
+ seek(CXXFIN, 0, 0);
+ read CXXFIN, $cxxfData, $cxxfsize;
+ close CXXFIN;
+ while(($cxxfData =~ m/^[ \t]*\#include\s*[<\"](.*\.moc)[>\"]/gm)) {
+ $cpp2moc->{$cxxf}->{$1} = 1;
+ $moc2cpp->{$1}->{$cxxf} = 1;
+ }
+ }
+ foreach my $mocFile (keys (%mocFiles))
+ {
+ @cppFiles = keys %{$moc2cpp->{"$mocFile.moc"}};
+ if (@cppFiles == 1) {
+ $mocFiles{$mocFile} .= "\035" . $cppFiles[0];
+ push(@deped, $mocFile);
+ } elsif (@cppFiles == 0) {
+ push (@newObs, $mocFile); # Produce new object file
+ next if ($haveAutomocTag); # This is expected...
+ # But this is an error we can deal with - let them know
+ print STDERR
+ "Warning: No c++ file that includes $mocFile.moc\n";
+ } else {
+ # We can't decide which file to use, so it's fatal. Although as a
+ # guess we could use the mocFile.cpp file if it's in the list???
+ print STDERR
+ "Error: Multiple c++ files that include $mocFile.moc\n";
+ print STDERR "\t",join ("\t", @cppFiles),"\n";
+ $errorflag = 1;
+ delete $mocFiles{$mocFile};
+ # Let's continue and see what happens - They have been told!
+ }
+ }
+}
+
+#-----------------------------------------------------------------------------
+
+# Add the rules for generating moc source from header files
+# For Automoc output *.moc.cpp but normally we'll output *.moc
+# (We must compile *.moc.cpp separately. *.moc files are included
+# in the appropriate *.cpp file by the programmer)
+sub addMocRules ()
+{
+ my $cppFile;
+ my $hFile;
+
+ foreach $mocFile (keys (%mocFiles))
+ {
+ undef $cppFile;
+ ($dir, $hFile, $cppFile) = split ("\035", $mocFiles{$mocFile}, 3);
+ $dir =~ s#^\.#\$(srcdir)#;
+ if (defined ($cppFile))
+ {
+ $cppFile =~ s,\.[^.]*$,,;
+ $target_adds{"$cppFile.o"} .= "$mocFile.moc ";
+ $target_adds{"$cppFile.lo"} .= "$mocFile.moc ";
+ appendLines ("$mocFile.moc: $dir/$hFile\n\t\$(MOC) $dir/$hFile -o $mocFile.moc\n");
+ $cleanMoc .= " $mocFile.moc";
+ }
+ else
+ {
+ appendLines ("$mocFile$mocExt: $dir/$hFile\n\t\$(MOC) $dir/$hFile -o $mocFile$mocExt\n");
+ $cleanMoc .= " $mocFile$mocExt";
+ }
+ }
+}
+
+sub make_meta_classes ()
+{
+ return if ($kdeopts{"qtonly"});
+
+ my $cppFile;
+ my $hFile;
+ my $moc_class_headers = "";
+ foreach $program (@programs) {
+ my $mocs = "";
+ my @progsources = split(/[\s\034]+/, $sources{$program});
+ my @depmocs = split(' ', $depedmocs{$program});
+ my %shash = (), %mhash = ();
+ @shash{@progsources} = 1; # we are only interested in the existence
+ @mhash{@depmocs} = 1;
+
+ print STDOUT "program=$program\n" if ($verbose);
+ print STDOUT "psources=[".join(' ', keys %shash)."]\n" if ($verbose);
+ print STDOUT "depmocs=[".join(' ', keys %mhash)."]\n" if ($verbose);
+ print STDOUT "globalmocs=[".join(' ', keys(%globalmocs))."]\n" if ($verbose);
+ foreach my $mocFile (keys (%globalmocs))
+ {
+ my ($dir, $hFile, $cppFile) = split ("\035", $globalmocs{$mocFile}, 3);
+ if (defined ($cppFile))
+ {
+ $mocs .= " $mocFile.moc" if exists $shash{$cppFile};
+ }
+ else
+ {
+ # Bah. This is the case, if no C++ file includes the .moc
+ # file. We make a .moc.cpp file for that. Unfortunately this
+ # is not included in the %sources hash, but rather is mentioned
+ # in %depedmocs. If the user wants to use AUTO he can't just
+ # use an unspecific METAINCLUDES. Instead he must use
+ # program_METAINCLUDES. Anyway, it's not working real nicely.
+ # E.g. Its not clear what happens if user specifies two
+ # METAINCLUDES=AUTO in the same Makefile.am.
+ $mocs .= " $mocFile.moc.$cxxsuffix"
+ if exists $mhash{$mocFile.".moc.$cxxsuffix"};
+ }
+ }
+ if ($mocs) {
+ print STDOUT "==> mocs=[".$mocs."]\n" if ($verbose);
+ my $sourcename = $program."_meta_unload";
+ my $ext = ($program =~ /_la$/) ? ".lo" : ".o";
+ my $srcfile = $sourcename.".$cxxsuffix";
+ my $objfile = $sourcename.$ext;
+ $moc_class_headers .= " $srcfile";
+ my $appl;
+ $appl = "$srcfile: $mocs\n";
+ $appl .= "\t\@echo 'creating $srcfile'\n";
+ $appl .= "\t\@-rm -f $srcfile\n";
+ $appl .= "\t\@if test \${kde_qtver} = 2; then \\\n";
+ $appl .= "\t\techo 'static const char * _metalist_$program\[\] = {' > $srcfile ;\\\n";
+ $appl .= "\t\tcat $mocs | grep 'char.*className' | ";
+ $appl .= "sed -e 's/.*[^A-Za-z0-9_:]\\([A-Za-z0-9_:]*\\)::className.*\$\$/\\\"\\1\\\",/' | sort | uniq >> $srcfile ;\\\n";
+ $appl .= "\t\techo '0};' >> $srcfile ;\\\n";
+ $appl .= "\t\techo '#include <kunload.h>' >> $srcfile ;\\\n";
+ $appl .= "\t\techo '_UNLOAD($program)' >> $srcfile ;\\\n";
+ $appl .= "\telse echo > $srcfile; fi\n";
+ $appl .= "\n";
+
+ $realObjs{$program} .= " \034" . $objfile . " ";
+ $sources{$program} .= " $srcfile";
+ $sources_changed{$program} = 1;
+ $dep_files .= " \$(DEPDIR)/$sourcename.P" if($dep_files !~/$sourcename\.P/);
+ appendLines ($appl);
+ }
+ print STDOUT "\n" if $verbose;
+ }
+ if ($moc_class_headers) {
+ appendLines ("$cleantarget-moc-classes:\n\t-rm -f $moc_class_headers\n");
+ $target_adds{"$cleantarget-am"} .= "$cleantarget-moc-classes ";
+ }
+}
+
+#-----------------------------------------------------------------------------
+
+sub updateMakefile ()
+{
+ return if ($dryrun);
+
+ open (FILEOUT, "> $makefile")
+ || die "Could not create $makefile: $!\n";
+
+ $MakefileData =~ s/\034/\\\n\t/g; # Restore continuation lines
+ # Append our $progId line, _below_ the "generated by automake" line
+ # because automake-1.6 relies on the first line to be his own.
+ my $progIdLine = "\# $progId - " . '$Revision: 16 $ '."\n";
+ if ( !( $MakefileData =~ s/^(.*generated .*by automake.*\n)/$1$progIdLine/ ) ) {
+ warn "automake line not found in $makefile\n";
+ # Fallback: first line
+ print FILEOUT $progIdLine;
+ };
+ print FILEOUT $MakefileData;
+ close FILEOUT;
+}
+
+#-----------------------------------------------------------------------------
+
+# The given line needs to be removed from the makefile
+# Do this by adding the special "removed line" comment at the line start.
+sub removeLine ($$)
+{
+ my ($lookup, $old) = @_;
+
+ $old =~ s/\034/\\\n#>- /g; # Fix continuation lines
+ $MakefileData =~ s/\n$lookup/\n#>\- $old/;
+}
+
+#-----------------------------------------------------------------------------
+
+# Replaces the old line with the new line
+# old line(s) are retained but tagged as removed. The new line(s) have the
+# "added" tag placed before it.
+sub substituteLine ($$)
+{
+ my ($lookup, $new) = @_;
+
+ if ($MakefileData =~ /\n($lookup)/) {
+ $old = $1;
+ $old =~ s/\034/\\\n#>\- /g; # Fix continuation lines
+ $new =~ s/\034/\\\n\t/g;
+ my $newCount = ($new =~ tr/\n//) + 1;
+ $MakefileData =~ s/\n$lookup/\n#>- $old\n#>\+ $newCount\n$new/;
+ } else {
+ print STDERR "Warning: substitution of \"$lookup\" in $printname failed\n";
+ }
+}
+
+#-----------------------------------------------------------------------------
+
+# Slap new lines on the back of the file.
+sub appendLines ($)
+{
+ my ($new) = @_;
+ $new =~ s/\034/\\\n\t/g; # Fix continuation lines
+ my $newCount = ($new =~ tr/\n//) + 1;
+ $MakefileData .= "\n#>\+ $newCount\n$new";
+}
+
+#-----------------------------------------------------------------------------
+
+# Restore the Makefile.in to the state it was before we fiddled with it
+sub restoreMakefile ()
+{
+ $MakefileData =~ s/# $progId[^\n\034]*[\n\034]*//g;
+ # Restore removed lines
+ $MakefileData =~ s/([\n\034])#>\- /$1/g;
+ # Remove added lines
+ while ($MakefileData =~ /[\n\034]#>\+ ([^\n\034]*)/)
+ {
+ my $newCount = $1;
+ my $removeLines = "";
+ while ($newCount--) {
+ $removeLines .= "[^\n\034]*([\n\034]|)";
+ }
+ $MakefileData =~ s/[\n\034]#>\+.*[\n\034]$removeLines/\n/;
+ }
+}
+
+#-----------------------------------------------------------------------------
diff --git a/config.guess b/config.guess
new file mode 120000
index 0000000..f42b0a5
--- /dev/null
+++ b/config.guess
@@ -0,0 +1 @@
+/usr/share/misc/config.guess \ No newline at end of file
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/config.h.in
diff --git a/config.sub b/config.sub
new file mode 120000
index 0000000..04fd6e2
--- /dev/null
+++ b/config.sub
@@ -0,0 +1 @@
+/usr/share/misc/config.sub \ No newline at end of file
diff --git a/configure.files b/configure.files
new file mode 100644
index 0000000..1083352
--- /dev/null
+++ b/configure.files
@@ -0,0 +1 @@
+configure.in.in
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..45b5bc5
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,161 @@
+dnl =======================================================
+dnl FILE: configure.in.in
+dnl =======================================================
+
+dnl Process this file with autoconf to produce a configure script.
+dnl Most of this file was shamelessly stolen from Licq Qt plugin, which has similar configuration options
+AC_INIT
+AC_CONFIG_SRCDIR([src/main.cpp])
+AC_CONFIG_AUX_DIR(admin)
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
+
+dnl All versioning is done via the following line
+AM_CONFIG_HEADER(src/config.h)
+AM_INIT_AUTOMAKE(kchmviewer, 3.1)
+
+dnl Chuck #defines for PACKAGE and VERSION into config.h
+AC_DEFINE_UNQUOTED(APP_NAME, "$PACKAGE", [ Application name ] )
+AC_DEFINE_UNQUOTED(APP_VERSION, "$VERSION", [ Application version as text ])
+AC_DEFINE_UNQUOTED(APP_INT_VERSION,$INT_VERSION, [ Application version as integer ])
+
+dnl Checks for programs.
+AC_CHECK_COMPILERS
+
+dnl Check for X and extra X libs needed
+AC_PATH_XTRA
+if test "$no_x" = yes; then
+ AC_MSG_ERROR(You need to have the X11 libraries and headers installed)
+fi
+
+KDE_PROG_LIBTOOL
+AC_ENABLE_SHARED(yes)
+AC_ENABLE_STATIC(no)
+AC_PATH_QT
+
+CHMLIBDIR="lib/chmlib"
+EXTRA_SUBDIRS=""
+
+AC_ARG_WITH(kde, AC_HELP_STRING([--with-kde],[enable KDE support]))
+
+if test "x$with_kde" = "xyes"; then
+ KDE_SET_PREFIX
+ AC_PATH_KDE
+ AM_KDE_WITH_NLS
+ AC_DEFINE(USE_KDE, 1, [use KDE support])
+fi
+
+if test "x$with_kde" != "xyes"; then
+ include_ARTS_FALSE="yes"
+ AC_PREFIX_DEFAULT(${prefix:-/usr/local})
+ KDE_SET_DEFAULT_PATHS([default])
+ eval "$kde_cv_all_paths"
+fi
+
+AM_CONDITIONAL([AMC_USE_KDE], [test "x$with_kde" = "xyes"])
+
+dnl Checking whether to use built-in, or system-wide chmlib
+dnl First check for --with-builtin-chmlib configure option - no more checks needed
+USE_BUILTIN_CHMLIB="0"
+AC_ARG_WITH(builtin-chmlib,
+ AC_HELP_STRING([--with-builtin-chmlib],[link with built-in chmlib]),
+ [ USE_BUILTIN_CHMLIB="1" ])
+
+dnl Check for the libchm in system
+if test "$USE_BUILTIN_CHMLIB" = "0"; then
+ AC_CHECK_LIB(chm, chm_open, [USE_BUILTIN_CHMLIB="0"], [USE_BUILTIN_CHMLIB="1"])
+fi
+
+if test "$USE_BUILTIN_CHMLIB" = "1"; then
+ CHM_INCLUDES="-I\$(top_srcdir)/$CHMLIBDIR"
+ CHM_LIBS="\$(top_builddir)/$CHMLIBDIR/libchm.la"
+ USE_LIB_CHM="internal"
+ EXTRA_SUBDIRS="chmlib $EXTRA_SUBDIRS"
+ AC_DEFINE(USE_BUILTIN_CHMLIB, 1, [use builtin chmlib])
+else
+ CHM_LIBS="-lchm"
+ USE_LIB_CHM="system"
+ AC_DEFINE(USE_BUILTIN_CHMLIB, 0, [use builtin chmlib])
+fi
+
+AM_CONDITIONAL([AMC_BUILD_CHMLIB], [test "$USE_BUILTIN_CHMLIB" = "1"])
+
+# libchmfile is built unconditionally
+LIBCHMFILE_INCLUDES="-I\$(top_srcdir)/lib/libchmfile -I\$(top_srcdir)/src"
+LIBCHMFILE_LIBS="\$(top_builddir)/lib/libchmfile/libchmfile.a"
+
+AC_SUBST([EXTRA_SUBDIRS])
+AC_SUBST(CHM_INCLUDES)
+AC_SUBST(USE_KDE)
+AC_SUBST(CHM_LIBS)
+AC_SUBST(LIBCHMFILE_INCLUDES)
+AC_SUBST(LIBCHMFILE_LIBS)
+
+echo ""
+echo "Please remember to use GNU make, often installed as gmake."
+echo ""
+echo "Install prefix : $prefix"
+if test "$have_kde" = yes; then
+ echo "KDE support : includes in $kde_includes, libs in $kde_libraries"
+else
+ echo "KDE support : disabled."
+fi
+echo "Qt includes : $QT_INCLUDES"
+echo "Qt libraries : $LIB_QT"
+echo "chmlib to link : $USE_LIB_CHM"
+KDE_CREATE_SUBDIRSLIST
+AC_CONFIG_FILES([ Makefile ])
+AC_CONFIG_FILES([ lib/Makefile ])
+AC_CONFIG_FILES([ lib/chmlib/Makefile ])
+AC_CONFIG_FILES([ lib/kio-msits/Makefile ])
+AC_CONFIG_FILES([ lib/libchmfile/Makefile ])
+AC_CONFIG_FILES([ po/Makefile ])
+AC_CONFIG_FILES([ src/Makefile ])
+AC_CONFIG_FILES([ src/kde/Makefile ])
+AC_CONFIG_FILES([ src/pics/Makefile ])
+AC_OUTPUT
+# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
+if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
+ # And if so, warn when they don't match
+ if test "$kde_libs_prefix" != "$given_prefix"; then
+ # And if kde doesn't know about the prefix yet
+ echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
+ if test $? -ne 0; then
+ echo ""
+ echo "Warning: you chose to install this package in $given_prefix,"
+ echo "but KDE was found in $kde_libs_prefix."
+ echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
+ echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
+ echo "Then restart KDE."
+ echo ""
+ fi
+ fi
+fi
+
+if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
+ echo ""
+ echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
+ echo "was not included. Therefore, GCC symbol visibility support remains disabled."
+ echo ""
+ echo "For better performance, consider including the Qt visibility supporting patch"
+ echo "located at:"
+ echo ""
+ echo "http://bugs.kde.org/show_bug.cgi?id=109386"
+ echo ""
+ echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
+ echo "everything will continue to work just fine without it."
+ echo ""
+fi
+
+if test "$all_tests" = "bad"; then
+ if test ! "$cache_file" = "/dev/null"; then
+ echo ""
+ echo "Please remove the file $cache_file after changing your setup"
+ echo "so that configure will find the changes next time."
+ echo ""
+ fi
+else
+ echo ""
+ echo "Good - your configure finished. Start make now"
+ echo ""
+fi
diff --git a/configure.in.in b/configure.in.in
new file mode 100644
index 0000000..caea1b7
--- /dev/null
+++ b/configure.in.in
@@ -0,0 +1,101 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl Most of this file was shamelessly stolen from Licq Qt plugin, which has similar configuration options
+AC_INIT
+AC_CONFIG_SRCDIR([src/main.cpp])
+AC_CONFIG_AUX_DIR(admin)
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
+
+dnl All versioning is done via the following line
+AM_CONFIG_HEADER(src/config.h)
+AM_INIT_AUTOMAKE(kchmviewer, 3.1)
+
+dnl Chuck #defines for PACKAGE and VERSION into config.h
+AC_DEFINE_UNQUOTED(APP_NAME, "$PACKAGE", [ Application name ] )
+AC_DEFINE_UNQUOTED(APP_VERSION, "$VERSION", [ Application version as text ])
+AC_DEFINE_UNQUOTED(APP_INT_VERSION,$INT_VERSION, [ Application version as integer ])
+
+dnl Checks for programs.
+AC_CHECK_COMPILERS
+
+dnl Check for X and extra X libs needed
+AC_PATH_XTRA
+if test "$no_x" = yes; then
+ AC_MSG_ERROR(You need to have the X11 libraries and headers installed)
+fi
+
+KDE_PROG_LIBTOOL
+AC_ENABLE_SHARED(yes)
+AC_ENABLE_STATIC(no)
+AC_PATH_QT
+
+CHMLIBDIR="lib/chmlib"
+EXTRA_SUBDIRS=""
+
+AC_ARG_WITH(kde, AC_HELP_STRING([--with-kde],[enable KDE support]))
+
+if test "x$with_kde" = "xyes"; then
+ KDE_SET_PREFIX
+ AC_PATH_KDE
+ AM_KDE_WITH_NLS
+ AC_DEFINE(USE_KDE, 1, [use KDE support])
+fi
+
+if test "x$with_kde" != "xyes"; then
+ include_ARTS_FALSE="yes"
+ AC_PREFIX_DEFAULT(${prefix:-/usr/local})
+ KDE_SET_DEFAULT_PATHS([default])
+ eval "$kde_cv_all_paths"
+fi
+
+AM_CONDITIONAL([AMC_USE_KDE], [test "x$with_kde" = "xyes"])
+
+dnl Checking whether to use built-in, or system-wide chmlib
+dnl First check for --with-builtin-chmlib configure option - no more checks needed
+USE_BUILTIN_CHMLIB="0"
+AC_ARG_WITH(builtin-chmlib,
+ AC_HELP_STRING([--with-builtin-chmlib],[link with built-in chmlib]),
+ [ USE_BUILTIN_CHMLIB="1" ])
+
+dnl Check for the libchm in system
+if test "$USE_BUILTIN_CHMLIB" = "0"; then
+ AC_CHECK_LIB(chm, chm_open, [USE_BUILTIN_CHMLIB="0"], [USE_BUILTIN_CHMLIB="1"])
+fi
+
+if test "$USE_BUILTIN_CHMLIB" = "1"; then
+ CHM_INCLUDES="-I\$(top_srcdir)/$CHMLIBDIR"
+ CHM_LIBS="\$(top_builddir)/$CHMLIBDIR/libchm.la"
+ USE_LIB_CHM="internal"
+ EXTRA_SUBDIRS="chmlib $EXTRA_SUBDIRS"
+ AC_DEFINE(USE_BUILTIN_CHMLIB, 1, [use builtin chmlib])
+else
+ CHM_LIBS="-lchm"
+ USE_LIB_CHM="system"
+ AC_DEFINE(USE_BUILTIN_CHMLIB, 0, [use builtin chmlib])
+fi
+
+AM_CONDITIONAL([AMC_BUILD_CHMLIB], [test "$USE_BUILTIN_CHMLIB" = "1"])
+
+# libchmfile is built unconditionally
+LIBCHMFILE_INCLUDES="-I\$(top_srcdir)/lib/libchmfile -I\$(top_srcdir)/src"
+LIBCHMFILE_LIBS="\$(top_builddir)/lib/libchmfile/libchmfile.a"
+
+AC_SUBST([EXTRA_SUBDIRS])
+AC_SUBST(CHM_INCLUDES)
+AC_SUBST(USE_KDE)
+AC_SUBST(CHM_LIBS)
+AC_SUBST(LIBCHMFILE_INCLUDES)
+AC_SUBST(LIBCHMFILE_LIBS)
+
+echo ""
+echo "Please remember to use GNU make, often installed as gmake."
+echo ""
+echo "Install prefix : $prefix"
+if test "$have_kde" = yes; then
+ echo "KDE support : includes in $kde_includes, libs in $kde_libraries"
+else
+ echo "KDE support : disabled."
+fi
+echo "Qt includes : $QT_INCLUDES"
+echo "Qt libraries : $LIB_QT"
+echo "chmlib to link : $USE_LIB_CHM"
diff --git a/kchmviewer.kdevelop b/kchmviewer.kdevelop
new file mode 100644
index 0000000..3bf0fa5
--- /dev/null
+++ b/kchmviewer.kdevelop
@@ -0,0 +1,272 @@
+<?xml version = '1.0'?>
+<kdevelop>
+ <general>
+ <author>tim</author>
+ <email>tim@krasnogorsk.ru</email>
+ <version>0.1</version>
+ <projectmanagement>KDevAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>C++</keyword>
+ <keyword>Code</keyword>
+ </keywords>
+ <ignoreparts/>
+ <projectdirectory>.</projectdirectory>
+ <absoluteprojectpath>false</absoluteprojectpath>
+ <description/>
+ <versioncontrol/>
+ <projectname>kchmviewer</projectname>
+ <defaultencoding/>
+ </general>
+ <kdevautoproject>
+ <general>
+ <activetarget>src/kchmviewer</activetarget>
+ <useconfiguration>debug</useconfiguration>
+ </general>
+ <run>
+ <mainprogram>/home/tim/work/kchmviewer/build/src/kchmviewer</mainprogram>
+ <terminal>false</terminal>
+ <directoryradio>build</directoryradio>
+ <runarguments>
+ <kchmviewer/>
+ </runarguments>
+ <customdirectory>/</customdirectory>
+ <programargs/>
+ <autocompile>true</autocompile>
+ <envvars/>
+ <globaldebugarguments/>
+ <globalcwd>/home/tim/work/kchmviewer/build</globalcwd>
+ <useglobalprogram>false</useglobalprogram>
+ <autoinstall>false</autoinstall>
+ <autokdesu>false</autokdesu>
+ </run>
+ <configurations>
+ <optimized>
+ <builddir>build</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O2 -g0</cxxflags>
+ <envvars/>
+ <configargs/>
+ <topsourcedir/>
+ <cppflags/>
+ <ldflags/>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags/>
+ <f77flags/>
+ </optimized>
+ <debug>
+ <configargs>--enable-debug=full --with-kde</configargs>
+ <builddir>build</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O0 -g3</cxxflags>
+ <envvars/>
+ <topsourcedir/>
+ <cppflags/>
+ <ldflags/>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags>-g</cflags>
+ <f77flags/>
+ </debug>
+ <default>
+ <envvars/>
+ <configargs/>
+ <builddir>build</builddir>
+ <topsourcedir/>
+ <cppflags/>
+ <ldflags/>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags/>
+ <cxxflags/>
+ <f77flags/>
+ </default>
+ </configurations>
+ <make>
+ <envvars/>
+ <abortonerror>true</abortonerror>
+ <numberofjobs>1</numberofjobs>
+ <dontact>false</dontact>
+ <makebin/>
+ <prio>0</prio>
+ <runmultiplejobs>false</runmultiplejobs>
+ </make>
+ </kdevautoproject>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>clanlib</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>kde2book</toc>
+ <toc>opengl</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>qt-kdev3</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>w3c-svg</toc>
+ <toc>sw</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>Guide to the Qt Translation Tools</toc>
+ <toc>Qt Assistant Manual</toc>
+ <toc>Qt Designer Manual</toc>
+ <toc>Qt Reference Documentation</toc>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ <ignoredoxygen>
+ <toc>KDE Libraries (Doxygen)</toc>
+ </ignoredoxygen>
+ </kdevdoctreeview>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.h" name="Header files" />
+ <group pattern="*.cpp" name="Source files" />
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidenonlocation>false</hidenonlocation>
+ </groups>
+ <tree>
+ <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ </tree>
+ </kdevfileview>
+ <kdevdocumentation>
+ <projectdoc>
+ <docsystem>Doxygen Documentation Collection</docsystem>
+ <docurl>kchmviewer.tag</docurl>
+ <usermanualurl/>
+ </projectdoc>
+ </kdevdocumentation>
+ <substmap>
+ <APPNAME>kchmviewer</APPNAME>
+ <APPNAMELC>kchmviewer</APPNAMELC>
+ <APPNAMESC>Kchmviewer</APPNAMESC>
+ <APPNAMEUC>KCHMVIEWER</APPNAMEUC>
+ <AUTHOR>tim</AUTHOR>
+ <EMAIL>tim@krasnogorsk.ru</EMAIL>
+ <LICENSE>GPL</LICENSE>
+ <LICENSEFILE>COPYING</LICENSEFILE>
+ <VERSION>0.1</VERSION>
+ <YEAR>2005</YEAR>
+ <dest>/home/tim/work/kchmviewer</dest>
+ </substmap>
+ <kdevcppsupport>
+ <references/>
+ <codecompletion>
+ <includeGlobalFunctions>true</includeGlobalFunctions>
+ <includeTypes>true</includeTypes>
+ <includeEnums>true</includeEnums>
+ <includeTypedefs>false</includeTypedefs>
+ <automaticCodeCompletion>true</automaticCodeCompletion>
+ <automaticArgumentsHint>true</automaticArgumentsHint>
+ <automaticHeaderCompletion>true</automaticHeaderCompletion>
+ <codeCompletionDelay>250</codeCompletionDelay>
+ <argumentsHintDelay>400</argumentsHintDelay>
+ <headerCompletionDelay>250</headerCompletionDelay>
+ <showOnlyAccessibleItems>false</showOnlyAccessibleItems>
+ <completionBoxItemOrder>0</completionBoxItemOrder>
+ <howEvaluationContextMenu>true</howEvaluationContextMenu>
+ <showCommentWithArgumentHint>true</showCommentWithArgumentHint>
+ <statusBarTypeEvaluation>true</statusBarTypeEvaluation>
+ <namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
+ <processPrimaryTypes>true</processPrimaryTypes>
+ <processFunctionArguments>false</processFunctionArguments>
+ <preProcessAllHeaders>true</preProcessAllHeaders>
+ <parseMissingHeaders>false</parseMissingHeaders>
+ <resolveIncludePaths>true</resolveIncludePaths>
+ <alwaysParseInBackground>true</alwaysParseInBackground>
+ <usePermanentCaching>true</usePermanentCaching>
+ <alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
+ <includePaths>.;</includePaths>
+ </codecompletion>
+ <creategettersetter>
+ <prefixGet/>
+ <prefixSet>set</prefixSet>
+ <prefixVariable>m_,_</prefixVariable>
+ <parameterName>theValue</parameterName>
+ <inlineGet>true</inlineGet>
+ <inlineSet>true</inlineSet>
+ </creategettersetter>
+ <qt>
+ <used>true</used>
+ <version>3</version>
+ <root>/usr/lib/qt3</root>
+ <includestyle>3</includestyle>
+ <designerintegration>EmbeddedKDevDesigner</designerintegration>
+ <qmake>/usr/lib/qt3/bin/qmake</qmake>
+ <designer>/usr/lib/qt3/bin/designer</designer>
+ <designerpluginpaths/>
+ </qt>
+ <splitheadersource>
+ <enabled>false</enabled>
+ <synchronize>true</synchronize>
+ <orientation>Vertical</orientation>
+ </splitheadersource>
+ </kdevcppsupport>
+ <cppsupportpart>
+ <filetemplates>
+ <interfacesuffix>.h</interfacesuffix>
+ <implementationsuffix>.cpp</implementationsuffix>
+ </filetemplates>
+ </cppsupportpart>
+ <kdevdebugger>
+ <general>
+ <programargs/>
+ <gdbpath/>
+ <dbgshell/>
+ <configGdbScript/>
+ <runShellScript/>
+ <runGdbScript/>
+ <breakonloadinglibs>false</breakonloadinglibs>
+ <separatetty>false</separatetty>
+ <floatingtoolbar>false</floatingtoolbar>
+ </general>
+ <display>
+ <staticmembers>false</staticmembers>
+ <demanglenames>true</demanglenames>
+ <outputradix>16</outputradix>
+ </display>
+ </kdevdebugger>
+ <ctagspart>
+ <customArguments/>
+ <customTagfilePath/>
+ </ctagspart>
+</kdevelop>
diff --git a/kchmviewer.kdevelop.pcs b/kchmviewer.kdevelop.pcs
new file mode 100644
index 0000000..d41be81
--- /dev/null
+++ b/kchmviewer.kdevelop.pcs
Binary files differ
diff --git a/kchmviewer.kdevses b/kchmviewer.kdevses
new file mode 100644
index 0000000..bc04a1d
--- /dev/null
+++ b/kchmviewer.kdevses
@@ -0,0 +1,74 @@
+<?xml version = '1.0' encoding = 'UTF-8'?>
+<!DOCTYPE KDevPrjSession>
+<KDevPrjSession>
+ <DocsAndViews NumberOfDocuments="15" >
+ <Doc0 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/src/kchmmainwindow.h" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc0>
+ <Doc1 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/src/kchmsearchwindow.h" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc1>
+ <Doc2 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/lib/libchmfile/libchmfile.h" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc2>
+ <Doc3 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/lib/libchmfile/libchmfile.cpp" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc3>
+ <Doc4 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/lib/libchmfile/libchmfileimpl.cpp" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc4>
+ <Doc5 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/src/kchmmainwindow.cpp" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc5>
+ <Doc6 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/src/kchmviewwindow_qtextbrowser.h" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc6>
+ <Doc7 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/src/kchmsourcefactory.cpp" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc7>
+ <Doc8 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/src/kchmviewwindow.cpp" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc8>
+ <Doc9 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/src/kchmviewwindow.h" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc9>
+ <Doc10 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/src/kchmviewwindowmgr.h" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc10>
+ <Doc11 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/lib/kio-msits/msits.h" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc11>
+ <Doc12 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/lib/libchmfile/lchmurlhandler.h" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc12>
+ <Doc13 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/lib/libchmfile/libchmurlfactory.h" >
+ <View0 Encoding="ISO 8859-1" Type="Source" />
+ </Doc13>
+ <Doc14 NumberOfViews="1" URL="file:///home/tim/work/kchmviewer/src/kchmviewwindow_qtextbrowser.cpp" >
+ <View0 Encoding="ISO 8859-1" line="224" Type="Source" />
+ </Doc14>
+ </DocsAndViews>
+ <pluginList>
+ <kdevdebugger>
+ <breakpointList>
+ <breakpoint0 location="/home/tim/work/kchmviewer/src/kchmmainwindow.cpp:329" type="1" tracingFormatString="" traceFormatStringEnabled="0" condition="" tracingEnabled="0" enabled="1" >
+ <tracedExpressions/>
+ </breakpoint0>
+ </breakpointList>
+ <showInternalCommands value="0" />
+ </kdevdebugger>
+ <kdevastyle>
+ <Extensions ext="*.cpp *.h,*.c *.h,*.cxx *.hxx,*.c++ *.h++,*.cc *.hh,*.C *.H,*.diff,*.inl,*.java,*.moc,*.patch,*.tlh,*.xpm" />
+ <AStyle IndentPreprocessors="1" FillCount="4" PadParenthesesOut="1" IndentNamespaces="0" IndentLabels="1" Fill="Tabs" MaxStatement="40" Brackets="Break" MinConditional="-1" IndentBrackets="0" PadParenthesesUn="1" BlockBreak="1" KeepStatements="1" KeepBlocks="1" BlockIfElse="0" IndentSwitches="1" PadOperators="1" FStyle="UserDefined" IndentCases="1" FillEmptyLines="0" BracketsCloseHeaders="0" BlockBreakAll="0" PadParenthesesIn="1" IndentClasses="1" IndentBlocks="0" FillForce="1" />
+ </kdevastyle>
+ <kdevbookmarks>
+ <bookmarks/>
+ </kdevbookmarks>
+ <kdevvalgrind>
+ <executable path="" params="" />
+ <valgrind path="" params="" />
+ <calltree path="" params="" />
+ <kcachegrind path="" />
+ </kdevvalgrind>
+ </pluginList>
+</KDevPrjSession>
diff --git a/lib/Makefile.am b/lib/Makefile.am
new file mode 100644
index 0000000..0a215da
--- /dev/null
+++ b/lib/Makefile.am
@@ -0,0 +1,17 @@
+if AMC_USE_KDE
+SUBDIR_KIO = kio-msits
+endif
+
+if AMC_BUILD_CHMLIB
+SUBDIR_CHMLIB = chmlib
+endif
+
+SUBDIRS = $(SUBDIR_CHMLIB) $(SUBDIR_KIO) libchmfile
+DIST_SUBDIRS = chmlib kio-msits libchmfile
+
+package-messages:
+ $(MAKE) -f admin/Makefile.common package-messages
+ $(MAKE) -C po merge
+
+# Uncomment this line before opening the project in kdevelop for the first time!
+#SUBDIRS = chmlib kio-msits libchmfile
diff --git a/lib/chmlib/AUTHORS b/lib/chmlib/AUTHORS
new file mode 100644
index 0000000..431ecc3
--- /dev/null
+++ b/lib/chmlib/AUTHORS
@@ -0,0 +1,18 @@
+Jed Wing <jedwin@ugcs.caltech.edu>
+includes modified LZX code from cabextract-0.5 by Stuart Caie.
+
+Thanks to:
+ iDEFENSE for reporting the stack overflow vulnerability.
+ Palasik Sandor for reporting and fixing the LZX buffer overrun vulnerability.
+ David Huseby for enhancements to the chm_enumerate functionality.
+ Vitaly Bursov for compilation fixes for x86-64.
+ Vadim Zeitlin for a patch to clean up and fix some deficiencies in the
+ configure script.
+ Stan Tobias for bugfixes and index-page improvement to chm_http.
+ Andrew Hodgetts for major portability improvement.
+ Rich Erwin for his work towards Windows CE support.
+ Pabs for bug fixes and suggestions.
+ Antony Dovgal for setting up autoconf/automake based build process.
+ Ragnar Hojland Espinosa for patches to make chm_http more useful.
+ Razvan Cojocaru for forwarding along information regarding building on OS X.
+ Anyone else I've forgotten.
diff --git a/lib/chmlib/COPYING b/lib/chmlib/COPYING
new file mode 100644
index 0000000..cc6f365
--- /dev/null
+++ b/lib/chmlib/COPYING
@@ -0,0 +1,510 @@
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+^L
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes a de-facto standard. To achieve this, non-free programs must
+be allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+^L
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+^L
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+^L
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at least
+ three years, to give the same user the materials specified in
+ Subsection 6a, above, for a charge no more than the cost of
+ performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+^L
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+^L
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+^L
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+^L
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or
+your school, if any, to sign a "copyright disclaimer" for the library,
+if necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James
+ Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/lib/chmlib/INSTALL b/lib/chmlib/INSTALL
new file mode 100644
index 0000000..23e5f25
--- /dev/null
+++ b/lib/chmlib/INSTALL
@@ -0,0 +1,236 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about. Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory. After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script). Here is a another example:
+
+ /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/lib/chmlib/Makefile.am b/lib/chmlib/Makefile.am
new file mode 100644
index 0000000..bcbe427
--- /dev/null
+++ b/lib/chmlib/Makefile.am
@@ -0,0 +1,3 @@
+noinst_LTLIBRARIES = libchm.la
+noinst_HEADERS = chm_lib.h lzx.h
+libchm_la_SOURCES = chm_lib.c lzx.c
diff --git a/lib/chmlib/NEWS b/lib/chmlib/NEWS
new file mode 100644
index 0000000..332fd9a
--- /dev/null
+++ b/lib/chmlib/NEWS
@@ -0,0 +1,68 @@
+Changes from 0.37 to 0.38
+ - Fix for reading some chm files. Running over a large directory of chm
+ files, about 1% of them turned out to be unreadable. This resulted from
+ an incomplete understanding of one of the header fields (index_root).
+ Apparently, this can take negative values other than -1.
+
+ - Security fix for extract_chmLib. Pathnames containing a ".." element
+ will not be extracted. There doesn't seem to be a legitimate reason to
+ use ".." as a path element in a chm file.
+
+Changes from 0.36 to 0.37
+ - Major security fix for stack overflow vulnerability:
+ http://www.sven-tantau.de/public_files/chmlib/chmlib_20051126.txt
+ - Corrected the broken Makefile.in.
+
+Changes from 0.35 to 0.36
+ - Major security fix (iDEFENSE Security Advisory IDEF1099 - Stack Overflow
+ Vulnerability)
+ - Major security fix from Palasik Sandor (LZX decompression buffer overrun)
+ - Bugfix/enhancement from David Huseby to make the "what" flags to
+ chm_enumerate work correctly, and to pass the flags along to the callback
+ function (via the chmUnitInfo structure) so that the callback doesn't
+ need to re-parse the filename.
+ - Compilation fixes for x86-64 from Vitaly V. Bursov.
+ - Miscellaneous fixes to the configure script, including some significant
+ cleanup by Vadim Zeitlin. The changes from Vadim should also allow the
+ configure script to correctly configure the build on OS X, where it was
+ previously failing to note that pread64 doesn't work.
+ - Minor update to the Makefile.in to do a mkdir before the install, in case
+ the specified INSTALLPREFIX directory is non-existent
+
+Changes from 0.32 to 0.35
+ - UTF-8 filenames, while still not handled correctly, are handled a little
+ more gracefully. That is to say, the library doesn't fail to open files
+ with filenames using characters outside the ASCII subset. I'm very
+ interested in any information as to the "right" way to handle filenames
+ of this sort.
+ - Files not containing a compressed section are handled properly, such as
+ .chw files. These files seem to contain information about compression,
+ but the information is invalid or empty. The library deals gracefully
+ with this now.
+ - Files compressed with different options were not being decompressed
+ properly. In particular, if the "reset interval" for the compressed
+ section was other than 2 block sizes, it could fail to read some of the
+ files.
+ - The caching system was improved slightly, in conjunction with this
+ previous bugfix.
+
+Changes from 0.3 to 0.32:
+ - [Rich Erwin] Minor portability fixes for Windows CE.
+ - [Pabs] Minor bugfix regarding detecting directory entries versus empty files.
+ - [Antony Dovgal] autoconf-based build process
+ - [Ragnar Hojland Espinosa] Feature additions for chm_http:
+ * Use SO_REUSEADDR
+ * Allow --bind= and --port= command line arguments
+ - Simple makefile has been fixed (finally) to use gcc instead of gcc-3.2. (Sorry, everybody!)
+
+Changes from 0.2 to 0.3:
+
+ - initial attempt at portability to Win32.
+ - bugfixes from Stan Tobias:
+ * memory corruption error with caching system
+ * case insensitivity, to match with the Windows semantics
+ - modification to chm_http by Stan Tobias:
+ * when the user requests the page '/', they get a page with links to
+ all of the files in the archive
+ - Andrew Hodgetts has ported the library to Solaris and Irix. See README for details.
+ - Stuart Caie has granted permission to relicense under the LGPL.
diff --git a/lib/chmlib/README b/lib/chmlib/README
new file mode 100644
index 0000000..d39924b
--- /dev/null
+++ b/lib/chmlib/README
@@ -0,0 +1,141 @@
+CHMLIB 0.38
+===========
+
+-------
+SUMMARY
+-------
+chmlib is a small library designed for accessing MS ITSS files. The ITSS file
+format is used for Microsoft Html Help files (.chm), which have been the
+predominant medium for software documentation from Microsoft during the past
+several years, having superceded the previously used .hlp file format.
+
+Note that this is NOT the same as the OLE structured storage file format used
+by MS Excel, Word, and so on. Instead, it is a different file format which
+fulfills a similar purpose. Both file formats may be accessed via instances
+of the IStorage COM interface, which is essentially an "acts like a
+filesystem" interface.
+
+-------
+FILE FORMAT SUPPORT
+-------
+
+Lookup of files in the archive is supported, and should be relatively quick.
+Reading of files in the archive is also supported.
+Writing is not supported, but may be added in the future.
+
+In terms of support for the ITSS file format, there are a few places in which
+the support provided by this library is not fully general:
+
+1. ITSS files whose names contain UTF-8 characters which are not part of the
+ ASCII subset will not currently be dealt with gracefully. Currently, the
+ filenames are not converted from UTF-8, but are instead returned as-is. I'm
+ very interested in hearing any suggestions as to the "right" way to handle
+ this.
+
+2. Only version 3 ITSS files are supported at present, though some work has
+ gone towards divining the differences between different versions of the
+ file format. It is possible that version 2 ITSS files might work properly
+ with this library, but unconfirmed.
+
+3. Archives larger than 4 GB should be supported just fine, but if they
+ contain files larger than 4GB, this library may break. Fortunately, this
+ seems somewhat unlikely.
+
+If you run into .chm files (or files you suspect are ITSS files) that this
+library doesn't work with, please contact me so I can fix the library.
+
+-------
+PORTABILITY
+-------
+
+This software was originally developed on a Intel x86 Debian Linux machine,
+using gcc 3.0. It has since been compiled on various flavors of RedHat as
+well, and using versions of gcc from 2.95 through 3.2. Basic Win32 support
+should be in this release. (While a port to Win32 may _seem_ like a funny
+idea, given that Windows ships with libraries for CHM access, it turns out that
+Win CE does not; I've gotten a request for a port to Windows CE.)
+
+Chmlib apparently works on OS X, with some tweaks. In particular, disabling
+pread and io64 apparently works.
+
+Finally, Andrew Hodgetts has ported to Solaris and IRIX:
+
+On Monday, 7 Oct 2002, Andrew Hodgetts wrote:
+> Solaris(Sun):
+>
+> I used both SunProC and GCC on the solaris machines to compile. They
+> both worked ok.
+> However, both required -lsocket on the link line of the Makefile or you
+> recieve linking errors.
+>
+> I have this working on CPUs ranging from Sun4m (Sparc5) through to
+> UltraSparcIII (SunFireV880).
+>
+> Irix (SGI):
+>
+> I only testing with the MIPS compiler (not GCC). All worked ok - lots of
+> warning messages, but it always does that.
+
+He further noted that:
+
+> ... for NON GCC compilers, a little tweaking may be required, but nothing too
+> complex. ie SunProC doesn't understand -fPIC for library building. Irix
+> required -n32 (new 32bit libraries) etc. These are things that someone who
+> uses the OS and compiler should be used to dealing with.
+
+-------
+CREDITS
+-------
+
+* Stuart Caie: the LZX decompression code, and for granting permission to
+ re-license under the LGPL.
+
+* Sven Tantau: identification of a stack-overflow security flaw and a quick fix
+ for the problem; identification of a possible security danger in the example
+ program "extract_chmLib"
+
+* iDEFENSE Labs: identification of a nasty stack-overflow security flaw
+
+* Palasik Sandor: identification of a potential security flaw in lzx.c as well
+ as a quick fix for the problem
+
+* David Huseby: An excellent patch to the chm_enumerate functionality, relating
+ to the "what" flags, which didn't work entirely correctly before
+
+* Vadim Zeitlin: Configure script cleanup, including an important update to
+ allow detection of platforms where pread64 doesn't work. (OS X)
+
+* Vitaly V. Bursov: Compilation on x86-64.
+
+* mc: A suggestion to add a "mkdir" to the install step.
+
+* Stan Tobias: bugfixes and the added 'index page' feature of chm_http.
+
+* Andrew Hodgetts: porting to Solaris and IRIX, as well as fixing some
+ little-endian biases in the code.
+
+* Rich Erwin: Windows CE support.
+
+* Pabs: bug fixes and suggestions.
+
+* Antony Dovgal: setting up autoconf/automake based build process.
+
+* Ragnar Hojland Espinosa: patches to make chm_http more useful.
+
+* Razvan Cojocaru: forwarding along information regarding building on OS X.
+
+* Julien Lemoine: creating and maintaining the Debian package of chmlib.
+
+* Prarit Bhargava: Compilation on ia64
+
+* Jean-Marc Vanel: elimination of compilation warnings in extract_chmLib
+
+* Sisyphus & Matej Spiller-Muys: Compilation under MinGW32
+
+* Kyle Davenport: helper script for using chm_http with mozilla
+
+* Matthew Daniel & Mark Rosenstand: help to sort out issues with the build
+ system.
+
+* Anyone else I've forgotten. (?)
+
diff --git a/lib/chmlib/chm_lib.c b/lib/chmlib/chm_lib.c
new file mode 100644
index 0000000..e7da0b0
--- /dev/null
+++ b/lib/chmlib/chm_lib.c
@@ -0,0 +1,1917 @@
+/* $Id: chm_lib.c 148 2007-03-07 09:22:36Z gyunaev $ */
+/***************************************************************************
+ * chm_lib.c - CHM archive manipulation routines *
+ * ------------------- *
+ * *
+ * author: Jed Wing <jedwin@ugcs.caltech.edu> *
+ * version: 0.3 *
+ * notes: These routines are meant for the manipulation of microsoft *
+ * .chm (compiled html help) files, but may likely be used *
+ * for the manipulation of any ITSS archive, if ever ITSS *
+ * archives are used for any other purpose. *
+ * *
+ * Note also that the section names are statically handled. *
+ * To be entirely correct, the section names should be read *
+ * from the section names meta-file, and then the various *
+ * content sections and the "transforms" to apply to the data *
+ * they contain should be inferred from the section name and *
+ * the meta-files referenced using that name; however, all of *
+ * the files I've been able to get my hands on appear to have *
+ * only two sections: Uncompressed and MSCompressed. *
+ * Additionally, the ITSS.DLL file included with Windows does *
+ * not appear to handle any different transforms than the *
+ * simple LZX-transform. Furthermore, the list of transforms *
+ * to apply is broken, in that only half the required space *
+ * is allocated for the list. (It appears as though the *
+ * space is allocated for ASCII strings, but the strings are *
+ * written as unicode. As a result, only the first half of *
+ * the string appears.) So this is probably not too big of *
+ * a deal, at least until CHM v4 (MS .lit files), which also *
+ * incorporate encryption, of some description. *
+ * *
+ * switches: CHM_MT: compile library with thread-safety *
+ * *
+ * switches (Linux only): *
+ * CHM_USE_PREAD: compile library to use pread instead of *
+ * lseek/read *
+ * CHM_USE_IO64: compile library to support full 64-bit I/O *
+ * as is needed to properly deal with the *
+ * 64-bit file offsets. *
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "chm_lib.h"
+
+#ifdef CHM_MT
+#define _REENTRANT
+#endif
+
+#include "lzx.h"
+
+#include <stdlib.h>
+#include <string.h>
+#ifdef CHM_DEBUG
+#include <stdio.h>
+#endif
+
+#if __sun || __sgi
+#include <strings.h>
+#endif
+
+#ifdef WIN32
+#include <windows.h>
+#include <malloc.h>
+#ifdef _WIN32_WCE
+#define strcasecmp _stricmp
+#define strncasecmp _strnicmp
+#else
+#define strcasecmp stricmp
+#define strncasecmp strnicmp
+#endif
+#else
+/* basic Linux system includes */
+#define _XOPEN_SOURCE 500
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+/* #include <dmalloc.h> */
+#endif
+
+/* includes/defines for threading, if using them */
+#ifdef CHM_MT
+#ifdef WIN32
+#define CHM_ACQUIRE_LOCK(a) do { \
+ EnterCriticalSection(&(a)); \
+ } while(0)
+#define CHM_RELEASE_LOCK(a) do { \
+ EnterCriticalSection(&(a)); \
+ } while(0)
+
+#else
+#include <pthread.h>
+
+#define CHM_ACQUIRE_LOCK(a) do { \
+ pthread_mutex_lock(&(a)); \
+ } while(0)
+#define CHM_RELEASE_LOCK(a) do { \
+ pthread_mutex_unlock(&(a)); \
+ } while(0)
+
+#endif
+#else
+#define CHM_ACQUIRE_LOCK(a) /* do nothing */
+#define CHM_RELEASE_LOCK(a) /* do nothing */
+#endif
+
+#ifdef WIN32
+#define CHM_NULL_FD (INVALID_HANDLE_VALUE)
+#define CHM_USE_WIN32IO 1
+#define CHM_CLOSE_FILE(fd) CloseHandle((fd))
+#else
+#define CHM_NULL_FD (-1)
+#define CHM_CLOSE_FILE(fd) close((fd))
+#endif
+
+/*
+ * defines related to tuning
+ */
+#ifndef CHM_MAX_BLOCKS_CACHED
+#define CHM_MAX_BLOCKS_CACHED 5
+#endif
+
+/*
+ * architecture specific defines
+ *
+ * Note: as soon as C99 is more widespread, the below defines should
+ * probably just use the C99 sized-int types.
+ *
+ * The following settings will probably work for many platforms. The sizes
+ * don't have to be exactly correct, but the types must accommodate at least as
+ * many bits as they specify.
+ */
+
+/* i386, 32-bit, Windows */
+#ifdef WIN32
+typedef unsigned char UChar;
+typedef __int16 Int16;
+typedef unsigned __int16 UInt16;
+typedef __int32 Int32;
+typedef unsigned __int32 UInt32;
+typedef __int64 Int64;
+typedef unsigned __int64 UInt64;
+
+/* I386, 32-bit, non-Windows */
+/* Sparc */
+/* MIPS */
+/* PPC */
+#elif __i386__ || __sun || __sgi || __ppc__
+typedef unsigned char UChar;
+typedef short Int16;
+typedef unsigned short UInt16;
+typedef long Int32;
+typedef unsigned long UInt32;
+typedef long long Int64;
+typedef unsigned long long UInt64;
+
+/* x86-64 */
+/* Note that these may be appropriate for other 64-bit machines. */
+#elif __x86_64__ || __ia64__
+typedef unsigned char UChar;
+typedef short Int16;
+typedef unsigned short UInt16;
+typedef int Int32;
+typedef unsigned int UInt32;
+typedef long Int64;
+typedef unsigned long UInt64;
+
+#else
+
+/* yielding an error is preferable to yielding incorrect behavior */
+#error "Please define the sized types for your platform in chm_lib.c"
+#endif
+
+/* GCC */
+#ifdef __GNUC__
+#define memcmp __builtin_memcmp
+#define memcpy __builtin_memcpy
+#define strlen __builtin_strlen
+
+#elif defined(WIN32)
+static int ffs(unsigned int val)
+{
+ int bit=1, idx=1;
+ while (bit != 0 && (val & bit) == 0)
+ {
+ bit <<= 1;
+ ++idx;
+ }
+ if (bit == 0)
+ return 0;
+ else
+ return idx;
+}
+
+#endif
+
+/* utilities for unmarshalling data */
+static int _unmarshal_char_array(unsigned char **pData,
+ unsigned int *pLenRemain,
+ char *dest,
+ int count)
+{
+ if (count <= 0 || (unsigned int)count > *pLenRemain)
+ return 0;
+ memcpy(dest, (*pData), count);
+ *pData += count;
+ *pLenRemain -= count;
+ return 1;
+}
+
+static int _unmarshal_uchar_array(unsigned char **pData,
+ unsigned int *pLenRemain,
+ unsigned char *dest,
+ int count)
+{
+ if (count <= 0 || (unsigned int)count > *pLenRemain)
+ return 0;
+ memcpy(dest, (*pData), count);
+ *pData += count;
+ *pLenRemain -= count;
+ return 1;
+}
+
+#if 0
+static int _unmarshal_int16(unsigned char **pData,
+ unsigned int *pLenRemain,
+ Int16 *dest)
+{
+ if (2 > *pLenRemain)
+ return 0;
+ *dest = (*pData)[0] | (*pData)[1]<<8;
+ *pData += 2;
+ *pLenRemain -= 2;
+ return 1;
+}
+
+static int _unmarshal_uint16(unsigned char **pData,
+ unsigned int *pLenRemain,
+ UInt16 *dest)
+{
+ if (2 > *pLenRemain)
+ return 0;
+ *dest = (*pData)[0] | (*pData)[1]<<8;
+ *pData += 2;
+ *pLenRemain -= 2;
+ return 1;
+}
+#endif
+
+static int _unmarshal_int32(unsigned char **pData,
+ unsigned int *pLenRemain,
+ Int32 *dest)
+{
+ if (4 > *pLenRemain)
+ return 0;
+ *dest = (*pData)[0] | (*pData)[1]<<8 | (*pData)[2]<<16 | (*pData)[3]<<24;
+ *pData += 4;
+ *pLenRemain -= 4;
+ return 1;
+}
+
+static int _unmarshal_uint32(unsigned char **pData,
+ unsigned int *pLenRemain,
+ UInt32 *dest)
+{
+ if (4 > *pLenRemain)
+ return 0;
+ *dest = (*pData)[0] | (*pData)[1]<<8 | (*pData)[2]<<16 | (*pData)[3]<<24;
+ *pData += 4;
+ *pLenRemain -= 4;
+ return 1;
+}
+
+static int _unmarshal_int64(unsigned char **pData,
+ unsigned int *pLenRemain,
+ Int64 *dest)
+{
+ Int64 temp;
+ int i;
+ if (8 > *pLenRemain)
+ return 0;
+ temp=0;
+ for(i=8; i>0; i--)
+ {
+ temp <<= 8;
+ temp |= (*pData)[i-1];
+ }
+ *dest = temp;
+ *pData += 8;
+ *pLenRemain -= 8;
+ return 1;
+}
+
+static int _unmarshal_uint64(unsigned char **pData,
+ unsigned int *pLenRemain,
+ UInt64 *dest)
+{
+ UInt64 temp;
+ int i;
+ if (8 > *pLenRemain)
+ return 0;
+ temp=0;
+ for(i=8; i>0; i--)
+ {
+ temp <<= 8;
+ temp |= (*pData)[i-1];
+ }
+ *dest = temp;
+ *pData += 8;
+ *pLenRemain -= 8;
+ return 1;
+}
+
+static int _unmarshal_uuid(unsigned char **pData,
+ unsigned int *pDataLen,
+ unsigned char *dest)
+{
+ return _unmarshal_uchar_array(pData, pDataLen, dest, 16);
+}
+
+/* names of sections essential to decompression */
+static const char _CHMU_RESET_TABLE[] =
+ "::DataSpace/Storage/MSCompressed/Transform/"
+ "{7FC28940-9D31-11D0-9B27-00A0C91E9C7C}/"
+ "InstanceData/ResetTable";
+static const char _CHMU_LZXC_CONTROLDATA[] =
+ "::DataSpace/Storage/MSCompressed/ControlData";
+static const char _CHMU_CONTENT[] =
+ "::DataSpace/Storage/MSCompressed/Content";
+static const char _CHMU_SPANINFO[] =
+ "::DataSpace/Storage/MSCompressed/SpanInfo";
+
+/*
+ * structures local to this module
+ */
+
+/* structure of ITSF headers */
+#define _CHM_ITSF_V2_LEN (0x58)
+#define _CHM_ITSF_V3_LEN (0x60)
+struct chmItsfHeader
+{
+ char signature[4]; /* 0 (ITSF) */
+ Int32 version; /* 4 */
+ Int32 header_len; /* 8 */
+ Int32 unknown_000c; /* c */
+ UInt32 last_modified; /* 10 */
+ UInt32 lang_id; /* 14 */
+ UChar dir_uuid[16]; /* 18 */
+ UChar stream_uuid[16]; /* 28 */
+ UInt64 unknown_offset; /* 38 */
+ UInt64 unknown_len; /* 40 */
+ UInt64 dir_offset; /* 48 */
+ UInt64 dir_len; /* 50 */
+ UInt64 data_offset; /* 58 (Not present before V3) */
+}; /* __attribute__ ((aligned (1))); */
+
+static int _unmarshal_itsf_header(unsigned char **pData,
+ unsigned int *pDataLen,
+ struct chmItsfHeader *dest)
+{
+ /* we only know how to deal with the 0x58 and 0x60 byte structures */
+ if (*pDataLen != _CHM_ITSF_V2_LEN && *pDataLen != _CHM_ITSF_V3_LEN)
+ return 0;
+
+ /* unmarshal common fields */
+ _unmarshal_char_array(pData, pDataLen, dest->signature, 4);
+ _unmarshal_int32 (pData, pDataLen, &dest->version);
+ _unmarshal_int32 (pData, pDataLen, &dest->header_len);
+ _unmarshal_int32 (pData, pDataLen, &dest->unknown_000c);
+ _unmarshal_uint32 (pData, pDataLen, &dest->last_modified);
+ _unmarshal_uint32 (pData, pDataLen, &dest->lang_id);
+ _unmarshal_uuid (pData, pDataLen, dest->dir_uuid);
+ _unmarshal_uuid (pData, pDataLen, dest->stream_uuid);
+ _unmarshal_uint64 (pData, pDataLen, &dest->unknown_offset);
+ _unmarshal_uint64 (pData, pDataLen, &dest->unknown_len);
+ _unmarshal_uint64 (pData, pDataLen, &dest->dir_offset);
+ _unmarshal_uint64 (pData, pDataLen, &dest->dir_len);
+
+ /* error check the data */
+ /* XXX: should also check UUIDs, probably, though with a version 3 file,
+ * current MS tools do not seem to use them.
+ */
+ if (memcmp(dest->signature, "ITSF", 4) != 0)
+ return 0;
+ if (dest->version == 2)
+ {
+ if (dest->header_len < _CHM_ITSF_V2_LEN)
+ return 0;
+ }
+ else if (dest->version == 3)
+ {
+ if (dest->header_len < _CHM_ITSF_V3_LEN)
+ return 0;
+ }
+ else
+ return 0;
+
+ /* now, if we have a V3 structure, unmarshal the rest.
+ * otherwise, compute it
+ */
+ if (dest->version == 3)
+ {
+ if (*pDataLen != 0)
+ _unmarshal_uint64(pData, pDataLen, &dest->data_offset);
+ else
+ return 0;
+ }
+ else
+ dest->data_offset = dest->dir_offset + dest->dir_len;
+
+ return 1;
+}
+
+/* structure of ITSP headers */
+#define _CHM_ITSP_V1_LEN (0x54)
+struct chmItspHeader
+{
+ char signature[4]; /* 0 (ITSP) */
+ Int32 version; /* 4 */
+ Int32 header_len; /* 8 */
+ Int32 unknown_000c; /* c */
+ UInt32 block_len; /* 10 */
+ Int32 blockidx_intvl; /* 14 */
+ Int32 index_depth; /* 18 */
+ Int32 index_root; /* 1c */
+ Int32 index_head; /* 20 */
+ Int32 unknown_0024; /* 24 */
+ UInt32 num_blocks; /* 28 */
+ Int32 unknown_002c; /* 2c */
+ UInt32 lang_id; /* 30 */
+ UChar system_uuid[16]; /* 34 */
+ UChar unknown_0044[16]; /* 44 */
+}; /* __attribute__ ((aligned (1))); */
+
+static int _unmarshal_itsp_header(unsigned char **pData,
+ unsigned int *pDataLen,
+ struct chmItspHeader *dest)
+{
+ /* we only know how to deal with a 0x54 byte structures */
+ if (*pDataLen != _CHM_ITSP_V1_LEN)
+ return 0;
+
+ /* unmarshal fields */
+ _unmarshal_char_array(pData, pDataLen, dest->signature, 4);
+ _unmarshal_int32 (pData, pDataLen, &dest->version);
+ _unmarshal_int32 (pData, pDataLen, &dest->header_len);
+ _unmarshal_int32 (pData, pDataLen, &dest->unknown_000c);
+ _unmarshal_uint32 (pData, pDataLen, &dest->block_len);
+ _unmarshal_int32 (pData, pDataLen, &dest->blockidx_intvl);
+ _unmarshal_int32 (pData, pDataLen, &dest->index_depth);
+ _unmarshal_int32 (pData, pDataLen, &dest->index_root);
+ _unmarshal_int32 (pData, pDataLen, &dest->index_head);
+ _unmarshal_int32 (pData, pDataLen, &dest->unknown_0024);
+ _unmarshal_uint32 (pData, pDataLen, &dest->num_blocks);
+ _unmarshal_int32 (pData, pDataLen, &dest->unknown_002c);
+ _unmarshal_uint32 (pData, pDataLen, &dest->lang_id);
+ _unmarshal_uuid (pData, pDataLen, dest->system_uuid);
+ _unmarshal_uchar_array(pData, pDataLen, dest->unknown_0044, 16);
+
+ /* error check the data */
+ if (memcmp(dest->signature, "ITSP", 4) != 0)
+ return 0;
+ if (dest->version != 1)
+ return 0;
+ if (dest->header_len != _CHM_ITSP_V1_LEN)
+ return 0;
+
+ return 1;
+}
+
+/* structure of PMGL headers */
+static const char _chm_pmgl_marker[4] = "PMGL";
+#define _CHM_PMGL_LEN (0x14)
+struct chmPmglHeader
+{
+ char signature[4]; /* 0 (PMGL) */
+ UInt32 free_space; /* 4 */
+ UInt32 unknown_0008; /* 8 */
+ Int32 block_prev; /* c */
+ Int32 block_next; /* 10 */
+}; /* __attribute__ ((aligned (1))); */
+
+static int _unmarshal_pmgl_header(unsigned char **pData,
+ unsigned int *pDataLen,
+ struct chmPmglHeader *dest)
+{
+ /* we only know how to deal with a 0x14 byte structures */
+ if (*pDataLen != _CHM_PMGL_LEN)
+ return 0;
+
+ /* unmarshal fields */
+ _unmarshal_char_array(pData, pDataLen, dest->signature, 4);
+ _unmarshal_uint32 (pData, pDataLen, &dest->free_space);
+ _unmarshal_uint32 (pData, pDataLen, &dest->unknown_0008);
+ _unmarshal_int32 (pData, pDataLen, &dest->block_prev);
+ _unmarshal_int32 (pData, pDataLen, &dest->block_next);
+
+ /* check structure */
+ if (memcmp(dest->signature, _chm_pmgl_marker, 4) != 0)
+ return 0;
+
+ return 1;
+}
+
+/* structure of PMGI headers */
+static const char _chm_pmgi_marker[4] = "PMGI";
+#define _CHM_PMGI_LEN (0x08)
+struct chmPmgiHeader
+{
+ char signature[4]; /* 0 (PMGI) */
+ UInt32 free_space; /* 4 */
+}; /* __attribute__ ((aligned (1))); */
+
+static int _unmarshal_pmgi_header(unsigned char **pData,
+ unsigned int *pDataLen,
+ struct chmPmgiHeader *dest)
+{
+ /* we only know how to deal with a 0x8 byte structures */
+ if (*pDataLen != _CHM_PMGI_LEN)
+ return 0;
+
+ /* unmarshal fields */
+ _unmarshal_char_array(pData, pDataLen, dest->signature, 4);
+ _unmarshal_uint32 (pData, pDataLen, &dest->free_space);
+
+ /* check structure */
+ if (memcmp(dest->signature, _chm_pmgi_marker, 4) != 0)
+ return 0;
+
+ return 1;
+}
+
+/* structure of LZXC reset table */
+#define _CHM_LZXC_RESETTABLE_V1_LEN (0x28)
+struct chmLzxcResetTable
+{
+ UInt32 version;
+ UInt32 block_count;
+ UInt32 unknown;
+ UInt32 table_offset;
+ UInt64 uncompressed_len;
+ UInt64 compressed_len;
+ UInt64 block_len;
+}; /* __attribute__ ((aligned (1))); */
+
+static int _unmarshal_lzxc_reset_table(unsigned char **pData,
+ unsigned int *pDataLen,
+ struct chmLzxcResetTable *dest)
+{
+ /* we only know how to deal with a 0x28 byte structures */
+ if (*pDataLen != _CHM_LZXC_RESETTABLE_V1_LEN)
+ return 0;
+
+ /* unmarshal fields */
+ _unmarshal_uint32 (pData, pDataLen, &dest->version);
+ _unmarshal_uint32 (pData, pDataLen, &dest->block_count);
+ _unmarshal_uint32 (pData, pDataLen, &dest->unknown);
+ _unmarshal_uint32 (pData, pDataLen, &dest->table_offset);
+ _unmarshal_uint64 (pData, pDataLen, &dest->uncompressed_len);
+ _unmarshal_uint64 (pData, pDataLen, &dest->compressed_len);
+ _unmarshal_uint64 (pData, pDataLen, &dest->block_len);
+
+ /* check structure */
+ if (dest->version != 2)
+ return 0;
+
+ return 1;
+}
+
+/* structure of LZXC control data block */
+#define _CHM_LZXC_MIN_LEN (0x18)
+#define _CHM_LZXC_V2_LEN (0x1c)
+struct chmLzxcControlData
+{
+ UInt32 size; /* 0 */
+ char signature[4]; /* 4 (LZXC) */
+ UInt32 version; /* 8 */
+ UInt32 resetInterval; /* c */
+ UInt32 windowSize; /* 10 */
+ UInt32 windowsPerReset; /* 14 */
+ UInt32 unknown_18; /* 18 */
+};
+
+static int _unmarshal_lzxc_control_data(unsigned char **pData,
+ unsigned int *pDataLen,
+ struct chmLzxcControlData *dest)
+{
+ /* we want at least 0x18 bytes */
+ if (*pDataLen < _CHM_LZXC_MIN_LEN)
+ return 0;
+
+ /* unmarshal fields */
+ _unmarshal_uint32 (pData, pDataLen, &dest->size);
+ _unmarshal_char_array(pData, pDataLen, dest->signature, 4);
+ _unmarshal_uint32 (pData, pDataLen, &dest->version);
+ _unmarshal_uint32 (pData, pDataLen, &dest->resetInterval);
+ _unmarshal_uint32 (pData, pDataLen, &dest->windowSize);
+ _unmarshal_uint32 (pData, pDataLen, &dest->windowsPerReset);
+
+ if (*pDataLen >= _CHM_LZXC_V2_LEN)
+ _unmarshal_uint32 (pData, pDataLen, &dest->unknown_18);
+ else
+ dest->unknown_18 = 0;
+
+ if (dest->version == 2)
+ {
+ dest->resetInterval *= 0x8000;
+ dest->windowSize *= 0x8000;
+ }
+ if (dest->windowSize == 0 || dest->resetInterval == 0)
+ return 0;
+
+ /* for now, only support resetInterval a multiple of windowSize/2 */
+ if (dest->windowSize == 1)
+ return 0;
+ if ((dest->resetInterval % (dest->windowSize/2)) != 0)
+ return 0;
+
+ /* check structure */
+ if (memcmp(dest->signature, "LZXC", 4) != 0)
+ return 0;
+
+ return 1;
+}
+
+/* the structure used for chm file handles */
+struct chmFile
+{
+#ifdef WIN32
+ HANDLE fd;
+#else
+ int fd;
+#endif
+
+#ifdef CHM_MT
+#ifdef WIN32
+ CRITICAL_SECTION mutex;
+ CRITICAL_SECTION lzx_mutex;
+ CRITICAL_SECTION cache_mutex;
+#else
+ pthread_mutex_t mutex;
+ pthread_mutex_t lzx_mutex;
+ pthread_mutex_t cache_mutex;
+#endif
+#endif
+
+ UInt64 dir_offset;
+ UInt64 dir_len;
+ UInt64 data_offset;
+ Int32 index_root;
+ Int32 index_head;
+ UInt32 block_len;
+
+ UInt64 span;
+ struct chmUnitInfo rt_unit;
+ struct chmUnitInfo cn_unit;
+ struct chmLzxcResetTable reset_table;
+
+ /* LZX control data */
+ int compression_enabled;
+ UInt32 window_size;
+ UInt32 reset_interval;
+ UInt32 reset_blkcount;
+
+ /* decompressor state */
+ struct LZXstate *lzx_state;
+ int lzx_last_block;
+
+ /* cache for decompressed blocks */
+ UChar **cache_blocks;
+ UInt64 *cache_block_indices;
+ Int32 cache_num_blocks;
+};
+
+/*
+ * utility functions local to this module
+ */
+
+/* utility function to handle differences between {pread,read}(64)? */
+static Int64 _chm_fetch_bytes(struct chmFile *h,
+ UChar *buf,
+ UInt64 os,
+ Int64 len)
+{
+ Int64 readLen=0, oldOs=0;
+ if (h->fd == CHM_NULL_FD)
+ return readLen;
+
+ CHM_ACQUIRE_LOCK(h->mutex);
+#ifdef CHM_USE_WIN32IO
+ /* NOTE: this might be better done with CreateFileMapping, et cetera... */
+ {
+ DWORD origOffsetLo=0, origOffsetHi=0;
+ DWORD offsetLo, offsetHi;
+ DWORD actualLen=0;
+
+ /* awkward Win32 Seek/Tell */
+ offsetLo = (unsigned int)(os & 0xffffffffL);
+ offsetHi = (unsigned int)((os >> 32) & 0xffffffffL);
+ origOffsetLo = SetFilePointer(h->fd, 0, &origOffsetHi, FILE_CURRENT);
+ offsetLo = SetFilePointer(h->fd, offsetLo, &offsetHi, FILE_BEGIN);
+
+ /* read the data */
+ if (ReadFile(h->fd,
+ buf,
+ (DWORD)len,
+ &actualLen,
+ NULL) == TRUE)
+ readLen = actualLen;
+ else
+ readLen = 0;
+
+ /* restore original position */
+ SetFilePointer(h->fd, origOffsetLo, &origOffsetHi, FILE_BEGIN);
+ }
+#else
+#ifdef CHM_USE_PREAD
+#ifdef CHM_USE_IO64
+ readLen = pread64(h->fd, buf, (long)len, os);
+#else
+ readLen = pread(h->fd, buf, (long)len, (unsigned int)os);
+#endif
+#else
+#ifdef CHM_USE_IO64
+ oldOs = lseek64(h->fd, 0, SEEK_CUR);
+ lseek64(h->fd, os, SEEK_SET);
+ readLen = read(h->fd, buf, len);
+ lseek64(h->fd, oldOs, SEEK_SET);
+#else
+ oldOs = lseek(h->fd, 0, SEEK_CUR);
+ lseek(h->fd, (long)os, SEEK_SET);
+ readLen = read(h->fd, buf, len);
+ lseek(h->fd, (long)oldOs, SEEK_SET);
+#endif
+#endif
+#endif
+ CHM_RELEASE_LOCK(h->mutex);
+ return readLen;
+}
+
+/* open an ITS archive */
+#ifdef PPC_BSTR
+/* RWE 6/12/2003 */
+struct chmFile *chm_open(BSTR filename)
+#else
+struct chmFile *chm_open(const char *filename)
+#endif
+{
+ unsigned char sbuffer[256];
+ unsigned int sremain;
+ unsigned char *sbufpos;
+ struct chmFile *newHandle=NULL;
+ struct chmItsfHeader itsfHeader;
+ struct chmItspHeader itspHeader;
+#if 0
+ struct chmUnitInfo uiSpan;
+#endif
+ struct chmUnitInfo uiLzxc;
+ struct chmLzxcControlData ctlData;
+
+ /* allocate handle */
+ newHandle = (struct chmFile *)malloc(sizeof(struct chmFile));
+ if (newHandle == NULL)
+ return NULL;
+ newHandle->fd = CHM_NULL_FD;
+ newHandle->lzx_state = NULL;
+ newHandle->cache_blocks = NULL;
+ newHandle->cache_block_indices = NULL;
+ newHandle->cache_num_blocks = 0;
+
+ /* open file */
+#ifdef WIN32
+#ifdef PPC_BSTR
+ if ((newHandle->fd=CreateFile(filename,
+ GENERIC_READ,
+ FILE_SHARE_READ,
+ NULL,
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL)) == CHM_NULL_FD)
+ {
+ free(newHandle);
+ return NULL;
+ }
+#else
+ if ((newHandle->fd=CreateFileA(filename,
+ GENERIC_READ,
+ 0,
+ NULL,
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL)) == CHM_NULL_FD)
+ {
+ free(newHandle);
+ return NULL;
+ }
+#endif
+#else
+ if ((newHandle->fd=open(filename, O_RDONLY)) == CHM_NULL_FD)
+ {
+ free(newHandle);
+ return NULL;
+ }
+#endif
+
+ /* initialize mutexes, if needed */
+#ifdef CHM_MT
+#ifdef WIN32
+ InitializeCriticalSection(&newHandle->mutex);
+ InitializeCriticalSection(&newHandle->lzx_mutex);
+ InitializeCriticalSection(&newHandle->cache_mutex);
+#else
+ pthread_mutex_init(&newHandle->mutex, NULL);
+ pthread_mutex_init(&newHandle->lzx_mutex, NULL);
+ pthread_mutex_init(&newHandle->cache_mutex, NULL);
+#endif
+#endif
+
+ /* read and verify header */
+ sremain = _CHM_ITSF_V3_LEN;
+ sbufpos = sbuffer;
+ if (_chm_fetch_bytes(newHandle, sbuffer, (UInt64)0, sremain) != sremain ||
+ !_unmarshal_itsf_header(&sbufpos, &sremain, &itsfHeader))
+ {
+ chm_close(newHandle);
+ return NULL;
+ }
+
+ /* stash important values from header */
+ newHandle->dir_offset = itsfHeader.dir_offset;
+ newHandle->dir_len = itsfHeader.dir_len;
+ newHandle->data_offset = itsfHeader.data_offset;
+
+ /* now, read and verify the directory header chunk */
+ sremain = _CHM_ITSP_V1_LEN;
+ sbufpos = sbuffer;
+ if (_chm_fetch_bytes(newHandle, sbuffer,
+ (UInt64)itsfHeader.dir_offset, sremain) != sremain ||
+ !_unmarshal_itsp_header(&sbufpos, &sremain, &itspHeader))
+ {
+ chm_close(newHandle);
+ return NULL;
+ }
+
+ /* grab essential information from ITSP header */
+ newHandle->dir_offset += itspHeader.header_len;
+ newHandle->dir_len -= itspHeader.header_len;
+ newHandle->index_root = itspHeader.index_root;
+ newHandle->index_head = itspHeader.index_head;
+ newHandle->block_len = itspHeader.block_len;
+
+ /* if the index root is -1, this means we don't have any PMGI blocks.
+ * as a result, we must use the sole PMGL block as the index root
+ */
+ if (newHandle->index_root <= -1)
+ newHandle->index_root = newHandle->index_head;
+
+ /* By default, compression is enabled. */
+ newHandle->compression_enabled = 1;
+
+/* Jed, Sun Jun 27: 'span' doesn't seem to be used anywhere?! */
+#if 0
+ /* fetch span */
+ if (CHM_RESOLVE_SUCCESS != chm_resolve_object(newHandle,
+ _CHMU_SPANINFO,
+ &uiSpan) ||
+ uiSpan.space == CHM_COMPRESSED)
+ {
+ chm_close(newHandle);
+ return NULL;
+ }
+
+ /* N.B.: we've already checked that uiSpan is in the uncompressed section,
+ * so this should not require attempting to decompress, which may
+ * rely on having a valid "span"
+ */
+ sremain = 8;
+ sbufpos = sbuffer;
+ if (chm_retrieve_object(newHandle, &uiSpan, sbuffer,
+ 0, sremain) != sremain ||
+ !_unmarshal_uint64(&sbufpos, &sremain, &newHandle->span))
+ {
+ chm_close(newHandle);
+ return NULL;
+ }
+#endif
+
+ /* prefetch most commonly needed unit infos */
+ if (CHM_RESOLVE_SUCCESS != chm_resolve_object(newHandle,
+ _CHMU_RESET_TABLE,
+ &newHandle->rt_unit) ||
+ newHandle->rt_unit.space == CHM_COMPRESSED ||
+ CHM_RESOLVE_SUCCESS != chm_resolve_object(newHandle,
+ _CHMU_CONTENT,
+ &newHandle->cn_unit) ||
+ newHandle->cn_unit.space == CHM_COMPRESSED ||
+ CHM_RESOLVE_SUCCESS != chm_resolve_object(newHandle,
+ _CHMU_LZXC_CONTROLDATA,
+ &uiLzxc) ||
+ uiLzxc.space == CHM_COMPRESSED)
+ {
+ newHandle->compression_enabled = 0;
+ }
+
+ /* read reset table info */
+ if (newHandle->compression_enabled)
+ {
+ sremain = _CHM_LZXC_RESETTABLE_V1_LEN;
+ sbufpos = sbuffer;
+ if (chm_retrieve_object(newHandle, &newHandle->rt_unit, sbuffer,
+ 0, sremain) != sremain ||
+ !_unmarshal_lzxc_reset_table(&sbufpos, &sremain,
+ &newHandle->reset_table))
+ {
+ newHandle->compression_enabled = 0;
+ }
+ }
+
+ /* read control data */
+ if (newHandle->compression_enabled)
+ {
+ sremain = (unsigned int)uiLzxc.length;
+ if (uiLzxc.length > sizeof(sbuffer))
+ {
+ chm_close(newHandle);
+ return NULL;
+ }
+
+ sbufpos = sbuffer;
+ if (chm_retrieve_object(newHandle, &uiLzxc, sbuffer,
+ 0, sremain) != sremain ||
+ !_unmarshal_lzxc_control_data(&sbufpos, &sremain,
+ &ctlData))
+ {
+ newHandle->compression_enabled = 0;
+ }
+
+ newHandle->window_size = ctlData.windowSize;
+ newHandle->reset_interval = ctlData.resetInterval;
+
+/* Jed, Mon Jun 28: Experimentally, it appears that the reset block count */
+/* must be multiplied by this formerly unknown ctrl data field in */
+/* order to decompress some files. */
+#if 0
+ newHandle->reset_blkcount = newHandle->reset_interval /
+ (newHandle->window_size / 2);
+#else
+ newHandle->reset_blkcount = newHandle->reset_interval /
+ (newHandle->window_size / 2) *
+ ctlData.windowsPerReset;
+#endif
+ }
+
+ /* initialize cache */
+ chm_set_param(newHandle, CHM_PARAM_MAX_BLOCKS_CACHED,
+ CHM_MAX_BLOCKS_CACHED);
+
+ return newHandle;
+}
+
+/* close an ITS archive */
+void chm_close(struct chmFile *h)
+{
+ if (h != NULL)
+ {
+ if (h->fd != CHM_NULL_FD)
+ CHM_CLOSE_FILE(h->fd);
+ h->fd = CHM_NULL_FD;
+
+#ifdef CHM_MT
+#ifdef WIN32
+ DeleteCriticalSection(&h->mutex);
+ DeleteCriticalSection(&h->lzx_mutex);
+ DeleteCriticalSection(&h->cache_mutex);
+#else
+ pthread_mutex_destroy(&h->mutex);
+ pthread_mutex_destroy(&h->lzx_mutex);
+ pthread_mutex_destroy(&h->cache_mutex);
+#endif
+#endif
+
+ if (h->lzx_state)
+ LZXteardown(h->lzx_state);
+ h->lzx_state = NULL;
+
+ if (h->cache_blocks)
+ {
+ int i;
+ for (i=0; i<h->cache_num_blocks; i++)
+ {
+ if (h->cache_blocks[i])
+ free(h->cache_blocks[i]);
+ }
+ free(h->cache_blocks);
+ h->cache_blocks = NULL;
+ }
+
+ if (h->cache_block_indices)
+ free(h->cache_block_indices);
+ h->cache_block_indices = NULL;
+
+ free(h);
+ }
+}
+
+/*
+ * set a parameter on the file handle.
+ * valid parameter types:
+ * CHM_PARAM_MAX_BLOCKS_CACHED:
+ * how many decompressed blocks should be cached? A simple
+ * caching scheme is used, wherein the index of the block is
+ * used as a hash value, and hash collision results in the
+ * invalidation of the previously cached block.
+ */
+void chm_set_param(struct chmFile *h,
+ int paramType,
+ int paramVal)
+{
+ switch (paramType)
+ {
+ case CHM_PARAM_MAX_BLOCKS_CACHED:
+ CHM_ACQUIRE_LOCK(h->cache_mutex);
+ if (paramVal != h->cache_num_blocks)
+ {
+ UChar **newBlocks;
+ UInt64 *newIndices;
+ int i;
+
+ /* allocate new cached blocks */
+ newBlocks = (UChar **)malloc(paramVal * sizeof (UChar *));
+ if (newBlocks == NULL) return;
+ newIndices = (UInt64 *)malloc(paramVal * sizeof (UInt64));
+ if (newIndices == NULL) { free(newBlocks); return; }
+ for (i=0; i<paramVal; i++)
+ {
+ newBlocks[i] = NULL;
+ newIndices[i] = 0;
+ }
+
+ /* re-distribute old cached blocks */
+ if (h->cache_blocks)
+ {
+ for (i=0; i<h->cache_num_blocks; i++)
+ {
+ int newSlot = (int)(h->cache_block_indices[i] % paramVal);
+
+ if (h->cache_blocks[i])
+ {
+ /* in case of collision, destroy newcomer */
+ if (newBlocks[newSlot])
+ {
+ free(h->cache_blocks[i]);
+ h->cache_blocks[i] = NULL;
+ }
+ else
+ {
+ newBlocks[newSlot] = h->cache_blocks[i];
+ newIndices[newSlot] =
+ h->cache_block_indices[i];
+ }
+ }
+ }
+
+ free(h->cache_blocks);
+ free(h->cache_block_indices);
+ }
+
+ /* now, set new values */
+ h->cache_blocks = newBlocks;
+ h->cache_block_indices = newIndices;
+ h->cache_num_blocks = paramVal;
+ }
+ CHM_RELEASE_LOCK(h->cache_mutex);
+ break;
+
+ default:
+ break;
+ }
+}
+
+/*
+ * helper methods for chm_resolve_object
+ */
+
+/* skip a compressed dword */
+static void _chm_skip_cword(UChar **pEntry)
+{
+ while (*(*pEntry)++ >= 0x80)
+ ;
+}
+
+/* skip the data from a PMGL entry */
+static void _chm_skip_PMGL_entry_data(UChar **pEntry)
+{
+ _chm_skip_cword(pEntry);
+ _chm_skip_cword(pEntry);
+ _chm_skip_cword(pEntry);
+}
+
+/* parse a compressed dword */
+static UInt64 _chm_parse_cword(UChar **pEntry)
+{
+ UInt64 accum = 0;
+ UChar temp;
+ while ((temp=*(*pEntry)++) >= 0x80)
+ {
+ accum <<= 7;
+ accum += temp & 0x7f;
+ }
+
+ return (accum << 7) + temp;
+}
+
+/* parse a utf-8 string into an ASCII char buffer */
+static int _chm_parse_UTF8(UChar **pEntry, UInt64 count, char *path)
+{
+ /* XXX: implement UTF-8 support, including a real mapping onto
+ * ISO-8859-1? probably there is a library to do this? As is
+ * immediately apparent from the below code, I'm presently not doing
+ * any special handling for files in which none of the strings contain
+ * UTF-8 multi-byte characters.
+ */
+ while (count != 0)
+ {
+ *path++ = (char)(*(*pEntry)++);
+ --count;
+ }
+
+ *path = '\0';
+ return 1;
+}
+
+/* parse a PMGL entry into a chmUnitInfo struct; return 1 on success. */
+static int _chm_parse_PMGL_entry(UChar **pEntry, struct chmUnitInfo *ui)
+{
+ UInt64 strLen;
+
+ /* parse str len */
+ strLen = _chm_parse_cword(pEntry);
+ if (strLen > CHM_MAX_PATHLEN)
+ return 0;
+
+ /* parse path */
+ if (! _chm_parse_UTF8(pEntry, strLen, ui->path))
+ return 0;
+
+ /* parse info */
+ ui->space = (int)_chm_parse_cword(pEntry);
+ ui->start = _chm_parse_cword(pEntry);
+ ui->length = _chm_parse_cword(pEntry);
+ return 1;
+}
+
+/* find an exact entry in PMGL; return NULL if we fail */
+static UChar *_chm_find_in_PMGL(UChar *page_buf,
+ UInt32 block_len,
+ const char *objPath)
+{
+ /* XXX: modify this to do a binary search using the nice index structure
+ * that is provided for us.
+ */
+ struct chmPmglHeader header;
+ unsigned int hremain;
+ UChar *end;
+ UChar *cur;
+ UChar *temp;
+ UInt64 strLen;
+ char buffer[CHM_MAX_PATHLEN+1];
+
+ /* figure out where to start and end */
+ cur = page_buf;
+ hremain = _CHM_PMGL_LEN;
+ if (! _unmarshal_pmgl_header(&cur, &hremain, &header))
+ return NULL;
+ end = page_buf + block_len - (header.free_space);
+
+ /* now, scan progressively */
+ while (cur < end)
+ {
+ /* grab the name */
+ temp = cur;
+ strLen = _chm_parse_cword(&cur);
+ if (strLen > CHM_MAX_PATHLEN)
+ return NULL;
+ if (! _chm_parse_UTF8(&cur, strLen, buffer))
+ return NULL;
+
+ /* check if it is the right name */
+ if (! strcasecmp(buffer, objPath))
+ return temp;
+
+ _chm_skip_PMGL_entry_data(&cur);
+ }
+
+ return NULL;
+}
+
+/* find which block should be searched next for the entry; -1 if no block */
+static Int32 _chm_find_in_PMGI(UChar *page_buf,
+ UInt32 block_len,
+ const char *objPath)
+{
+ /* XXX: modify this to do a binary search using the nice index structure
+ * that is provided for us
+ */
+ struct chmPmgiHeader header;
+ unsigned int hremain;
+ int page=-1;
+ UChar *end;
+ UChar *cur;
+ UInt64 strLen;
+ char buffer[CHM_MAX_PATHLEN+1];
+
+ /* figure out where to start and end */
+ cur = page_buf;
+ hremain = _CHM_PMGI_LEN;
+ if (! _unmarshal_pmgi_header(&cur, &hremain, &header))
+ return -1;
+ end = page_buf + block_len - (header.free_space);
+
+ /* now, scan progressively */
+ while (cur < end)
+ {
+ /* grab the name */
+ strLen = _chm_parse_cword(&cur);
+ if (strLen > CHM_MAX_PATHLEN)
+ return -1;
+ if (! _chm_parse_UTF8(&cur, strLen, buffer))
+ return -1;
+
+ /* check if it is the right name */
+ if (strcasecmp(buffer, objPath) > 0)
+ return page;
+
+ /* load next value for path */
+ page = (int)_chm_parse_cword(&cur);
+ }
+
+ return page;
+}
+
+/* resolve a particular object from the archive */
+int chm_resolve_object(struct chmFile *h,
+ const char *objPath,
+ struct chmUnitInfo *ui)
+{
+ /*
+ * XXX: implement caching scheme for dir pages
+ */
+
+ Int32 curPage;
+
+ /* buffer to hold whatever page we're looking at */
+ /* RWE 6/12/2003 */
+ UChar *page_buf = malloc(h->block_len);
+ if (page_buf == NULL)
+ return CHM_RESOLVE_FAILURE;
+
+ /* starting page */
+ curPage = h->index_root;
+
+ /* until we have either returned or given up */
+ while (curPage != -1)
+ {
+
+ /* try to fetch the index page */
+ if (_chm_fetch_bytes(h, page_buf,
+ (UInt64)h->dir_offset + (UInt64)curPage*h->block_len,
+ h->block_len) != h->block_len)
+ {
+ free(page_buf);
+ return CHM_RESOLVE_FAILURE;
+ }
+
+ /* now, if it is a leaf node: */
+ if (memcmp(page_buf, _chm_pmgl_marker, 4) == 0)
+ {
+ /* scan block */
+ UChar *pEntry = _chm_find_in_PMGL(page_buf,
+ h->block_len,
+ objPath);
+ if (pEntry == NULL)
+ {
+ free(page_buf);
+ return CHM_RESOLVE_FAILURE;
+ }
+
+ /* parse entry and return */
+ _chm_parse_PMGL_entry(&pEntry, ui);
+ free(page_buf);
+ return CHM_RESOLVE_SUCCESS;
+ }
+
+ /* else, if it is a branch node: */
+ else if (memcmp(page_buf, _chm_pmgi_marker, 4) == 0)
+ curPage = _chm_find_in_PMGI(page_buf, h->block_len, objPath);
+
+ /* else, we are confused. give up. */
+ else
+ {
+ free(page_buf);
+ return CHM_RESOLVE_FAILURE;
+ }
+ }
+
+ /* didn't find anything. fail. */
+ free(page_buf);
+ return CHM_RESOLVE_FAILURE;
+}
+
+/*
+ * utility methods for dealing with compressed data
+ */
+
+/* get the bounds of a compressed block. return 0 on failure */
+static int _chm_get_cmpblock_bounds(struct chmFile *h,
+ UInt64 block,
+ UInt64 *start,
+ Int64 *len)
+{
+ UChar buffer[8], *dummy;
+ unsigned int remain;
+
+ /* for all but the last block, use the reset table */
+ if (block < h->reset_table.block_count-1)
+ {
+ /* unpack the start address */
+ dummy = buffer;
+ remain = 8;
+ if (_chm_fetch_bytes(h, buffer,
+ (UInt64)h->data_offset
+ + (UInt64)h->rt_unit.start
+ + (UInt64)h->reset_table.table_offset
+ + (UInt64)block*8,
+ remain) != remain ||
+ !_unmarshal_uint64(&dummy, &remain, start))
+ return 0;
+
+ /* unpack the end address */
+ dummy = buffer;
+ remain = 8;
+ if (_chm_fetch_bytes(h, buffer,
+ (UInt64)h->data_offset
+ + (UInt64)h->rt_unit.start
+ + (UInt64)h->reset_table.table_offset
+ + (UInt64)block*8 + 8,
+ remain) != remain ||
+ !_unmarshal_int64(&dummy, &remain, len))
+ return 0;
+ }
+
+ /* for the last block, use the span in addition to the reset table */
+ else
+ {
+ /* unpack the start address */
+ dummy = buffer;
+ remain = 8;
+ if (_chm_fetch_bytes(h, buffer,
+ (UInt64)h->data_offset
+ + (UInt64)h->rt_unit.start
+ + (UInt64)h->reset_table.table_offset
+ + (UInt64)block*8,
+ remain) != remain ||
+ !_unmarshal_uint64(&dummy, &remain, start))
+ return 0;
+
+ *len = h->reset_table.compressed_len;
+ }
+
+ /* compute the length and absolute start address */
+ *len -= *start;
+ *start += h->data_offset + h->cn_unit.start;
+
+ return 1;
+}
+
+/* decompress the block. must have lzx_mutex. */
+static Int64 _chm_decompress_block(struct chmFile *h,
+ UInt64 block,
+ UChar **ubuffer)
+{
+ UChar *cbuffer = malloc(((unsigned int)h->reset_table.block_len + 6144));
+ UInt64 cmpStart; /* compressed start */
+ Int64 cmpLen; /* compressed len */
+ int indexSlot; /* cache index slot */
+ UChar *lbuffer; /* local buffer ptr */
+ UInt32 blockAlign = (UInt32)(block % h->reset_blkcount); /* reset intvl. aln. */
+ UInt32 i; /* local loop index */
+
+ if (cbuffer == NULL)
+ return -1;
+
+ /* let the caching system pull its weight! */
+ if (block - blockAlign <= h->lzx_last_block &&
+ block >= h->lzx_last_block)
+ blockAlign = (block - h->lzx_last_block);
+
+ /* check if we need previous blocks */
+ if (blockAlign != 0)
+ {
+ /* fetch all required previous blocks since last reset */
+ for (i = blockAlign; i > 0; i--)
+ {
+ UInt32 curBlockIdx = block - i;
+
+ /* check if we most recently decompressed the previous block */
+ if (h->lzx_last_block != curBlockIdx)
+ {
+ if ((curBlockIdx % h->reset_blkcount) == 0)
+ {
+#ifdef CHM_DEBUG
+ fprintf(stderr, "***RESET (1)***\n");
+#endif
+ LZXreset(h->lzx_state);
+ }
+
+ indexSlot = (int)((curBlockIdx) % h->cache_num_blocks);
+ if (! h->cache_blocks[indexSlot])
+ h->cache_blocks[indexSlot] = (UChar *)malloc((unsigned int)(h->reset_table.block_len));
+ if (! h->cache_blocks[indexSlot])
+ {
+ free(cbuffer);
+ return -1;
+ }
+ h->cache_block_indices[indexSlot] = curBlockIdx;
+ lbuffer = h->cache_blocks[indexSlot];
+
+ /* decompress the previous block */
+#ifdef CHM_DEBUG
+ fprintf(stderr, "Decompressing block #%4d (EXTRA)\n", curBlockIdx);
+#endif
+ if (!_chm_get_cmpblock_bounds(h, curBlockIdx, &cmpStart, &cmpLen) ||
+ cmpLen < 0 ||
+ cmpLen > h->reset_table.block_len + 6144 ||
+ _chm_fetch_bytes(h, cbuffer, cmpStart, cmpLen) != cmpLen ||
+ LZXdecompress(h->lzx_state, cbuffer, lbuffer, (int)cmpLen,
+ (int)h->reset_table.block_len) != DECR_OK)
+ {
+#ifdef CHM_DEBUG
+ fprintf(stderr, " (DECOMPRESS FAILED!)\n");
+#endif
+ free(cbuffer);
+ return (Int64)0;
+ }
+
+ h->lzx_last_block = (int)curBlockIdx;
+ }
+ }
+ }
+ else
+ {
+ if ((block % h->reset_blkcount) == 0)
+ {
+#ifdef CHM_DEBUG
+ fprintf(stderr, "***RESET (2)***\n");
+#endif
+ LZXreset(h->lzx_state);
+ }
+ }
+
+ /* allocate slot in cache */
+ indexSlot = (int)(block % h->cache_num_blocks);
+ if (! h->cache_blocks[indexSlot])
+ h->cache_blocks[indexSlot] = (UChar *)malloc(((unsigned int)h->reset_table.block_len));
+ if (! h->cache_blocks[indexSlot])
+ {
+ free(cbuffer);
+ return -1;
+ }
+ h->cache_block_indices[indexSlot] = block;
+ lbuffer = h->cache_blocks[indexSlot];
+ *ubuffer = lbuffer;
+
+ /* decompress the block we actually want */
+#ifdef CHM_DEBUG
+ fprintf(stderr, "Decompressing block #%4d (REAL )\n", block);
+#endif
+ if (! _chm_get_cmpblock_bounds(h, block, &cmpStart, &cmpLen) ||
+ _chm_fetch_bytes(h, cbuffer, cmpStart, cmpLen) != cmpLen ||
+ LZXdecompress(h->lzx_state, cbuffer, lbuffer, (int)cmpLen,
+ (int)h->reset_table.block_len) != DECR_OK)
+ {
+#ifdef CHM_DEBUG
+ fprintf(stderr, " (DECOMPRESS FAILED!)\n");
+#endif
+ free(cbuffer);
+ return (Int64)0;
+ }
+ h->lzx_last_block = (int)block;
+
+ /* XXX: modify LZX routines to return the length of the data they
+ * decompressed and return that instead, for an extra sanity check.
+ */
+ free(cbuffer);
+ return h->reset_table.block_len;
+}
+
+/* grab a region from a compressed block */
+static Int64 _chm_decompress_region(struct chmFile *h,
+ UChar *buf,
+ UInt64 start,
+ Int64 len)
+{
+ UInt64 nBlock, nOffset;
+ UInt64 nLen;
+ UInt64 gotLen;
+ UChar *ubuffer;
+
+ if (len <= 0)
+ return (Int64)0;
+
+ /* figure out what we need to read */
+ nBlock = start / h->reset_table.block_len;
+ nOffset = start % h->reset_table.block_len;
+ nLen = len;
+ if (nLen > (h->reset_table.block_len - nOffset))
+ nLen = h->reset_table.block_len - nOffset;
+
+ /* if block is cached, return data from it. */
+ CHM_ACQUIRE_LOCK(h->lzx_mutex);
+ CHM_ACQUIRE_LOCK(h->cache_mutex);
+ if (h->cache_block_indices[nBlock % h->cache_num_blocks] == nBlock &&
+ h->cache_blocks[nBlock % h->cache_num_blocks] != NULL)
+ {
+ memcpy(buf,
+ h->cache_blocks[nBlock % h->cache_num_blocks] + nOffset,
+ (unsigned int)nLen);
+ CHM_RELEASE_LOCK(h->cache_mutex);
+ CHM_RELEASE_LOCK(h->lzx_mutex);
+ return nLen;
+ }
+ CHM_RELEASE_LOCK(h->cache_mutex);
+
+ /* data request not satisfied, so... start up the decompressor machine */
+ if (! h->lzx_state)
+ {
+ int window_size = ffs(h->window_size) - 1;
+ h->lzx_last_block = -1;
+ h->lzx_state = LZXinit(window_size);
+ }
+
+ /* decompress some data */
+ gotLen = _chm_decompress_block(h, nBlock, &ubuffer);
+ if (gotLen < nLen)
+ nLen = gotLen;
+ memcpy(buf, ubuffer+nOffset, (unsigned int)nLen);
+ CHM_RELEASE_LOCK(h->lzx_mutex);
+ return nLen;
+}
+
+/* retrieve (part of) an object */
+LONGINT64 chm_retrieve_object(struct chmFile *h,
+ const struct chmUnitInfo *ui,
+ unsigned char *buf,
+ LONGUINT64 addr,
+ LONGINT64 len)
+{
+ /* must be valid file handle */
+ if (h == NULL)
+ return (Int64)0;
+
+ /* starting address must be in correct range */
+ if ( addr >= ui->length)
+ return (Int64)0;
+
+ /* clip length */
+ if (addr + len > ui->length)
+ len = ui->length - addr;
+
+ /* if the file is uncompressed, it's simple */
+ if (ui->space == CHM_UNCOMPRESSED)
+ {
+ /* read data */
+ return _chm_fetch_bytes(h,
+ buf,
+ (UInt64)h->data_offset + (UInt64)ui->start + (UInt64)addr,
+ len);
+ }
+
+ /* else if the file is compressed, it's a little trickier */
+ else /* ui->space == CHM_COMPRESSED */
+ {
+ Int64 swath=0, total=0;
+
+ /* if compression is not enabled for this file... */
+ if (! h->compression_enabled)
+ return total;
+
+ do {
+
+ /* swill another mouthful */
+ swath = _chm_decompress_region(h, buf, ui->start + addr, len);
+
+ /* if we didn't get any... */
+ if (swath == 0)
+ return total;
+
+ /* update stats */
+ total += swath;
+ len -= swath;
+ addr += swath;
+ buf += swath;
+
+ } while (len != 0);
+
+ return total;
+ }
+}
+
+/* enumerate the objects in the .chm archive */
+int chm_enumerate(struct chmFile *h,
+ int what,
+ CHM_ENUMERATOR e,
+ void *context)
+{
+ Int32 curPage;
+
+ /* buffer to hold whatever page we're looking at */
+ /* RWE 6/12/2003 */
+ UChar *page_buf = malloc((unsigned int)h->block_len);
+ struct chmPmglHeader header;
+ UChar *end;
+ UChar *cur;
+ unsigned int lenRemain;
+ UInt64 ui_path_len;
+
+ /* the current ui */
+ struct chmUnitInfo ui;
+ int type_bits = (what & 0x7);
+ int filter_bits = (what & 0xF8);
+
+ if (page_buf == NULL)
+ return 0;
+
+ /* starting page */
+ curPage = h->index_head;
+
+ /* until we have either returned or given up */
+ while (curPage != -1)
+ {
+
+ /* try to fetch the index page */
+ if (_chm_fetch_bytes(h,
+ page_buf,
+ (UInt64)h->dir_offset + (UInt64)curPage*h->block_len,
+ h->block_len) != h->block_len)
+ {
+ free(page_buf);
+ return 0;
+ }
+
+ /* figure out start and end for this page */
+ cur = page_buf;
+ lenRemain = _CHM_PMGL_LEN;
+ if (! _unmarshal_pmgl_header(&cur, &lenRemain, &header))
+ {
+ free(page_buf);
+ return 0;
+ }
+ end = page_buf + h->block_len - (header.free_space);
+
+ /* loop over this page */
+ while (cur < end)
+ {
+ ui.flags = 0;
+
+ if (! _chm_parse_PMGL_entry(&cur, &ui))
+ {
+ free(page_buf);
+ return 0;
+ }
+
+ /* get the length of the path */
+ ui_path_len = strlen(ui.path)-1;
+
+ /* check for DIRS */
+ if (ui.path[ui_path_len] == '/')
+ ui.flags |= CHM_ENUMERATE_DIRS;
+
+ /* check for FILES */
+ if (ui.path[ui_path_len] != '/')
+ ui.flags |= CHM_ENUMERATE_FILES;
+
+ /* check for NORMAL vs. META */
+ if (ui.path[0] == '/')
+ {
+
+ /* check for NORMAL vs. SPECIAL */
+ if (ui.path[1] == '#' || ui.path[1] == '$')
+ ui.flags |= CHM_ENUMERATE_SPECIAL;
+ else
+ ui.flags |= CHM_ENUMERATE_NORMAL;
+ }
+ else
+ ui.flags |= CHM_ENUMERATE_META;
+
+ if (! (type_bits & ui.flags))
+ continue;
+
+ if (filter_bits && ! (filter_bits & ui.flags))
+ continue;
+
+ /* call the enumerator */
+ {
+ int status = (*e)(h, &ui, context);
+ switch (status)
+ {
+ case CHM_ENUMERATOR_FAILURE:
+ free(page_buf);
+ return 0;
+ case CHM_ENUMERATOR_CONTINUE:
+ break;
+ case CHM_ENUMERATOR_SUCCESS:
+ free(page_buf);
+ return 1;
+ default:
+ break;
+ }
+ }
+ }
+
+ /* advance to next page */
+ curPage = header.block_next;
+ }
+
+ free(page_buf);
+ return 1;
+}
+
+int chm_enumerate_dir(struct chmFile *h,
+ const char *prefix,
+ int what,
+ CHM_ENUMERATOR e,
+ void *context)
+{
+ /*
+ * XXX: do this efficiently (i.e. using the tree index)
+ */
+
+ Int32 curPage;
+
+ /* buffer to hold whatever page we're looking at */
+ /* RWE 6/12/2003 */
+ UChar *page_buf = malloc((unsigned int)h->block_len);
+ struct chmPmglHeader header;
+ UChar *end;
+ UChar *cur;
+ unsigned int lenRemain;
+
+ /* set to 1 once we've started */
+ int it_has_begun=0;
+
+ /* the current ui */
+ struct chmUnitInfo ui;
+ int type_bits = (what & 0x7);
+ int filter_bits = (what & 0xF8);
+ UInt64 ui_path_len;
+
+ /* the length of the prefix */
+ char prefixRectified[CHM_MAX_PATHLEN+1];
+ int prefixLen;
+ char lastPath[CHM_MAX_PATHLEN+1];
+ int lastPathLen;
+
+ if (page_buf == NULL)
+ return 0;
+
+ /* starting page */
+ curPage = h->index_head;
+
+ /* initialize pathname state */
+ strncpy(prefixRectified, prefix, CHM_MAX_PATHLEN);
+ prefixRectified[CHM_MAX_PATHLEN] = '\0';
+ prefixLen = strlen(prefixRectified);
+ if (prefixLen != 0)
+ {
+ if (prefixRectified[prefixLen-1] != '/')
+ {
+ prefixRectified[prefixLen] = '/';
+ prefixRectified[prefixLen+1] = '\0';
+ ++prefixLen;
+ }
+ }
+ lastPath[0] = '\0';
+ lastPathLen = -1;
+
+ /* until we have either returned or given up */
+ while (curPage != -1)
+ {
+
+ /* try to fetch the index page */
+ if (_chm_fetch_bytes(h,
+ page_buf,
+ (UInt64)h->dir_offset + (UInt64)curPage*h->block_len,
+ h->block_len) != h->block_len)
+ {
+ free(page_buf);
+ return 0;
+ }
+
+ /* figure out start and end for this page */
+ cur = page_buf;
+ lenRemain = _CHM_PMGL_LEN;
+ if (! _unmarshal_pmgl_header(&cur, &lenRemain, &header))
+ {
+ free(page_buf);
+ return 0;
+ }
+ end = page_buf + h->block_len - (header.free_space);
+
+ /* loop over this page */
+ while (cur < end)
+ {
+ ui.flags = 0;
+
+ if (! _chm_parse_PMGL_entry(&cur, &ui))
+ {
+ free(page_buf);
+ return 0;
+ }
+
+ /* check if we should start */
+ if (! it_has_begun)
+ {
+ if (ui.length == 0 && strncasecmp(ui.path, prefixRectified, prefixLen) == 0)
+ it_has_begun = 1;
+ else
+ continue;
+
+ if (ui.path[prefixLen] == '\0')
+ continue;
+ }
+
+ /* check if we should stop */
+ else
+ {
+ if (strncasecmp(ui.path, prefixRectified, prefixLen) != 0)
+ {
+ free(page_buf);
+ return 1;
+ }
+ }
+
+ /* check if we should include this path */
+ if (lastPathLen != -1)
+ {
+ if (strncasecmp(ui.path, lastPath, lastPathLen) == 0)
+ continue;
+ }
+ strncpy(lastPath, ui.path, CHM_MAX_PATHLEN);
+ lastPath[CHM_MAX_PATHLEN] = '\0';
+ lastPathLen = strlen(lastPath);
+
+ /* get the length of the path */
+ ui_path_len = strlen(ui.path)-1;
+
+ /* check for DIRS */
+ if (ui.path[ui_path_len] == '/')
+ ui.flags |= CHM_ENUMERATE_DIRS;
+
+ /* check for FILES */
+ if (ui.path[ui_path_len] != '/')
+ ui.flags |= CHM_ENUMERATE_FILES;
+
+ /* check for NORMAL vs. META */
+ if (ui.path[0] == '/')
+ {
+
+ /* check for NORMAL vs. SPECIAL */
+ if (ui.path[1] == '#' || ui.path[1] == '$')
+ ui.flags |= CHM_ENUMERATE_SPECIAL;
+ else
+ ui.flags |= CHM_ENUMERATE_NORMAL;
+ }
+ else
+ ui.flags |= CHM_ENUMERATE_META;
+
+ if (! (type_bits & ui.flags))
+ continue;
+
+ if (filter_bits && ! (filter_bits & ui.flags))
+ continue;
+
+ /* call the enumerator */
+ {
+ int status = (*e)(h, &ui, context);
+ switch (status)
+ {
+ case CHM_ENUMERATOR_FAILURE:
+ free(page_buf);
+ return 0;
+ case CHM_ENUMERATOR_CONTINUE:
+ break;
+ case CHM_ENUMERATOR_SUCCESS:
+ free(page_buf);
+ return 1;
+ default:
+ break;
+ }
+ }
+ }
+
+ /* advance to next page */
+ curPage = header.block_next;
+ }
+
+ free(page_buf);
+ return 1;
+}
diff --git a/lib/chmlib/chm_lib.h b/lib/chmlib/chm_lib.h
new file mode 100644
index 0000000..2fb87a4
--- /dev/null
+++ b/lib/chmlib/chm_lib.h
@@ -0,0 +1,144 @@
+/* $Id: chm_lib.h 148 2007-03-07 09:22:36Z gyunaev $ */
+/***************************************************************************
+ * chm_lib.h - CHM archive manipulation routines *
+ * ------------------- *
+ * *
+ * author: Jed Wing <jedwin@ugcs.caltech.edu> *
+ * version: 0.3 *
+ * notes: These routines are meant for the manipulation of microsoft *
+ * .chm (compiled html help) files, but may likely be used *
+ * for the manipulation of any ITSS archive, if ever ITSS *
+ * archives are used for any other purpose. *
+ * *
+ * Note also that the section names are statically handled. *
+ * To be entirely correct, the section names should be read *
+ * from the section names meta-file, and then the various *
+ * content sections and the "transforms" to apply to the data *
+ * they contain should be inferred from the section name and *
+ * the meta-files referenced using that name; however, all of *
+ * the files I've been able to get my hands on appear to have *
+ * only two sections: Uncompressed and MSCompressed. *
+ * Additionally, the ITSS.DLL file included with Windows does *
+ * not appear to handle any different transforms than the *
+ * simple LZX-transform. Furthermore, the list of transforms *
+ * to apply is broken, in that only half the required space *
+ * is allocated for the list. (It appears as though the *
+ * space is allocated for ASCII strings, but the strings are *
+ * written as unicode. As a result, only the first half of *
+ * the string appears.) So this is probably not too big of *
+ * a deal, at least until CHM v4 (MS .lit files), which also *
+ * incorporate encryption, of some description. *
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef INCLUDED_CHMLIB_H
+#define INCLUDED_CHMLIB_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* RWE 6/12/1002 */
+#ifdef PPC_BSTR
+#include <wtypes.h>
+#endif
+
+#ifdef WIN32
+#ifdef __MINGW32__
+#define __int64 long long
+#endif
+typedef unsigned __int64 LONGUINT64;
+typedef __int64 LONGINT64;
+#else
+typedef unsigned long long LONGUINT64;
+typedef long long LONGINT64;
+#endif
+
+/* the two available spaces in a CHM file */
+/* N.B.: The format supports arbitrarily many spaces, but only */
+/* two appear to be used at present. */
+#define CHM_UNCOMPRESSED (0)
+#define CHM_COMPRESSED (1)
+
+/* structure representing an ITS (CHM) file stream */
+struct chmFile;
+
+/* structure representing an element from an ITS file stream */
+#define CHM_MAX_PATHLEN (512)
+struct chmUnitInfo
+{
+ LONGUINT64 start;
+ LONGUINT64 length;
+ int space;
+ int flags;
+ char path[CHM_MAX_PATHLEN+1];
+};
+
+/* open an ITS archive */
+#ifdef PPC_BSTR
+/* RWE 6/12/2003 */
+struct chmFile* chm_open(BSTR filename);
+#else
+struct chmFile* chm_open(const char *filename);
+#endif
+
+/* close an ITS archive */
+void chm_close(struct chmFile *h);
+
+/* methods for ssetting tuning parameters for particular file */
+#define CHM_PARAM_MAX_BLOCKS_CACHED 0
+void chm_set_param(struct chmFile *h,
+ int paramType,
+ int paramVal);
+
+/* resolve a particular object from the archive */
+#define CHM_RESOLVE_SUCCESS (0)
+#define CHM_RESOLVE_FAILURE (1)
+int chm_resolve_object(struct chmFile *h,
+ const char *objPath,
+ struct chmUnitInfo *ui);
+
+/* retrieve part of an object from the archive */
+LONGINT64 chm_retrieve_object(struct chmFile *h,
+ const struct chmUnitInfo *ui,
+ unsigned char *buf,
+ LONGUINT64 addr,
+ LONGINT64 len);
+
+/* enumerate the objects in the .chm archive */
+typedef int (*CHM_ENUMERATOR)(struct chmFile *h,
+ struct chmUnitInfo *ui,
+ void *context);
+#define CHM_ENUMERATE_NORMAL (1)
+#define CHM_ENUMERATE_META (2)
+#define CHM_ENUMERATE_SPECIAL (4)
+#define CHM_ENUMERATE_FILES (8)
+#define CHM_ENUMERATE_DIRS (16)
+#define CHM_ENUMERATE_ALL (31)
+#define CHM_ENUMERATOR_FAILURE (0)
+#define CHM_ENUMERATOR_CONTINUE (1)
+#define CHM_ENUMERATOR_SUCCESS (2)
+int chm_enumerate(struct chmFile *h,
+ int what,
+ CHM_ENUMERATOR e,
+ void *context);
+
+int chm_enumerate_dir(struct chmFile *h,
+ const char *prefix,
+ int what,
+ CHM_ENUMERATOR e,
+ void *context);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* INCLUDED_CHMLIB_H */
diff --git a/lib/chmlib/lzx.c b/lib/chmlib/lzx.c
new file mode 100644
index 0000000..7a5545b
--- /dev/null
+++ b/lib/chmlib/lzx.c
@@ -0,0 +1,812 @@
+/* $Id: lzx.c 148 2007-03-07 09:22:36Z gyunaev $ */
+/***************************************************************************
+ * lzx.c - LZX decompression routines *
+ * ------------------- *
+ * *
+ * maintainer: Jed Wing <jedwin@ugcs.caltech.edu> *
+ * source: modified lzx.c from cabextract v0.5 *
+ * notes: This file was taken from cabextract v0.5, which was, *
+ * itself, a modified version of the lzx decompression code *
+ * from unlzx. *
+ * *
+ * platforms: In its current incarnation, this file has been tested on *
+ * two different Linux platforms (one, redhat-based, with a *
+ * 2.1.2 glibc and gcc 2.95.x, and the other, Debian, with *
+ * 2.2.4 glibc and both gcc 2.95.4 and gcc 3.0.2). Both were *
+ * Intel x86 compatible machines. *
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. Note that an exemption to this *
+ * license has been granted by Stuart Caie for the purposes of *
+ * distribution with chmlib. This does not, to the best of my *
+ * knowledge, constitute a change in the license of this (the LZX) code *
+ * in general. *
+ * *
+ ***************************************************************************/
+
+#include "lzx.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef __GNUC__
+#define memcpy __builtin_memcpy
+#endif
+
+/* sized types */
+typedef unsigned char UBYTE; /* 8 bits exactly */
+typedef unsigned short UWORD; /* 16 bits (or more) */
+typedef unsigned int ULONG; /* 32 bits (or more) */
+typedef signed int LONG; /* 32 bits (or more) */
+
+/* some constants defined by the LZX specification */
+#define LZX_MIN_MATCH (2)
+#define LZX_MAX_MATCH (257)
+#define LZX_NUM_CHARS (256)
+#define LZX_BLOCKTYPE_INVALID (0) /* also blocktypes 4-7 invalid */
+#define LZX_BLOCKTYPE_VERBATIM (1)
+#define LZX_BLOCKTYPE_ALIGNED (2)
+#define LZX_BLOCKTYPE_UNCOMPRESSED (3)
+#define LZX_PRETREE_NUM_ELEMENTS (20)
+#define LZX_ALIGNED_NUM_ELEMENTS (8) /* aligned offset tree #elements */
+#define LZX_NUM_PRIMARY_LENGTHS (7) /* this one missing from spec! */
+#define LZX_NUM_SECONDARY_LENGTHS (249) /* length tree #elements */
+
+/* LZX huffman defines: tweak tablebits as desired */
+#define LZX_PRETREE_MAXSYMBOLS (LZX_PRETREE_NUM_ELEMENTS)
+#define LZX_PRETREE_TABLEBITS (6)
+#define LZX_MAINTREE_MAXSYMBOLS (LZX_NUM_CHARS + 50*8)
+#define LZX_MAINTREE_TABLEBITS (12)
+#define LZX_LENGTH_MAXSYMBOLS (LZX_NUM_SECONDARY_LENGTHS+1)
+#define LZX_LENGTH_TABLEBITS (12)
+#define LZX_ALIGNED_MAXSYMBOLS (LZX_ALIGNED_NUM_ELEMENTS)
+#define LZX_ALIGNED_TABLEBITS (7)
+
+#define LZX_LENTABLE_SAFETY (64) /* we allow length table decoding overruns */
+
+#define LZX_DECLARE_TABLE(tbl) \
+ UWORD tbl##_table[(1<<LZX_##tbl##_TABLEBITS) + (LZX_##tbl##_MAXSYMBOLS<<1)];\
+ UBYTE tbl##_len [LZX_##tbl##_MAXSYMBOLS + LZX_LENTABLE_SAFETY]
+
+struct LZXstate
+{
+ UBYTE *window; /* the actual decoding window */
+ ULONG window_size; /* window size (32Kb through 2Mb) */
+ ULONG actual_size; /* window size when it was first allocated */
+ ULONG window_posn; /* current offset within the window */
+ ULONG R0, R1, R2; /* for the LRU offset system */
+ UWORD main_elements; /* number of main tree elements */
+ int header_read; /* have we started decoding at all yet? */
+ UWORD block_type; /* type of this block */
+ ULONG block_length; /* uncompressed length of this block */
+ ULONG block_remaining; /* uncompressed bytes still left to decode */
+ ULONG frames_read; /* the number of CFDATA blocks processed */
+ LONG intel_filesize; /* magic header value used for transform */
+ LONG intel_curpos; /* current offset in transform space */
+ int intel_started; /* have we seen any translatable data yet? */
+
+ LZX_DECLARE_TABLE(PRETREE);
+ LZX_DECLARE_TABLE(MAINTREE);
+ LZX_DECLARE_TABLE(LENGTH);
+ LZX_DECLARE_TABLE(ALIGNED);
+};
+
+/* LZX decruncher */
+
+/* Microsoft's LZX document and their implementation of the
+ * com.ms.util.cab Java package do not concur.
+ *
+ * In the LZX document, there is a table showing the correlation between
+ * window size and the number of position slots. It states that the 1MB
+ * window = 40 slots and the 2MB window = 42 slots. In the implementation,
+ * 1MB = 42 slots, 2MB = 50 slots. The actual calculation is 'find the
+ * first slot whose position base is equal to or more than the required
+ * window size'. This would explain why other tables in the document refer
+ * to 50 slots rather than 42.
+ *
+ * The constant NUM_PRIMARY_LENGTHS used in the decompression pseudocode
+ * is not defined in the specification.
+ *
+ * The LZX document does not state the uncompressed block has an
+ * uncompressed length field. Where does this length field come from, so
+ * we can know how large the block is? The implementation has it as the 24
+ * bits following after the 3 blocktype bits, before the alignment
+ * padding.
+ *
+ * The LZX document states that aligned offset blocks have their aligned
+ * offset huffman tree AFTER the main and length trees. The implementation
+ * suggests that the aligned offset tree is BEFORE the main and length
+ * trees.
+ *
+ * The LZX document decoding algorithm states that, in an aligned offset
+ * block, if an extra_bits value is 1, 2 or 3, then that number of bits
+ * should be read and the result added to the match offset. This is
+ * correct for 1 and 2, but not 3, where just a huffman symbol (using the
+ * aligned tree) should be read.
+ *
+ * Regarding the E8 preprocessing, the LZX document states 'No translation
+ * may be performed on the last 6 bytes of the input block'. This is
+ * correct. However, the pseudocode provided checks for the *E8 leader*
+ * up to the last 6 bytes. If the leader appears between -10 and -7 bytes
+ * from the end, this would cause the next four bytes to be modified, at
+ * least one of which would be in the last 6 bytes, which is not allowed
+ * according to the spec.
+ *
+ * The specification states that the huffman trees must always contain at
+ * least one element. However, many CAB files contain blocks where the
+ * length tree is completely empty (because there are no matches), and
+ * this is expected to succeed.
+ */
+
+
+/* LZX uses what it calls 'position slots' to represent match offsets.
+ * What this means is that a small 'position slot' number and a small
+ * offset from that slot are encoded instead of one large offset for
+ * every match.
+ * - position_base is an index to the position slot bases
+ * - extra_bits states how many bits of offset-from-base data is needed.
+ */
+static const UBYTE extra_bits[51] = {
+ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
+ 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14,
+ 15, 15, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17
+};
+
+static const ULONG position_base[51] = {
+ 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192,
+ 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576, 32768, 49152,
+ 65536, 98304, 131072, 196608, 262144, 393216, 524288, 655360, 786432, 917504, 1048576, 1179648, 1310720, 1441792, 1572864, 1703936,
+ 1835008, 1966080, 2097152
+};
+
+struct LZXstate *LZXinit(int window)
+{
+ struct LZXstate *pState=NULL;
+ ULONG wndsize = 1 << window;
+ int i, posn_slots;
+
+ /* LZX supports window sizes of 2^15 (32Kb) through 2^21 (2Mb) */
+ /* if a previously allocated window is big enough, keep it */
+ if (window < 15 || window > 21) return NULL;
+
+ /* allocate state and associated window */
+ pState = (struct LZXstate *)malloc(sizeof(struct LZXstate));
+ if (!(pState->window = (UBYTE *)malloc(wndsize)))
+ {
+ free(pState);
+ return NULL;
+ }
+ pState->actual_size = wndsize;
+ pState->window_size = wndsize;
+
+ /* calculate required position slots */
+ if (window == 20) posn_slots = 42;
+ else if (window == 21) posn_slots = 50;
+ else posn_slots = window << 1;
+
+ /** alternatively **/
+ /* posn_slots=i=0; while (i < wndsize) i += 1 << extra_bits[posn_slots++]; */
+
+ /* initialize other state */
+ pState->R0 = pState->R1 = pState->R2 = 1;
+ pState->main_elements = LZX_NUM_CHARS + (posn_slots << 3);
+ pState->header_read = 0;
+ pState->frames_read = 0;
+ pState->block_remaining = 0;
+ pState->block_type = LZX_BLOCKTYPE_INVALID;
+ pState->intel_curpos = 0;
+ pState->intel_started = 0;
+ pState->window_posn = 0;
+
+ /* initialise tables to 0 (because deltas will be applied to them) */
+ for (i = 0; i < LZX_MAINTREE_MAXSYMBOLS; i++) pState->MAINTREE_len[i] = 0;
+ for (i = 0; i < LZX_LENGTH_MAXSYMBOLS; i++) pState->LENGTH_len[i] = 0;
+
+ return pState;
+}
+
+void LZXteardown(struct LZXstate *pState)
+{
+ if (pState)
+ {
+ if (pState->window)
+ free(pState->window);
+ free(pState);
+ }
+}
+
+int LZXreset(struct LZXstate *pState)
+{
+ int i;
+
+ pState->R0 = pState->R1 = pState->R2 = 1;
+ pState->header_read = 0;
+ pState->frames_read = 0;
+ pState->block_remaining = 0;
+ pState->block_type = LZX_BLOCKTYPE_INVALID;
+ pState->intel_curpos = 0;
+ pState->intel_started = 0;
+ pState->window_posn = 0;
+
+ for (i = 0; i < LZX_MAINTREE_MAXSYMBOLS + LZX_LENTABLE_SAFETY; i++) pState->MAINTREE_len[i] = 0;
+ for (i = 0; i < LZX_LENGTH_MAXSYMBOLS + LZX_LENTABLE_SAFETY; i++) pState->LENGTH_len[i] = 0;
+
+ return DECR_OK;
+}
+
+
+/* Bitstream reading macros:
+ *
+ * INIT_BITSTREAM should be used first to set up the system
+ * READ_BITS(var,n) takes N bits from the buffer and puts them in var
+ *
+ * ENSURE_BITS(n) ensures there are at least N bits in the bit buffer
+ * PEEK_BITS(n) extracts (without removing) N bits from the bit buffer
+ * REMOVE_BITS(n) removes N bits from the bit buffer
+ *
+ * These bit access routines work by using the area beyond the MSB and the
+ * LSB as a free source of zeroes. This avoids having to mask any bits.
+ * So we have to know the bit width of the bitbuffer variable. This is
+ * sizeof(ULONG) * 8, also defined as ULONG_BITS
+ */
+
+/* number of bits in ULONG. Note: This must be at multiple of 16, and at
+ * least 32 for the bitbuffer code to work (ie, it must be able to ensure
+ * up to 17 bits - that's adding 16 bits when there's one bit left, or
+ * adding 32 bits when there are no bits left. The code should work fine
+ * for machines where ULONG >= 32 bits.
+ */
+#define ULONG_BITS (sizeof(ULONG)<<3)
+
+#define INIT_BITSTREAM do { bitsleft = 0; bitbuf = 0; } while (0)
+
+#define ENSURE_BITS(n) \
+ while (bitsleft < (n)) { \
+ bitbuf |= ((inpos[1]<<8)|inpos[0]) << (ULONG_BITS-16 - bitsleft); \
+ bitsleft += 16; inpos+=2; \
+ }
+
+#define PEEK_BITS(n) (bitbuf >> (ULONG_BITS - (n)))
+#define REMOVE_BITS(n) ((bitbuf <<= (n)), (bitsleft -= (n)))
+
+#define READ_BITS(v,n) do { \
+ ENSURE_BITS(n); \
+ (v) = PEEK_BITS(n); \
+ REMOVE_BITS(n); \
+} while (0)
+
+
+/* Huffman macros */
+
+#define TABLEBITS(tbl) (LZX_##tbl##_TABLEBITS)
+#define MAXSYMBOLS(tbl) (LZX_##tbl##_MAXSYMBOLS)
+#define SYMTABLE(tbl) (pState->tbl##_table)
+#define LENTABLE(tbl) (pState->tbl##_len)
+
+/* BUILD_TABLE(tablename) builds a huffman lookup table from code lengths.
+ * In reality, it just calls make_decode_table() with the appropriate
+ * values - they're all fixed by some #defines anyway, so there's no point
+ * writing each call out in full by hand.
+ */
+#define BUILD_TABLE(tbl) \
+ if (make_decode_table( \
+ MAXSYMBOLS(tbl), TABLEBITS(tbl), LENTABLE(tbl), SYMTABLE(tbl) \
+ )) { return DECR_ILLEGALDATA; }
+
+
+/* READ_HUFFSYM(tablename, var) decodes one huffman symbol from the
+ * bitstream using the stated table and puts it in var.
+ */
+#define READ_HUFFSYM(tbl,var) do { \
+ ENSURE_BITS(16); \
+ hufftbl = SYMTABLE(tbl); \
+ if ((i = hufftbl[PEEK_BITS(TABLEBITS(tbl))]) >= MAXSYMBOLS(tbl)) { \
+ j = 1 << (ULONG_BITS - TABLEBITS(tbl)); \
+ do { \
+ j >>= 1; i <<= 1; i |= (bitbuf & j) ? 1 : 0; \
+ if (!j) { return DECR_ILLEGALDATA; } \
+ } while ((i = hufftbl[i]) >= MAXSYMBOLS(tbl)); \
+ } \
+ j = LENTABLE(tbl)[(var) = i]; \
+ REMOVE_BITS(j); \
+} while (0)
+
+
+/* READ_LENGTHS(tablename, first, last) reads in code lengths for symbols
+ * first to last in the given table. The code lengths are stored in their
+ * own special LZX way.
+ */
+#define READ_LENGTHS(tbl,first,last) do { \
+ lb.bb = bitbuf; lb.bl = bitsleft; lb.ip = inpos; \
+ if (lzx_read_lens(pState, LENTABLE(tbl),(first),(last),&lb)) { \
+ return DECR_ILLEGALDATA; \
+ } \
+ bitbuf = lb.bb; bitsleft = lb.bl; inpos = lb.ip; \
+} while (0)
+
+
+/* make_decode_table(nsyms, nbits, length[], table[])
+ *
+ * This function was coded by David Tritscher. It builds a fast huffman
+ * decoding table out of just a canonical huffman code lengths table.
+ *
+ * nsyms = total number of symbols in this huffman tree.
+ * nbits = any symbols with a code length of nbits or less can be decoded
+ * in one lookup of the table.
+ * length = A table to get code lengths from [0 to syms-1]
+ * table = The table to fill up with decoded symbols and pointers.
+ *
+ * Returns 0 for OK or 1 for error
+ */
+
+static int make_decode_table(ULONG nsyms, ULONG nbits, UBYTE *length, UWORD *table) {
+ register UWORD sym;
+ register ULONG leaf;
+ register UBYTE bit_num = 1;
+ ULONG fill;
+ ULONG pos = 0; /* the current position in the decode table */
+ ULONG table_mask = 1 << nbits;
+ ULONG bit_mask = table_mask >> 1; /* don't do 0 length codes */
+ ULONG next_symbol = bit_mask; /* base of allocation for long codes */
+
+ /* fill entries for codes short enough for a direct mapping */
+ while (bit_num <= nbits) {
+ for (sym = 0; sym < nsyms; sym++) {
+ if (length[sym] == bit_num) {
+ leaf = pos;
+
+ if((pos += bit_mask) > table_mask) return 1; /* table overrun */
+
+ /* fill all possible lookups of this symbol with the symbol itself */
+ fill = bit_mask;
+ while (fill-- > 0) table[leaf++] = sym;
+ }
+ }
+ bit_mask >>= 1;
+ bit_num++;
+ }
+
+ /* if there are any codes longer than nbits */
+ if (pos != table_mask) {
+ /* clear the remainder of the table */
+ for (sym = pos; sym < table_mask; sym++) table[sym] = 0;
+
+ /* give ourselves room for codes to grow by up to 16 more bits */
+ pos <<= 16;
+ table_mask <<= 16;
+ bit_mask = 1 << 15;
+
+ while (bit_num <= 16) {
+ for (sym = 0; sym < nsyms; sym++) {
+ if (length[sym] == bit_num) {
+ leaf = pos >> 16;
+ for (fill = 0; fill < bit_num - nbits; fill++) {
+ /* if this path hasn't been taken yet, 'allocate' two entries */
+ if (table[leaf] == 0) {
+ table[(next_symbol << 1)] = 0;
+ table[(next_symbol << 1) + 1] = 0;
+ table[leaf] = next_symbol++;
+ }
+ /* follow the path and select either left or right for next bit */
+ leaf = table[leaf] << 1;
+ if ((pos >> (15-fill)) & 1) leaf++;
+ }
+ table[leaf] = sym;
+
+ if ((pos += bit_mask) > table_mask) return 1; /* table overflow */
+ }
+ }
+ bit_mask >>= 1;
+ bit_num++;
+ }
+ }
+
+ /* full table? */
+ if (pos == table_mask) return 0;
+
+ /* either erroneous table, or all elements are 0 - let's find out. */
+ for (sym = 0; sym < nsyms; sym++) if (length[sym]) return 1;
+ return 0;
+}
+
+struct lzx_bits {
+ ULONG bb;
+ int bl;
+ UBYTE *ip;
+};
+
+static int lzx_read_lens(struct LZXstate *pState, UBYTE *lens, ULONG first, ULONG last, struct lzx_bits *lb) {
+ ULONG i,j, x,y;
+ int z;
+
+ register ULONG bitbuf = lb->bb;
+ register int bitsleft = lb->bl;
+ UBYTE *inpos = lb->ip;
+ UWORD *hufftbl;
+
+ for (x = 0; x < 20; x++) {
+ READ_BITS(y, 4);
+ LENTABLE(PRETREE)[x] = y;
+ }
+ BUILD_TABLE(PRETREE);
+
+ for (x = first; x < last; ) {
+ READ_HUFFSYM(PRETREE, z);
+ if (z == 17) {
+ READ_BITS(y, 4); y += 4;
+ while (y--) lens[x++] = 0;
+ }
+ else if (z == 18) {
+ READ_BITS(y, 5); y += 20;
+ while (y--) lens[x++] = 0;
+ }
+ else if (z == 19) {
+ READ_BITS(y, 1); y += 4;
+ READ_HUFFSYM(PRETREE, z);
+ z = lens[x] - z; if (z < 0) z += 17;
+ while (y--) lens[x++] = z;
+ }
+ else {
+ z = lens[x] - z; if (z < 0) z += 17;
+ lens[x++] = z;
+ }
+ }
+
+ lb->bb = bitbuf;
+ lb->bl = bitsleft;
+ lb->ip = inpos;
+ return 0;
+}
+
+int LZXdecompress(struct LZXstate *pState, unsigned char *inpos, unsigned char *outpos, int inlen, int outlen) {
+ UBYTE *endinp = inpos + inlen;
+ UBYTE *window = pState->window;
+ UBYTE *runsrc, *rundest;
+ UWORD *hufftbl; /* used in READ_HUFFSYM macro as chosen decoding table */
+
+ ULONG window_posn = pState->window_posn;
+ ULONG window_size = pState->window_size;
+ ULONG R0 = pState->R0;
+ ULONG R1 = pState->R1;
+ ULONG R2 = pState->R2;
+
+ register ULONG bitbuf;
+ register int bitsleft;
+ ULONG match_offset, i,j,k; /* ijk used in READ_HUFFSYM macro */
+ struct lzx_bits lb; /* used in READ_LENGTHS macro */
+
+ int togo = outlen, this_run, main_element, aligned_bits;
+ int match_length, length_footer, extra, verbatim_bits;
+
+ INIT_BITSTREAM;
+
+ /* read header if necessary */
+ if (!pState->header_read) {
+ i = j = 0;
+ READ_BITS(k, 1); if (k) { READ_BITS(i,16); READ_BITS(j,16); }
+ pState->intel_filesize = (i << 16) | j; /* or 0 if not encoded */
+ pState->header_read = 1;
+ }
+
+ /* main decoding loop */
+ while (togo > 0) {
+ /* last block finished, new block expected */
+ if (pState->block_remaining == 0) {
+ if (pState->block_type == LZX_BLOCKTYPE_UNCOMPRESSED) {
+ if (pState->block_length & 1) inpos++; /* realign bitstream to word */
+ INIT_BITSTREAM;
+ }
+
+ READ_BITS(pState->block_type, 3);
+ READ_BITS(i, 16);
+ READ_BITS(j, 8);
+ pState->block_remaining = pState->block_length = (i << 8) | j;
+
+ switch (pState->block_type) {
+ case LZX_BLOCKTYPE_ALIGNED:
+ for (i = 0; i < 8; i++) { READ_BITS(j, 3); LENTABLE(ALIGNED)[i] = j; }
+ BUILD_TABLE(ALIGNED);
+ /* rest of aligned header is same as verbatim */
+
+ case LZX_BLOCKTYPE_VERBATIM:
+ READ_LENGTHS(MAINTREE, 0, 256);
+ READ_LENGTHS(MAINTREE, 256, pState->main_elements);
+ BUILD_TABLE(MAINTREE);
+ if (LENTABLE(MAINTREE)[0xE8] != 0) pState->intel_started = 1;
+
+ READ_LENGTHS(LENGTH, 0, LZX_NUM_SECONDARY_LENGTHS);
+ BUILD_TABLE(LENGTH);
+ break;
+
+ case LZX_BLOCKTYPE_UNCOMPRESSED:
+ pState->intel_started = 1; /* because we can't assume otherwise */
+ ENSURE_BITS(16); /* get up to 16 pad bits into the buffer */
+ if (bitsleft > 16) inpos -= 2; /* and align the bitstream! */
+ R0 = inpos[0]|(inpos[1]<<8)|(inpos[2]<<16)|(inpos[3]<<24);inpos+=4;
+ R1 = inpos[0]|(inpos[1]<<8)|(inpos[2]<<16)|(inpos[3]<<24);inpos+=4;
+ R2 = inpos[0]|(inpos[1]<<8)|(inpos[2]<<16)|(inpos[3]<<24);inpos+=4;
+ break;
+
+ default:
+ return DECR_ILLEGALDATA;
+ }
+ }
+
+ /* buffer exhaustion check */
+ if (inpos > endinp) {
+ /* it's possible to have a file where the next run is less than
+ * 16 bits in size. In this case, the READ_HUFFSYM() macro used
+ * in building the tables will exhaust the buffer, so we should
+ * allow for this, but not allow those accidentally read bits to
+ * be used (so we check that there are at least 16 bits
+ * remaining - in this boundary case they aren't really part of
+ * the compressed data)
+ */
+ if (inpos > (endinp+2) || bitsleft < 16) return DECR_ILLEGALDATA;
+ }
+
+ while ((this_run = pState->block_remaining) > 0 && togo > 0) {
+ if (this_run > togo) this_run = togo;
+ togo -= this_run;
+ pState->block_remaining -= this_run;
+
+ /* apply 2^x-1 mask */
+ window_posn &= window_size - 1;
+ /* runs can't straddle the window wraparound */
+ if ((window_posn + this_run) > window_size)
+ return DECR_DATAFORMAT;
+
+ switch (pState->block_type) {
+
+ case LZX_BLOCKTYPE_VERBATIM:
+ while (this_run > 0) {
+ READ_HUFFSYM(MAINTREE, main_element);
+
+ if (main_element < LZX_NUM_CHARS) {
+ /* literal: 0 to LZX_NUM_CHARS-1 */
+ window[window_posn++] = main_element;
+ this_run--;
+ }
+ else {
+ /* match: LZX_NUM_CHARS + ((slot<<3) | length_header (3 bits)) */
+ main_element -= LZX_NUM_CHARS;
+
+ match_length = main_element & LZX_NUM_PRIMARY_LENGTHS;
+ if (match_length == LZX_NUM_PRIMARY_LENGTHS) {
+ READ_HUFFSYM(LENGTH, length_footer);
+ match_length += length_footer;
+ }
+ match_length += LZX_MIN_MATCH;
+
+ match_offset = main_element >> 3;
+
+ if (match_offset > 2) {
+ /* not repeated offset */
+ if (match_offset != 3) {
+ extra = extra_bits[match_offset];
+ READ_BITS(verbatim_bits, extra);
+ match_offset = position_base[match_offset] - 2 + verbatim_bits;
+ }
+ else {
+ match_offset = 1;
+ }
+
+ /* update repeated offset LRU queue */
+ R2 = R1; R1 = R0; R0 = match_offset;
+ }
+ else if (match_offset == 0) {
+ match_offset = R0;
+ }
+ else if (match_offset == 1) {
+ match_offset = R1;
+ R1 = R0; R0 = match_offset;
+ }
+ else /* match_offset == 2 */ {
+ match_offset = R2;
+ R2 = R0; R0 = match_offset;
+ }
+
+ rundest = window + window_posn;
+ runsrc = rundest - match_offset;
+ window_posn += match_length;
+ if (window_posn > window_size) return DECR_ILLEGALDATA;
+ this_run -= match_length;
+
+ /* copy any wrapped around source data */
+ while ((runsrc < window) && (match_length-- > 0)) {
+ *rundest++ = *(runsrc + window_size); runsrc++;
+ }
+ /* copy match data - no worries about destination wraps */
+ while (match_length-- > 0) *rundest++ = *runsrc++;
+
+ }
+ }
+ break;
+
+ case LZX_BLOCKTYPE_ALIGNED:
+ while (this_run > 0) {
+ READ_HUFFSYM(MAINTREE, main_element);
+
+ if (main_element < LZX_NUM_CHARS) {
+ /* literal: 0 to LZX_NUM_CHARS-1 */
+ window[window_posn++] = main_element;
+ this_run--;
+ }
+ else {
+ /* match: LZX_NUM_CHARS + ((slot<<3) | length_header (3 bits)) */
+ main_element -= LZX_NUM_CHARS;
+
+ match_length = main_element & LZX_NUM_PRIMARY_LENGTHS;
+ if (match_length == LZX_NUM_PRIMARY_LENGTHS) {
+ READ_HUFFSYM(LENGTH, length_footer);
+ match_length += length_footer;
+ }
+ match_length += LZX_MIN_MATCH;
+
+ match_offset = main_element >> 3;
+
+ if (match_offset > 2) {
+ /* not repeated offset */
+ extra = extra_bits[match_offset];
+ match_offset = position_base[match_offset] - 2;
+ if (extra > 3) {
+ /* verbatim and aligned bits */
+ extra -= 3;
+ READ_BITS(verbatim_bits, extra);
+ match_offset += (verbatim_bits << 3);
+ READ_HUFFSYM(ALIGNED, aligned_bits);
+ match_offset += aligned_bits;
+ }
+ else if (extra == 3) {
+ /* aligned bits only */
+ READ_HUFFSYM(ALIGNED, aligned_bits);
+ match_offset += aligned_bits;
+ }
+ else if (extra > 0) { /* extra==1, extra==2 */
+ /* verbatim bits only */
+ READ_BITS(verbatim_bits, extra);
+ match_offset += verbatim_bits;
+ }
+ else /* extra == 0 */ {
+ /* ??? */
+ match_offset = 1;
+ }
+
+ /* update repeated offset LRU queue */
+ R2 = R1; R1 = R0; R0 = match_offset;
+ }
+ else if (match_offset == 0) {
+ match_offset = R0;
+ }
+ else if (match_offset == 1) {
+ match_offset = R1;
+ R1 = R0; R0 = match_offset;
+ }
+ else /* match_offset == 2 */ {
+ match_offset = R2;
+ R2 = R0; R0 = match_offset;
+ }
+
+ rundest = window + window_posn;
+ runsrc = rundest - match_offset;
+ window_posn += match_length;
+ if (window_posn > window_size) return DECR_ILLEGALDATA;
+ this_run -= match_length;
+
+ /* copy any wrapped around source data */
+ while ((runsrc < window) && (match_length-- > 0)) {
+ *rundest++ = *(runsrc + window_size); runsrc++;
+ }
+ /* copy match data - no worries about destination wraps */
+ while (match_length-- > 0) *rundest++ = *runsrc++;
+
+ }
+ }
+ break;
+
+ case LZX_BLOCKTYPE_UNCOMPRESSED:
+ if ((inpos + this_run) > endinp) return DECR_ILLEGALDATA;
+ memcpy(window + window_posn, inpos, (size_t) this_run);
+ inpos += this_run; window_posn += this_run;
+ break;
+
+ default:
+ return DECR_ILLEGALDATA; /* might as well */
+ }
+
+ }
+ }
+
+ if (togo != 0) return DECR_ILLEGALDATA;
+ memcpy(outpos, window + ((!window_posn) ? window_size : window_posn) - outlen, (size_t) outlen);
+
+ pState->window_posn = window_posn;
+ pState->R0 = R0;
+ pState->R1 = R1;
+ pState->R2 = R2;
+
+ /* intel E8 decoding */
+ if ((pState->frames_read++ < 32768) && pState->intel_filesize != 0) {
+ if (outlen <= 6 || !pState->intel_started) {
+ pState->intel_curpos += outlen;
+ }
+ else {
+ UBYTE *data = outpos;
+ UBYTE *dataend = data + outlen - 10;
+ LONG curpos = pState->intel_curpos;
+ LONG filesize = pState->intel_filesize;
+ LONG abs_off, rel_off;
+
+ pState->intel_curpos = curpos + outlen;
+
+ while (data < dataend) {
+ if (*data++ != 0xE8) { curpos++; continue; }
+ abs_off = data[0] | (data[1]<<8) | (data[2]<<16) | (data[3]<<24);
+ if ((abs_off >= -curpos) && (abs_off < filesize)) {
+ rel_off = (abs_off >= 0) ? abs_off - curpos : abs_off + filesize;
+ data[0] = (UBYTE) rel_off;
+ data[1] = (UBYTE) (rel_off >> 8);
+ data[2] = (UBYTE) (rel_off >> 16);
+ data[3] = (UBYTE) (rel_off >> 24);
+ }
+ data += 4;
+ curpos += 5;
+ }
+ }
+ }
+ return DECR_OK;
+}
+
+#ifdef LZX_CHM_TESTDRIVER
+int main(int c, char **v)
+{
+ FILE *fin, *fout;
+ struct LZXstate state;
+ UBYTE ibuf[16384];
+ UBYTE obuf[32768];
+ int ilen, olen;
+ int status;
+ int i;
+ int count=0;
+ int w = atoi(v[1]);
+ LZXinit(&state, w);
+ fout = fopen(v[2], "wb");
+ for (i=3; i<c; i++)
+ {
+ fin = fopen(v[i], "rb");
+ ilen = fread(ibuf, 1, 16384, fin);
+ status = LZXdecompress(&state, ibuf, obuf, ilen, 32768);
+ switch (status)
+ {
+ case DECR_OK:
+ printf("ok\n");
+ fwrite(obuf, 1, 32768, fout);
+ break;
+ case DECR_DATAFORMAT:
+ printf("bad format\n");
+ break;
+ case DECR_ILLEGALDATA:
+ printf("illegal data\n");
+ break;
+ case DECR_NOMEMORY:
+ printf("no memory\n");
+ break;
+ default:
+ break;
+ }
+ fclose(fin);
+ if (++count == 2)
+ {
+ count = 0;
+ LZXreset(&state);
+ }
+ }
+ fclose(fout);
+}
+#endif
diff --git a/lib/chmlib/lzx.h b/lib/chmlib/lzx.h
new file mode 100644
index 0000000..26d71a8
--- /dev/null
+++ b/lib/chmlib/lzx.h
@@ -0,0 +1,62 @@
+/* $Id: lzx.h 148 2007-03-07 09:22:36Z gyunaev $ */
+/***************************************************************************
+ * lzx.h - LZX decompression routines *
+ * ------------------- *
+ * *
+ * maintainer: Jed Wing <jedwin@ugcs.caltech.edu> *
+ * source: modified lzx.c from cabextract v0.5 *
+ * notes: This file was taken from cabextract v0.5, which was, *
+ * itself, a modified version of the lzx decompression code *
+ * from unlzx. *
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. Note that an exemption to this *
+ * license has been granted by Stuart Caie for the purposes of *
+ * distribution with chmlib. This does not, to the best of my *
+ * knowledge, constitute a change in the license of this (the LZX) code *
+ * in general. *
+ * *
+ ***************************************************************************/
+
+#ifndef INCLUDED_LZX_H
+#define INCLUDED_LZX_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* return codes */
+#define DECR_OK (0)
+#define DECR_DATAFORMAT (1)
+#define DECR_ILLEGALDATA (2)
+#define DECR_NOMEMORY (3)
+
+/* opaque state structure */
+struct LZXstate;
+
+/* create an lzx state object */
+struct LZXstate *LZXinit(int window);
+
+/* destroy an lzx state object */
+void LZXteardown(struct LZXstate *pState);
+
+/* reset an lzx stream */
+int LZXreset(struct LZXstate *pState);
+
+/* decompress an LZX compressed block */
+int LZXdecompress(struct LZXstate *pState,
+ unsigned char *inpos,
+ unsigned char *outpos,
+ int inlen,
+ int outlen);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* INCLUDED_LZX_H */
diff --git a/lib/kio-msits/Makefile.am b/lib/kio-msits/Makefile.am
new file mode 100644
index 0000000..53f5205
--- /dev/null
+++ b/lib/kio-msits/Makefile.am
@@ -0,0 +1,14 @@
+METASOURCES = AUTO
+INCLUDES = $(QT_INCLUDES) $(CHM_INCLUDES) $(KDE_INCLUDES) $(LIBCHMFILE_INCLUDES)
+
+kde_module_LTLIBRARIES = kio_msits.la
+
+kio_msits_la_SOURCES = msits.cpp
+kio_msits_la_LIBADD = -lkio $(CHM_LIBS)
+kio_msits_la_LDFLAGS = -module -avoid-version $(QT_LIBS) $(KDE_LDFLAGS) $(KDE_LIBS) $(KDE_PLUGIN)
+
+protocol_DATA = msits.protocol
+protocoldir = $(kde_servicesdir)
+
+# Put it here to avoid creating another directory
+kde_apps_DATA = kchmviewer.desktop
diff --git a/lib/kio-msits/kchmviewer.desktop b/lib/kio-msits/kchmviewer.desktop
new file mode 100644
index 0000000..d97098a
--- /dev/null
+++ b/lib/kio-msits/kchmviewer.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Categories=Qt;KDE;Utility;
+Encoding=UTF-8
+Type=Application
+Exec=kchmviewer %U
+Icon=kchmviewer.png
+Comment=
+Terminal=0
+Name=KchmViewer
+Comment=A viewer of CHM (MS-Help) files
+MimeType=application/chm
diff --git a/lib/kio-msits/msits.cpp b/lib/kio-msits/msits.cpp
new file mode 100755
index 0000000..cf7cf27
--- /dev/null
+++ b/lib/kio-msits/msits.cpp
@@ -0,0 +1,320 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#include <kapplication.h>
+#include <kdebug.h>
+#include <kinstance.h>
+#include <kurl.h>
+#include <kmimemagic.h>
+
+#include <qfile.h>
+#include <qbitarray.h>
+#include <qvaluevector.h>
+
+#include "msits.h"
+#include "libchmurlfactory.h"
+
+using namespace KIO;
+
+extern "C"
+{
+ int kdemain( int argc, char **argv )
+ {
+ kdDebug() << "*** kio_msits Init" << endl;
+
+ KInstance instance( "kio_msits" );
+
+ if ( argc != 4 )
+ {
+ kdDebug() << "Usage: kio_msits protocol domain-socket1 domain-socket2" << endl;
+ exit (-1);
+ }
+
+ ProtocolMSITS slave ( argv[2], argv[3] );
+ slave.dispatchLoop();
+
+ kdDebug() << "*** kio_msits Done" << endl;
+ return 0;
+ }
+}
+
+ProtocolMSITS::ProtocolMSITS (const QCString &pool_socket, const QCString &app_socket)
+ : SlaveBase ("kio_msits", pool_socket, app_socket)
+{
+ m_chmFile = 0;
+}
+
+ProtocolMSITS::~ProtocolMSITS()
+{
+ if ( !m_chmFile )
+ return;
+
+ chm_close (m_chmFile);
+ m_chmFile = 0;
+}
+
+// A simple stat() wrapper
+static bool isDirectory ( const QString & filename )
+{
+ return filename[filename.length() - 1] == '/';
+}
+
+
+void ProtocolMSITS::get( const KURL& url )
+{
+ QString htmdata, fileName;
+ chmUnitInfo ui;
+ QByteArray buf;
+
+ kdDebug() << "kio_msits::get() " << url.path() << endl;
+
+ if ( !parseLoadAndLookup ( url, fileName ) )
+ return; // error() has been called by parseLoadAndLookup
+
+ kdDebug() << "kio_msits::get: parseLoadAndLookup returned " << fileName << endl;
+
+ if ( LCHMUrlFactory::handleFileType( url.path(), htmdata ) )
+ {
+ buf = htmdata.utf8();
+ kdDebug() << "Using special handling for image pages: " << htmdata << endl;
+ }
+ else
+ {
+ if ( isDirectory (fileName) )
+ {
+ error( KIO::ERR_IS_DIRECTORY, url.prettyURL() );
+ return;
+ }
+
+ if ( !ResolveObject ( fileName, &ui) )
+ {
+ kdDebug() << "kio_msits::get: could not resolve filename " << fileName << endl;
+ error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
+ return;
+ }
+
+ buf.resize( ui.length );
+
+ if ( RetrieveObject (&ui, (unsigned char*) buf.data(), 0, ui.length) == 0 )
+ {
+ kdDebug() << "kio_msits::get: could not retrieve filename " << fileName << endl;
+ error( KIO::ERR_NO_CONTENT, url.prettyURL() );
+ return;
+ }
+ }
+
+ totalSize( buf.size() );
+ KMimeMagicResult * result = KMimeMagic::self()->findBufferFileType( buf, fileName );
+ kdDebug() << "Emitting mimetype " << result->mimeType() << endl;
+
+ mimeType( result->mimeType() );
+ data( buf );
+ processedSize( buf.size() );
+
+ finished();
+}
+
+
+bool ProtocolMSITS::parseLoadAndLookup ( const KURL& url, QString& abspath )
+{
+ kdDebug() << "ProtocolMSITS::parseLoadAndLookup (const KURL&) " << url.path() << endl;
+
+ int pos = url.path().find ("::");
+
+ if ( pos == -1 )
+ {
+ error( KIO::ERR_MALFORMED_URL, url.prettyURL() );
+ return false;
+ }
+
+ QString filename = url.path().left (pos);
+ abspath = url.path().mid (pos + 2); // skip ::
+
+ // Some buggy apps add ms-its:/ to the path as well
+ if ( abspath.startsWith( "ms-its:" ) )
+ abspath = abspath.mid( 7 );
+
+ kdDebug() << "ProtocolMSITS::parseLoadAndLookup: filename " << filename << ", path " << abspath << endl;
+
+ if ( filename.isEmpty() )
+ {
+ error( KIO::ERR_MALFORMED_URL, url.prettyURL() );
+ return false;
+ }
+
+ // If the file has been already loaded, nothing to do.
+ if ( m_chmFile && filename == m_openedFile )
+ return true;
+
+ kdDebug() << "Opening a new CHM file " << filename << endl;
+
+ // First try to open a temporary file
+ chmFile * tmpchm;
+
+ if ( (tmpchm = chm_open ( QFile::encodeName (filename))) == 0 )
+ {
+ error( KIO::ERR_COULD_NOT_READ, url.prettyURL() );
+ return false;
+ }
+
+ // Replace an existing file by a new one
+ if ( m_chmFile )
+ chm_close (m_chmFile);
+
+ m_chmFile = tmpchm;
+ m_openedFile = filename;
+
+ kdDebug() << "A CHM file " << filename << " has beed opened successfully" << endl;
+ return true;
+}
+
+/*
+ * Shamelessly stolen from a KDE KIO tutorial
+ */
+static void app_entry(UDSEntry& e, unsigned int uds, const QString& str)
+{
+ UDSAtom a;
+ a.m_uds = uds;
+ a.m_str = str;
+ e.append(a);
+}
+
+ // appends an int with the UDS-ID uds
+ static void app_entry(UDSEntry& e, unsigned int uds, long l)
+ {
+ UDSAtom a;
+ a.m_uds = uds;
+ a.m_long = l;
+ e.append(a);
+}
+
+// internal function
+// fills a directory item with its name and size
+static void app_dir(UDSEntry& e, const QString & name)
+{
+ e.clear();
+ app_entry(e, KIO::UDS_NAME, name);
+ app_entry(e, KIO::UDS_FILE_TYPE, S_IFDIR);
+ app_entry(e, KIO::UDS_SIZE, 1);
+}
+
+// internal function
+// fills a file item with its name and size
+static void app_file(UDSEntry& e, const QString & name, size_t size)
+{
+ e.clear();
+ app_entry(e, KIO::UDS_NAME, name);
+ app_entry(e, KIO::UDS_FILE_TYPE, S_IFREG);
+ app_entry(e, KIO::UDS_SIZE, size);
+}
+
+void ProtocolMSITS::stat (const KURL & url)
+{
+ QString fileName;
+ chmUnitInfo ui;
+
+ kdDebug() << "kio_msits::stat (const KURL& url) " << url.path() << endl;
+
+ if ( !parseLoadAndLookup ( url, fileName ) )
+ return; // error() has been called by parseLoadAndLookup
+
+ if ( !ResolveObject ( fileName, &ui ) )
+ {
+ error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
+ return;
+ }
+
+ kdDebug() << "kio_msits::stat: adding an entry for " << fileName << endl;
+ UDSEntry entry;
+
+ if ( isDirectory ( fileName ) )
+ app_dir(entry, fileName);
+ else
+ app_file(entry, fileName, ui.length);
+
+ statEntry (entry);
+
+ finished();
+}
+
+
+// A local CHMLIB enumerator
+static int chmlib_enumerator (struct chmFile *, struct chmUnitInfo *ui, void *context)
+{
+ ((QValueVector<QString> *) context)->push_back (QString::fromLocal8Bit (ui->path));
+ return CHM_ENUMERATOR_CONTINUE;
+}
+
+
+void ProtocolMSITS::listDir (const KURL & url)
+{
+ QString filepath;
+
+ kdDebug() << "kio_msits::listDir (const KURL& url) " << url.path() << endl;
+
+ if ( !parseLoadAndLookup ( url, filepath ) )
+ return; // error() has been called by parseLoadAndLookup
+
+ filepath += "/";
+
+ if ( !isDirectory (filepath) )
+ {
+ error(KIO::ERR_CANNOT_ENTER_DIRECTORY, url.path());
+ return;
+ }
+
+ kdDebug() << "kio_msits::listDir: enumerating directory " << filepath << endl;
+
+ QValueVector<QString> listing;
+
+ if ( chm_enumerate_dir ( m_chmFile,
+ filepath.local8Bit(),
+ CHM_ENUMERATE_NORMAL | CHM_ENUMERATE_FILES | CHM_ENUMERATE_DIRS,
+ chmlib_enumerator,
+ &listing ) != 1 )
+ {
+ error(KIO::ERR_CANNOT_ENTER_DIRECTORY, url.path());
+ return;
+ }
+
+ UDSEntry entry;
+ unsigned int striplength = filepath.length();
+
+ for ( unsigned int i = 0; i < listing.size(); i++ )
+ {
+ // Strip the direcroty name
+ QString ename = listing[i].mid (striplength);
+
+ if ( isDirectory ( ename ) )
+ app_dir(entry, ename);
+ else
+ app_file(entry, ename, 0);
+
+ listEntry(entry, false);
+ }
+
+ listEntry(entry, true);
+ finished();
+}
diff --git a/lib/kio-msits/msits.h b/lib/kio-msits/msits.h
new file mode 100755
index 0000000..3de7719
--- /dev/null
+++ b/lib/kio-msits/msits.h
@@ -0,0 +1,79 @@
+/***************************************************************************
+ * Copyright (C) 2004-2005 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef MSITS_H
+#define MSITS_H
+
+
+#include <kio/slavebase.h>
+#include <kurl.h>
+
+#include <qstring.h>
+#include <qcstring.h>
+
+#include "config.h"
+#include "chm_lib.h"
+
+
+class ProtocolMSITS : public KIO::SlaveBase
+{
+public:
+ ProtocolMSITS ( const QCString&, const QCString& );
+ virtual ~ProtocolMSITS();
+
+ virtual void get ( const KURL& );
+ virtual void listDir (const KURL & url);
+ virtual void stat (const KURL & url);
+
+private:
+ // This function does next thing:
+ // - parses the URL to get a file name and URL inside the file;
+ // - loads a new CHM file, if needed;
+ // - returns the parsed URL inside the file;
+ bool parseLoadAndLookup ( const KURL&, QString& abspath );
+
+ // Resolve an object inside a CHM file
+ inline bool ResolveObject (const QString& fileName, chmUnitInfo *ui)
+ {
+ return m_chmFile != NULL && ::chm_resolve_object(m_chmFile, fileName.utf8(), ui) == CHM_RESOLVE_SUCCESS;
+ }
+
+ // Retrieve an object from the CHM file
+ inline size_t RetrieveObject (const chmUnitInfo *ui, unsigned char *buffer, LONGUINT64 fileOffset, LONGINT64 bufferSize)
+ {
+#if USE_BUILTIN_CHMLIB
+ return ::chm_retrieve_object(m_chmFile, ui, buffer,
+ fileOffset, bufferSize);
+#else
+ return ::chm_retrieve_object(m_chmFile, const_cast<chmUnitInfo*>(ui),
+ buffer, fileOffset, bufferSize);
+#endif
+ }
+
+ // An opened file name, if presend
+ QString m_openedFile;
+
+ // a CHM structure file pointer (from chmlib)
+ chmFile * m_chmFile;
+};
+
+
+#endif /* MSITS_H */
diff --git a/lib/kio-msits/msits.protocol b/lib/kio-msits/msits.protocol
new file mode 100755
index 0000000..b087903
--- /dev/null
+++ b/lib/kio-msits/msits.protocol
@@ -0,0 +1,24 @@
+[Protocol]
+exec=kio_msits
+protocol=ms-its
+input=none
+output=filesystem
+reading=true
+listing=Name,Type,Size
+defaultMimetype=text/html
+Description=A kioslave for displaying WinHelp files
+Description[da]=En kioslave til visning af Windows hjælpefiler
+Description[de]=Ein Ein-/Ausgabemodul zur Anzeige von WinHelp-Dateien
+Description[es]=Un kioslave para mostrar archivos WinHelp
+Description[et]=WinHelp-failide kuvamise IO-moodul
+Description[fr]=Un module d'entrée / sortie pour l'affichage des fichiers WinHelp
+Description[hu]=KDE-protokoll WinHelp-fájlok megjelenítéséhez
+Description[it]=Un kioslave per mostrare i file WinHelp
+Description[nl]=Een kioslave voor het weergeven van WinHelp-bestanden
+Description[pl]=kioslave do pokazywania plików WinHelp
+Description[pt]=A 'kioslave' para mostrar ficheiros WinHelp
+Description[pt_BR]=Um kioslave para exibir arquivos WinHelp
+Description[ru]=Обработчик ввода-вывода для файлов WinHelp
+Description[sv]=En I/O-slav för att visa WinHelp-filer
+Description[xx]=xxA kioslave for displaying WinHelp filesxx
+Icon=help
diff --git a/lib/libchmfile/Makefile.am b/lib/libchmfile/Makefile.am
new file mode 100644
index 0000000..2e16016
--- /dev/null
+++ b/lib/libchmfile/Makefile.am
@@ -0,0 +1,10 @@
+lib_LIBRARIES=libchmfile.a
+libchmfile_a_SOURCES = libchmfile.cpp libchmfile_search.cpp libchmfileimpl.cpp \
+ libchmtextencoding.cpp libchmtocimage.cpp
+noinst_HEADERS = libchmfile.h bitfiddle.h libchmfileimpl.h libchmtextencoding.h \
+ libchmtocimage.h libchmurlfactory.h
+
+INCLUDES = $(QT_INCLUDES) $(CHM_INCLUDES) $(KDE_INCLUDES)
+
+METASOURCES = AUTO
+KDE_OPTIONS = qtonly
diff --git a/lib/libchmfile/bitfiddle.h b/lib/libchmfile/bitfiddle.h
new file mode 100644
index 0000000..cd97b8e
--- /dev/null
+++ b/lib/libchmfile/bitfiddle.h
@@ -0,0 +1,155 @@
+/*
+
+ Copyright (C) 2003 Razvan Cojocaru <razvanco@gmx.net>
+ Most of the code in this file is a modified version of code from
+ Pabs' GPL chmdeco project, credits and thanks go to him.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+
+#define UINT16ARRAY(x) ((unsigned char)(x)[0] | ((u_int16_t)(x)[1] << 8))
+#define UINT32ARRAY(x) (UINT16ARRAY(x) | ((u_int32_t)(x)[2] << 16) \
+ | ((u_int32_t)(x)[3] << 24))
+
+inline unsigned int get_int32_le( void *addr)
+{
+ unsigned char *p = (unsigned char*) addr;
+ return (unsigned int) ( p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24) );
+}
+
+
+inline u_int64_t be_encint(unsigned char* buffer, size_t& length)
+{
+ u_int64_t result = 0;
+ int shift=0;
+ length = 0;
+
+ do {
+ result |= ((*buffer) & 0x7f) << shift;
+ shift += 7;
+ ++length;
+
+ } while (*(buffer++) & 0x80);
+
+ return result;
+}
+
+
+/*
+ Finds the first unset bit in memory. Returns the number of set bits found.
+ Returns -1 if the buffer runs out before we find an unset bit.
+*/
+inline int ffus(unsigned char* byte, int* bit, size_t& length)
+{
+ int bits = 0;
+ length = 0;
+
+ while(*byte & (1 << *bit)){
+ if(*bit)
+ --(*bit);
+ else {
+ ++byte;
+ ++length;
+ *bit = 7;
+ }
+ ++bits;
+ }
+
+ if(*bit)
+ --(*bit);
+ else {
+ ++length;
+ *bit = 7;
+ }
+
+ return bits;
+}
+
+
+inline u_int64_t sr_int(unsigned char* byte, int* bit,
+ unsigned char s, unsigned char r, size_t& length)
+{
+ u_int64_t ret;
+ unsigned char mask;
+ int n, n_bits, num_bits, base, count;
+ length = 0;
+ size_t fflen;
+
+ if(!bit || *bit > 7 || s != 2)
+ return ~(u_int64_t)0;
+ ret = 0;
+
+ count = ffus(byte, bit, fflen);
+ length += fflen;
+ byte += length;
+
+ n_bits = n = r + (count ? count-1 : 0) ;
+
+ while(n > 0) {
+ num_bits = n > *bit ? *bit : n-1;
+ base = n > *bit ? 0 : *bit - (n-1);
+
+ switch(num_bits){
+ case 0:
+ mask = 1;
+ break;
+ case 1:
+ mask = 3;
+ break;
+ case 2:
+ mask = 7;
+ break;
+ case 3:
+ mask = 0xf;
+ break;
+ case 4:
+ mask = 0x1f;
+ break;
+ case 5:
+ mask = 0x3f;
+ break;
+ case 6:
+ mask = 0x7f;
+ break;
+ case 7:
+ mask = 0xff;
+ break;
+ default:
+ mask = 0xff;
+ break;
+ }
+
+ mask <<= base;
+ ret = (ret << (num_bits+1)) |
+ (u_int64_t)((*byte & mask) >> base);
+
+ if( n > *bit ){
+ ++byte;
+ ++length;
+ n -= *bit+1;
+ *bit = 7;
+ } else {
+ *bit -= n;
+ n = 0;
+ }
+ }
+
+ if(count)
+ ret |= (u_int64_t)1 << n_bits;
+
+ return ret;
+}
diff --git a/lib/libchmfile/lchmurlhandler.cpp b/lib/libchmfile/lchmurlhandler.cpp
new file mode 100644
index 0000000..6e905f6
--- /dev/null
+++ b/lib/libchmfile/lchmurlhandler.cpp
@@ -0,0 +1,32 @@
+/***************************************************************************
+ * Copyright (C) 2004-2005 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+#include "lchmurlhandler.h"
+
+LCHMUrlHandler::LCHMUrlHandler()
+{
+}
+
+
+LCHMUrlHandler::~LCHMUrlHandler()
+{
+}
+
+
diff --git a/lib/libchmfile/lchmurlhandler.h b/lib/libchmfile/lchmurlhandler.h
new file mode 100644
index 0000000..9eb29ec
--- /dev/null
+++ b/lib/libchmfile/lchmurlhandler.h
@@ -0,0 +1,36 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef LCHMURLHANDLER_H
+#define LCHMURLHANDLER_H
+
+/**
+ @author tim <tim@krasnogorsk.ru>
+*/
+class LCHMUrlHandler{
+public:
+ LCHMUrlHandler();
+
+ ~LCHMUrlHandler();
+
+};
+
+#endif
diff --git a/lib/libchmfile/libchmfile.cpp b/lib/libchmfile/libchmfile.cpp
new file mode 100644
index 0000000..7d13aaa
--- /dev/null
+++ b/lib/libchmfile/libchmfile.cpp
@@ -0,0 +1,125 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "libchmfile.h"
+#include "libchmfileimpl.h"
+
+
+LCHMFile::LCHMFile( )
+{
+ m_impl = new LCHMFileImpl();
+}
+
+LCHMFile::~ LCHMFile( )
+{
+ delete m_impl;
+}
+
+bool LCHMFile::loadFile( const QString & archiveName )
+{
+ return m_impl->loadFile( archiveName );
+}
+
+void LCHMFile::closeAll( )
+{
+ m_impl->closeAll();
+}
+
+QString LCHMFile::title( ) const
+{
+ return m_impl->title();
+}
+
+QString LCHMFile::homeUrl( ) const
+{
+ QString url = m_impl->homeUrl();
+ return url.isNull() ? "/" : url;
+}
+
+bool LCHMFile::hasTableOfContents( ) const
+{
+ return !m_impl->m_topicsFile.isNull();
+}
+
+bool LCHMFile::hasIndexTable( ) const
+{
+ return !m_impl->m_indexFile.isNull();
+}
+
+bool LCHMFile::hasSearchTable( ) const
+{
+ return m_impl->m_searchAvailable;
+}
+
+bool LCHMFile::parseTableOfContents( QT34VECTOR< LCHMParsedEntry > * topics ) const
+{
+ return m_impl->parseFileAndFillArray( m_impl->m_topicsFile, topics, false );
+}
+
+bool LCHMFile::parseIndex( QT34VECTOR< LCHMParsedEntry > * indexes ) const
+{
+ return m_impl->parseFileAndFillArray( m_impl->m_indexFile, indexes, true );
+}
+
+bool LCHMFile::getFileContentAsString( QString * str, const QString & url )
+{
+ return m_impl->getFileContentAsString( str, url );
+}
+
+bool LCHMFile::getFileContentAsBinary( QByteArray * data, const QString & url )
+{
+ return m_impl->getFileContentAsBinary( data, url );
+}
+
+bool LCHMFile::enumerateFiles( QStringList * files )
+{
+ return m_impl->enumerateFiles( files );
+}
+
+QString LCHMFile::getTopicByUrl( const QString & url )
+{
+ return m_impl->getTopicByUrl( url );
+}
+
+const QPixmap * LCHMFile::getBookIconPixmap( unsigned int imagenum )
+{
+ return m_impl->getBookIconPixmap( imagenum );
+}
+
+const LCHMTextEncoding * LCHMFile::currentEncoding( ) const
+{
+ return m_impl->m_currentEncoding;
+}
+
+bool LCHMFile::setCurrentEncoding( const LCHMTextEncoding * encoding )
+{
+ return m_impl->setCurrentEncoding( encoding );
+}
+
+QString LCHMFile::normalizeUrl( const QString & url ) const
+{
+ return m_impl->normalizeUrl( url );
+}
+
+bool LCHMFile::getFileSize(unsigned int * size, const QString & url)
+{
+ return m_impl->getFileSize( size, url );
+}
diff --git a/lib/libchmfile/libchmfile.h b/lib/libchmfile/libchmfile.h
new file mode 100644
index 0000000..ab129b5
--- /dev/null
+++ b/lib/libchmfile/libchmfile.h
@@ -0,0 +1,290 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef INCLUDE_LIBCHMFILE_H
+#define INCLUDE_LIBCHMFILE_H
+
+#include <qstring.h>
+#include <qcstring.h>
+#include <qlistview.h>
+#include <qlistbox.h>
+#include <qmap.h>
+#include <qvaluevector.h>
+#include <qtextcodec.h>
+
+#include "libchmtextencoding.h"
+
+// Qt3/Qt4 compatibility: in Qt3 QVector stores pointers, not values - so QValueVector should be used.
+// In Qt4 QVector stores values, so we can use QVector
+#if defined (USE_QT_4)
+ #define QT34VECTOR QVector
+#else
+ #define QT34VECTOR QValueVector
+#endif
+
+
+//! Contains different (non-standard) image types
+namespace LCHMBookIcons
+{
+ const int IMAGE_NONE = -1;
+ const int IMAGE_AUTO = -2;
+ const int IMAGE_INDEX = -3;
+
+ const int MAX_BUILTIN_ICONS = 42;
+};
+
+
+//! Contains a single index or TOC entry. See LCHMFile::parseTOC() and LCHMFile::parseIndex()
+typedef struct
+{
+ //! Entry name
+ QString name;
+
+ //! Entry URLs. The TOC entry should have only one URL; the index entry could have several.
+ QStringList urls;
+
+ //! Associated image number. Used for TOC only; indexes does not have the image.
+ //! Use LCHMFile::getBookIconPixmap() to get associated pixmap icon
+ int imageid;
+
+ //! Indentation level for this entry.
+ int indent;
+
+} LCHMParsedEntry;
+
+
+// forward declaration
+class LCHMFileImpl;
+
+//! CHM files processor, heavily based on chmlib. Used search code from xchm.
+class LCHMFile
+{
+ public:
+ //! Default constructor and destructor.
+ LCHMFile();
+ ~LCHMFile();
+
+ /*!
+ * \brief Attempts to load a .chm file.
+ * \param archiveName The .chm filename.
+ * \return true on success, false on failure.
+ *
+ * Loads a CHM file. Could internally load more than one file, if files linked to
+ * this one are present locally (like MSDN).
+ * \ingroup init
+ */
+ bool loadFile( const QString& archiveName );
+
+ /*!
+ * \brief Closes all the files, and frees the appropriate data.
+ * \ingroup init
+ */
+ void closeAll();
+
+ /*!
+ * \brief Gets the title name of the opened .chm.
+ * \return The name of the opened document, or an empty string if no .chm has been loaded.
+ * \ingroup information
+ */
+ QString title() const;
+
+ /*!
+ * \brief Gets the URL of the default page in the chm archive.
+ * \return The home page name, with a '/' added in front and relative to
+ * the root of the archive filesystem. If no .chm has been opened,
+ * returns "/".
+ * \ingroup information
+ */
+ QString homeUrl() const;
+
+ /*!
+ * \brief Checks whether the Table of Contents is present in this file.
+ * \return true if it is available; false otherwise.
+ * \ingroup information
+ */
+ bool hasTableOfContents() const;
+
+ /*!
+ * \brief Checks whether the Index Table is present in this file.
+ * \return true if it is available; false otherwise.
+ * \ingroup information
+ */
+ bool hasIndexTable() const;
+
+ /*!
+ * \brief Checks whether the Search Table is available in this file.
+ * \return true if it is available; false otherwise.
+ * \ingroup information
+ *
+ * If the search table is not available, the search is not possible.
+ */
+ bool hasSearchTable() const;
+
+ /*!
+ * \brief Parses the Table of Contents (TOC)
+ * \param topics A pointer to the container which will store the parsed results.
+ * Will be cleaned before parsing.
+ * \return true if the tree is present and parsed successfully, false otherwise.
+ * The parser is built to be error-prone, however it still can abort with qFatal()
+ * by really buggy chm file; please report a bug if the file is opened ok under Windows.
+ * \ingroup fileparsing
+ */
+ bool parseTableOfContents( QT34VECTOR< LCHMParsedEntry > * topics ) const;
+
+ /*!
+ * \brief Parses the Index Table
+ * \param indexes A pointer to the container which will store the parsed results.
+ * Will be cleaned before parsing.
+ * \return true if the tree is present and parsed successfully, false otherwise.
+ * The parser is built to be error-prone, however it still can abort with qFatal()
+ * by really buggy chm file; so far it never happened on indexes.
+ * \ingroup fileparsing
+ */
+ bool parseIndex( QT34VECTOR< LCHMParsedEntry > * indexes ) const;
+
+ /*!
+ * \brief Retrieves the content from url in current chm file to QString.
+ * \param str A string where the retreived content should be stored.
+ * \param url An URL in chm file to retreive content from. Must be absolute.
+ * \return true if the content is successfully received; false otherwise.
+ *
+ * This function retreives the file content (mostly for HTML pages) from the chm archive
+ * opened by load() function. Because the content in chm file is not stored in Unicode, it
+ * will be recoded according to current encoding. Do not use for binary data.
+ *
+ * \sa setCurrentEncoding() currentEncoding() getFileContentAsBinary()
+ * \ingroup dataretrieve
+ */
+ bool getFileContentAsString( QString * str, const QString& url );
+
+ /*!
+ * \brief Retrieves the content from url in current chm file to QByteArray.
+ * \param data A data array where the retreived content should be stored.
+ * \param url An URL in chm file to retreive content from. Must be absolute.
+ * \return true if the content is successfully received; false otherwise.
+ *
+ * This function retreives the file content from the chm archive opened by load()
+ * function. The content is not encoded.
+ *
+ * \sa getFileContentAsString()
+ * \ingroup dataretrieve
+ */
+ bool getFileContentAsBinary( QByteArray * data, const QString& url );
+
+ /*!
+ * \brief Retrieves the content size.
+ * \param size A pointer where the size will be stored.
+ * \param url An URL in chm file to retreive content from. Must be absolute.
+ * \return true if the content size is successfully stored; false otherwise.
+ *
+ * \ingroup dataretrieve
+ */
+ bool getFileSize( unsigned int * size, const QString& url );
+
+ /*!
+ * \brief Obtains the list of all the files in current chm file archive.
+ * \param files An array to store list of URLs (file names) present in chm archive.
+ * \return true if the enumeration succeed; false otherwise (I could hardly imagine a reason).
+ *
+ * \ingroup dataretrieve
+ */
+ bool enumerateFiles( QStringList * files );
+
+ /*!
+ * \brief Gets the Title of the HTML page referenced by url.
+ * \param url An URL in chm file to get title from. Must be absolute.
+ * \return The title, or QString::null if the URL cannot be found or not a HTML page.
+ *
+ * \ingroup dataretrieve
+ */
+ QString getTopicByUrl ( const QString& url );
+
+ /*!
+ * \brief Gets the appropriate CHM pixmap icon.
+ * \param imagenum The image number from TOC.
+ * \return The pixmap to show in TOC tree.
+ *
+ * \ingroup dataretrieve
+ */
+ const QPixmap * getBookIconPixmap( unsigned int imagenum );
+
+ /*!
+ * \brief Normalizes the URL, converting relatives, adding "/" in front and removing ..
+ * \param url The URL to normalize.
+ * \return The normalized, cleaned up URL.
+ *
+ * \ingroup dataretrieve
+ */
+ QString normalizeUrl( const QString& url ) const;
+
+ /*!
+ * \brief Gets the current CHM archive encoding (set or autodetected)
+ * \return The current encoding.
+ *
+ * \ingroup encoding
+ */
+ const LCHMTextEncoding * currentEncoding() const;
+
+ /*!
+ * \brief Sets the CHM archive encoding to use
+ * \param encoding An encoding to use.
+ *
+ * \ingroup encoding
+ */
+ bool setCurrentEncoding ( const LCHMTextEncoding * encoding );
+
+ /*!
+ * \brief Execute a search query, return the results.
+ * \param query A search query.
+ * \param results An array to store URLs where the query was found.
+ * \return true if search was successful (this does not mean that it returned any results);
+ * false otherwise.
+ *
+ * This function executes a standard search query. The query should consist of one of more
+ * words separated by a space with a possible prefix. A prefix may be:
+ * + Plus indicates that the word is required; any page without this word is excluded from the result.
+ * - Minus indicates that the word is required to be absent; any page with this word is excluded from
+ * the result.
+ * "." Quotes indicates a phrase. Anything between quotes is a phrase, which is set of space-separated
+ * words. Will be in result only if the words in phrase are in page in the same sequence, and
+ * follow each other.
+ *
+ * If there is no prefix, the word considered as required.
+ * \ingroup search
+ */
+ bool searchQuery ( const QString& query, QStringList * results, unsigned int limit = 100 );
+
+ //! Access to implementation
+ LCHMFileImpl * impl() { return m_impl; }
+
+ private:
+ //! No copy construction allowed.
+ LCHMFile( const LCHMFile& );
+
+ //! No assignments allowed.
+ LCHMFile& operator=( const LCHMFile& );
+
+ //! Implementation
+ LCHMFileImpl * m_impl;
+};
+
+
+#endif // INCLUDE_LIBCHMFILE_H
diff --git a/lib/libchmfile/libchmfile_search.cpp b/lib/libchmfile/libchmfile_search.cpp
new file mode 100644
index 0000000..41acfb3
--- /dev/null
+++ b/lib/libchmfile/libchmfile_search.cpp
@@ -0,0 +1,289 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <qregexp.h>
+
+#include "libchmfile.h"
+#include "libchmfileimpl.h"
+
+//#define DEBUG_SEARCH(A) qDebug A
+#define DEBUG_SEARCH(A)
+
+
+static inline void validateWord ( QString & word, bool & query_valid )
+{
+ QRegExp rxvalid ("[^\\d\\w_\\.]+");
+
+ QString orig = word;
+ word.remove ( rxvalid );
+
+ if ( word != orig )
+ query_valid = false;
+}
+
+static inline void validateWords ( QStringList & wordlist, bool & query_valid )
+{
+ QRegExp rxvalid ("[^\\d\\w_\\.]+");
+
+ for ( unsigned int i = 0; i < wordlist.size(); i++ )
+ validateWord ( wordlist[i], query_valid );
+}
+
+
+inline static void mergeResults ( LCHMSearchProgressResults & results, const LCHMSearchProgressResults & src, bool add )
+{
+ if ( results.empty() && add )
+ {
+ results = src;
+ return;
+ }
+
+ for ( unsigned int s1 = 0; s1 < results.size(); s1++ )
+ {
+ bool found = false;
+
+ for ( unsigned int s2 = 0; s2 < src.size(); s2++ )
+ {
+ if ( results[s1].urloff == src[s2].urloff )
+ {
+ found = true;
+ break;
+ }
+ }
+
+ // If we're adding, we only add the items found (i.e. any item, which is not found, is removed.
+ // But if we're removing, we only remove the items found.
+ if ( (found && !add) || (!found && add) )
+ {
+ results.erase ( results.begin() + s1 );
+ s1--;
+ }
+ }
+}
+
+
+static inline void findNextWords ( QT34VECTOR<u_int64_t> & src, const QT34VECTOR<u_int64_t> & needle )
+{
+ for ( unsigned int s1 = 0; s1 < src.size(); s1++ )
+ {
+ bool found = false;
+ u_int64_t target_offset = src[s1] + 1;
+
+ DEBUG_SEARCH (("Offset loop: offset at %u is %u, target %u", (unsigned int) s1,
+ (unsigned int) src[s1], (unsigned int) target_offset));
+
+ // Search in the offsets list in attempt to find next word
+ for ( unsigned int s2 = 0; s2 < needle.size(); s2++ )
+ {
+ if ( needle[s2] == target_offset )
+ {
+ found = true;
+ break;
+ }
+ }
+
+ if ( !found )
+ {
+ // Remove this offset, we don't need it anymore
+ DEBUG_SEARCH (("Offset loop failed: offset %u not found", (unsigned int) target_offset));
+ src.erase ( src.begin() + s1 );
+ s1--;
+ }
+ else
+ {
+ DEBUG_SEARCH (("Offset loop succeed: offset %u found", (unsigned int) target_offset));
+ src[s1]++;
+ }
+ }
+}
+
+
+inline bool searchPhrase( LCHMFileImpl * impl, const QStringList & phrase, LCHMSearchProgressResults & results )
+{
+ // Accumulate the phrase data here.
+ LCHMSearchProgressResults phrasekeeper;
+
+ // On the first word, just fill the phrasekeeper with every occupence of the first word
+ DEBUG_SEARCH (("Search word(0): '%s'", phrase[0].ascii()));
+ if ( !impl->searchWord ( phrase[0], true, false, phrasekeeper, true ) )
+ return false; // the word not found, so the whole phrase is not found either.
+
+ for ( unsigned int i = 1; i < phrase.size(); i++ )
+ {
+ LCHMSearchProgressResults srchtmp;
+
+ DEBUG_SEARCH (("Search word(%d): '%s'", i, phrase[i].ascii()));
+ if ( !impl->searchWord ( phrase[i], true, false, srchtmp, true ) )
+ return false; // the ith word not found, so the whole phrase is not found either.
+
+ // Iterate the both arrays, and remove every word in phrasekeeper, which is not found
+ // in the srchtmp, or is found on a different position.
+ for ( unsigned int p1 = 0; p1 < phrasekeeper.size(); p1++ )
+ {
+ bool found = false;
+
+ DEBUG_SEARCH (("Ext loop (it %d): urloff %d", p1, phrasekeeper[p1].urloff));
+
+ for ( unsigned int p2 = 0; p2 < srchtmp.size(); p2++ )
+ {
+ // look up for words on the the same page
+ if ( srchtmp[p2].urloff != phrasekeeper[p1].urloff )
+ continue;
+
+ // Now check every offset to find the one which is 1 bigger than the
+ findNextWords ( phrasekeeper[p1].offsets, srchtmp[p2].offsets );
+
+ // If at least one next word is found, we leave the block intact, otherwise remove it.
+ if ( !phrasekeeper[p1].offsets.empty() )
+ found = true;
+ }
+
+ if ( !found )
+ {
+ DEBUG_SEARCH (("Ext loop: this word not found on %d, remove it", phrasekeeper[p1].urloff));
+ phrasekeeper.erase ( phrasekeeper.begin() + p1 );
+ p1--;
+ }
+ }
+ }
+
+ for ( unsigned int o = 0; o < phrasekeeper.size(); o++ )
+ results.push_back ( LCHMSearchProgressResult (phrasekeeper[o].titleoff, phrasekeeper[o].urloff) );
+
+ return !results.empty();
+}
+
+
+
+bool LCHMFile::searchQuery( const QString& inquery, QStringList * searchresults, unsigned int limit )
+{
+ QStringList words_must_exist, words_must_not_exist, words_highlight;
+ QT34VECTOR<QStringList> phrases_must_exist;
+ QString query = inquery;
+ bool query_valid = true;
+ LCHMSearchProgressResults results;
+ int pos;
+ unsigned int i;
+
+ /*
+ * Parse the search query with a simple state machine.
+ * Query should consist of one of more words separated by a space with a possible prefix.
+ * A prefix may be:
+ * + indicates that the word is required; any page without this word is excluded from the result.
+ * - indicates that the word is required to be absent; any page with this word is excluded from
+ * the result.
+ * "." indicates a phrase. Anything between quotes indicates a phrase, which is set of space-separated
+ * words. Will be in result only if the words in phrase are in page in the same sequence, and
+ * follow each other.
+ * If there is no prefix, the word considered as required.
+ */
+
+ QRegExp rxphrase( "\"(.*)\"" );
+ QRegExp rxword( "([^\\s]+)" );
+ rxphrase.setMinimal( TRUE );
+
+ // First, get the phrase queries
+ while ( (pos = rxphrase.search (query, 0)) != -1 )
+ {
+ // A phrase query found. Locate its boundaries, and parse it.
+ QStringList plist = QStringList::split ( QRegExp ("\\s+"), rxphrase.cap ( 1 ));
+
+ validateWords ( plist, query_valid );
+
+ if ( plist.size() > 0 )
+ phrases_must_exist.push_back( plist );
+
+ query.remove (pos, rxphrase.matchedLength());
+ }
+
+ // Then, parse the rest query
+ while ( (pos = rxword.search (query, 0)) != -1 )
+ {
+ // A phrase query found. Locate its boundaries, and parse it.
+ QString word = rxword.cap ( 1 );
+ QChar type = '+';
+
+ if ( word[0] == '-' || word[0] == '+' )
+ {
+ type = word[0];
+ word.remove (0, 1);
+ }
+
+ validateWord ( word, query_valid );
+
+ if ( type == '-' )
+ words_must_not_exist.push_back ( word );
+ else
+ words_must_exist.push_back ( word );
+
+ query.remove (pos, rxword.matchedLength());
+ }
+
+#if defined (DUMP_SEARCH_QUERY)
+ // Dump the search query
+ QString qdump;
+ for ( i = 0; i < phrases_must_exist.size(); i++ )
+ qdump += QString(" \"") + phrases_must_exist[i].join (" ") + QString ("\"");
+
+ for ( i = 0; i < words_must_not_exist.size(); i++ )
+ qdump += QString (" -") + words_must_not_exist[i];
+
+ for ( i = 0; i < words_must_exist.size(); i++ )
+ qdump += QString (" +") + words_must_exist[i];
+
+ qDebug ("Search query dump: %s", qdump.ascii());
+#endif
+
+ // First search for phrases
+ if ( phrases_must_exist.size() > 0 )
+ {
+ LCHMSearchProgressResults tempres;
+
+ for ( i = 0; i < phrases_must_exist.size(); i++ )
+ {
+ if ( !searchPhrase ( impl(), phrases_must_exist[i], tempres ) )
+ return false;
+
+ mergeResults ( results, tempres, true );
+ }
+ }
+
+ for ( i = 0; i < words_must_exist.size(); i++ )
+ {
+ LCHMSearchProgressResults tempres;
+
+ if ( !m_impl->searchWord ( words_must_exist[i], true, false, tempres, false ) )
+ return false;
+
+ mergeResults ( results, tempres, true );
+ }
+
+ for ( i = 0; i < words_must_not_exist.size(); i++ )
+ {
+ LCHMSearchProgressResults tempres;
+
+ m_impl->searchWord ( words_must_not_exist[i], true, false, tempres, false );
+ mergeResults ( results, tempres, false );
+ }
+
+ m_impl->getSearchResults( results, searchresults, limit );
+ return true;
+}
diff --git a/lib/libchmfile/libchmfileimpl.cpp b/lib/libchmfile/libchmfileimpl.cpp
new file mode 100644
index 0000000..6f1e052
--- /dev/null
+++ b/lib/libchmfile/libchmfileimpl.cpp
@@ -0,0 +1,1271 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Portions Copyright (C) 2003 Razvan Cojocaru <razvanco@gmx.net> *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <sys/types.h>
+
+#include <qcursor.h>
+#include <qfile.h>
+#include <qapplication.h>
+
+#include "config.h"
+#include "chm_lib.h"
+#include "bitfiddle.h"
+#include "libchmfile.h"
+#include "libchmurlfactory.h"
+#include "libchmfileimpl.h"
+
+// Big-enough buffer size for use with various routines.
+#define BUF_SIZE 4096
+#define COMMON_BUF_LEN 1025
+
+#define TOPICS_ENTRY_LEN 16
+#define URLTBL_ENTRY_LEN 12
+
+//#define DEBUGPARSER(A) qDebug A
+#define DEBUGPARSER(A) ;
+
+class KCHMShowWaitCursor
+{
+ public:
+ KCHMShowWaitCursor () { QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); }
+ ~KCHMShowWaitCursor () { QApplication::restoreOverrideCursor(); }
+};
+
+
+LCHMFileImpl::LCHMFileImpl( )
+{
+ m_chmFile = NULL;
+ m_home = m_filename = m_home = m_topicsFile = m_indexFile = m_font = QString::null;
+ m_entityDecodeMap.clear();
+ m_textCodec = 0;
+ m_textCodecForSpecialFiles = 0;
+ m_detectedLCID = 0;
+ m_currentEncoding = 0;
+}
+
+
+LCHMFileImpl::~ LCHMFileImpl( )
+{
+ closeAll();
+}
+
+
+bool LCHMFileImpl::loadFile( const QString & archiveName )
+{
+ QString filename;
+
+ // If the file has a file:// prefix, remove it
+ if ( archiveName.startsWith( "file://" ) )
+ filename = archiveName.mid( 7 ); // strip it
+ else
+ filename = archiveName;
+
+ if( m_chmFile )
+ closeAll();
+
+ m_chmFile = chm_open( QFile::encodeName(filename) );
+
+ if ( m_chmFile == NULL )
+ return false;
+
+ m_filename = filename;
+
+ // Reset encoding
+ m_textCodec = 0;
+ m_textCodecForSpecialFiles = 0;
+ m_currentEncoding = 0;
+
+ // Get information from /#WINDOWS and /#SYSTEM files (encoding, title, context file and so)
+ // and guess the encoding
+ getInfoFromWindows();
+ getInfoFromSystem();
+ guessTextEncoding();
+
+ // Check whether the search tables are present
+ if ( ResolveObject("/#TOPICS", &m_chmTOPICS)
+ && ResolveObject("/#STRINGS", &m_chmSTRINGS)
+ && ResolveObject("/#URLTBL", &m_chmURLTBL)
+ && ResolveObject("/#URLSTR", &m_chmURLSTR) )
+ {
+ m_lookupTablesValid = true;
+ fillTopicsUrlMap();
+ }
+ else
+ m_lookupTablesValid = false;
+
+ if ( m_lookupTablesValid && ResolveObject ("/$FIftiMain", &m_chmFIftiMain) )
+ m_searchAvailable = true;
+ else
+ m_searchAvailable = false;
+
+ return true;
+}
+
+
+void LCHMFileImpl::closeAll( )
+{
+ if ( m_chmFile == NULL )
+ return;
+
+ chm_close( m_chmFile );
+
+ m_chmFile = NULL;
+ m_home = m_filename = m_home = m_topicsFile = m_indexFile = m_font = QString::null;
+ m_entityDecodeMap.clear();
+ m_textCodec = 0;
+ m_textCodecForSpecialFiles = 0;
+ m_detectedLCID = 0;
+ m_currentEncoding = 0;
+}
+
+
+QString LCHMFileImpl::decodeEntity( const QString & entity )
+{
+ // Set up m_entityDecodeMap characters according to current textCodec
+ if ( m_entityDecodeMap.isEmpty() )
+ {
+ m_entityDecodeMap["AElig"] = encodeWithCurrentCodec ("\306"); // capital AE diphthong (ligature)
+ m_entityDecodeMap["Aacute"] = encodeWithCurrentCodec ("\301"); // capital A, acute accent
+ m_entityDecodeMap["Acirc"] = encodeWithCurrentCodec ("\302"); // capital A, circumflex accent
+ m_entityDecodeMap["Agrave"] = encodeWithCurrentCodec ("\300"); // capital A, grave accent
+ m_entityDecodeMap["Aring"] = encodeWithCurrentCodec ("\305"); // capital A, ring
+ m_entityDecodeMap["Atilde"] = encodeWithCurrentCodec ("\303"); // capital A, tilde
+ m_entityDecodeMap["Auml"] = encodeWithCurrentCodec ("\304"); // capital A, dieresis or umlaut mark
+ m_entityDecodeMap["Ccedil"] = encodeWithCurrentCodec ("\307"); // capital C, cedilla
+ m_entityDecodeMap["Dstrok"] = encodeWithCurrentCodec ("\320"); // whatever
+ m_entityDecodeMap["ETH"] = encodeWithCurrentCodec ("\320"); // capital Eth, Icelandic
+ m_entityDecodeMap["Eacute"] = encodeWithCurrentCodec ("\311"); // capital E, acute accent
+ m_entityDecodeMap["Ecirc"] = encodeWithCurrentCodec ("\312"); // capital E, circumflex accent
+ m_entityDecodeMap["Egrave"] = encodeWithCurrentCodec ("\310"); // capital E, grave accent
+ m_entityDecodeMap["Euml"] = encodeWithCurrentCodec ("\313"); // capital E, dieresis or umlaut mark
+ m_entityDecodeMap["Iacute"] = encodeWithCurrentCodec ("\315"); // capital I, acute accent
+ m_entityDecodeMap["Icirc"] = encodeWithCurrentCodec ("\316"); // capital I, circumflex accent
+ m_entityDecodeMap["Igrave"] = encodeWithCurrentCodec ("\314"); // capital I, grave accent
+ m_entityDecodeMap["Iuml"] = encodeWithCurrentCodec ("\317"); // capital I, dieresis or umlaut mark
+ m_entityDecodeMap["Ntilde"] = encodeWithCurrentCodec ("\321"); // capital N, tilde
+ m_entityDecodeMap["Oacute"] = encodeWithCurrentCodec ("\323"); // capital O, acute accent
+ m_entityDecodeMap["Ocirc"] = encodeWithCurrentCodec ("\324"); // capital O, circumflex accent
+ m_entityDecodeMap["Ograve"] = encodeWithCurrentCodec ("\322"); // capital O, grave accent
+ m_entityDecodeMap["Oslash"] = encodeWithCurrentCodec ("\330"); // capital O, slash
+ m_entityDecodeMap["Otilde"] = encodeWithCurrentCodec ("\325"); // capital O, tilde
+ m_entityDecodeMap["Ouml"] = encodeWithCurrentCodec ("\326"); // capital O, dieresis or umlaut mark
+ m_entityDecodeMap["THORN"] = encodeWithCurrentCodec ("\336"); // capital THORN, Icelandic
+ m_entityDecodeMap["Uacute"] = encodeWithCurrentCodec ("\332"); // capital U, acute accent
+ m_entityDecodeMap["Ucirc"] = encodeWithCurrentCodec ("\333"); // capital U, circumflex accent
+ m_entityDecodeMap["Ugrave"] = encodeWithCurrentCodec ("\331"); // capital U, grave accent
+ m_entityDecodeMap["Uuml"] = encodeWithCurrentCodec ("\334"); // capital U, dieresis or umlaut mark
+ m_entityDecodeMap["Yacute"] = encodeWithCurrentCodec ("\335"); // capital Y, acute accent
+ m_entityDecodeMap["OElig"] = encodeWithCurrentCodec ("\338"); // capital Y, acute accent
+ m_entityDecodeMap["oelig"] = encodeWithCurrentCodec ("\339"); // capital Y, acute accent
+
+ m_entityDecodeMap["aacute"] = encodeWithCurrentCodec ("\341"); // small a, acute accent
+ m_entityDecodeMap["acirc"] = encodeWithCurrentCodec ("\342"); // small a, circumflex accent
+ m_entityDecodeMap["aelig"] = encodeWithCurrentCodec ("\346"); // small ae diphthong (ligature)
+ m_entityDecodeMap["agrave"] = encodeWithCurrentCodec ("\340"); // small a, grave accent
+ m_entityDecodeMap["aring"] = encodeWithCurrentCodec ("\345"); // small a, ring
+ m_entityDecodeMap["atilde"] = encodeWithCurrentCodec ("\343"); // small a, tilde
+ m_entityDecodeMap["auml"] = encodeWithCurrentCodec ("\344"); // small a, dieresis or umlaut mark
+ m_entityDecodeMap["ccedil"] = encodeWithCurrentCodec ("\347"); // small c, cedilla
+ m_entityDecodeMap["eacute"] = encodeWithCurrentCodec ("\351"); // small e, acute accent
+ m_entityDecodeMap["ecirc"] = encodeWithCurrentCodec ("\352"); // small e, circumflex accent
+ m_entityDecodeMap["Scaron"] = encodeWithCurrentCodec ("\352"); // small e, circumflex accent
+ m_entityDecodeMap["egrave"] = encodeWithCurrentCodec ("\350"); // small e, grave accent
+ m_entityDecodeMap["eth"] = encodeWithCurrentCodec ("\360"); // small eth, Icelandic
+ m_entityDecodeMap["euml"] = encodeWithCurrentCodec ("\353"); // small e, dieresis or umlaut mark
+ m_entityDecodeMap["iacute"] = encodeWithCurrentCodec ("\355"); // small i, acute accent
+ m_entityDecodeMap["icirc"] = encodeWithCurrentCodec ("\356"); // small i, circumflex accent
+ m_entityDecodeMap["igrave"] = encodeWithCurrentCodec ("\354"); // small i, grave accent
+ m_entityDecodeMap["iuml"] = encodeWithCurrentCodec ("\357"); // small i, dieresis or umlaut mark
+ m_entityDecodeMap["ntilde"] = encodeWithCurrentCodec ("\361"); // small n, tilde
+ m_entityDecodeMap["oacute"] = encodeWithCurrentCodec ("\363"); // small o, acute accent
+ m_entityDecodeMap["ocirc"] = encodeWithCurrentCodec ("\364"); // small o, circumflex accent
+ m_entityDecodeMap["ograve"] = encodeWithCurrentCodec ("\362"); // small o, grave accent
+ m_entityDecodeMap["oslash"] = encodeWithCurrentCodec ("\370"); // small o, slash
+ m_entityDecodeMap["otilde"] = encodeWithCurrentCodec ("\365"); // small o, tilde
+ m_entityDecodeMap["ouml"] = encodeWithCurrentCodec ("\366"); // small o, dieresis or umlaut mark
+ m_entityDecodeMap["szlig"] = encodeWithCurrentCodec ("\337"); // small sharp s, German (sz ligature)
+ m_entityDecodeMap["thorn"] = encodeWithCurrentCodec ("\376"); // small thorn, Icelandic
+ m_entityDecodeMap["uacute"] = encodeWithCurrentCodec ("\372"); // small u, acute accent
+ m_entityDecodeMap["ucirc"] = encodeWithCurrentCodec ("\373"); // small u, circumflex accent
+ m_entityDecodeMap["ugrave"] = encodeWithCurrentCodec ("\371"); // small u, grave accent
+ m_entityDecodeMap["uuml"] = encodeWithCurrentCodec ("\374"); // small u, dieresis or umlaut mark
+ m_entityDecodeMap["yacute"] = encodeWithCurrentCodec ("\375"); // small y, acute accent
+ m_entityDecodeMap["yuml"] = encodeWithCurrentCodec ("\377"); // small y, dieresis or umlaut mark
+
+ m_entityDecodeMap["iexcl"] = encodeWithCurrentCodec ("\241");
+ m_entityDecodeMap["cent"] = encodeWithCurrentCodec ("\242");
+ m_entityDecodeMap["pound"] = encodeWithCurrentCodec ("\243");
+ m_entityDecodeMap["curren"] = encodeWithCurrentCodec ("\244");
+ m_entityDecodeMap["yen"] = encodeWithCurrentCodec ("\245");
+ m_entityDecodeMap["brvbar"] = encodeWithCurrentCodec ("\246");
+ m_entityDecodeMap["sect"] = encodeWithCurrentCodec ("\247");
+ m_entityDecodeMap["uml"] = encodeWithCurrentCodec ("\250");
+ m_entityDecodeMap["ordf"] = encodeWithCurrentCodec ("\252");
+ m_entityDecodeMap["laquo"] = encodeWithCurrentCodec ("\253");
+ m_entityDecodeMap["not"] = encodeWithCurrentCodec ("\254");
+ m_entityDecodeMap["shy"] = encodeWithCurrentCodec ("\255");
+ m_entityDecodeMap["macr"] = encodeWithCurrentCodec ("\257");
+ m_entityDecodeMap["deg"] = encodeWithCurrentCodec ("\260");
+ m_entityDecodeMap["plusmn"] = encodeWithCurrentCodec ("\261");
+ m_entityDecodeMap["sup1"] = encodeWithCurrentCodec ("\271");
+ m_entityDecodeMap["sup2"] = encodeWithCurrentCodec ("\262");
+ m_entityDecodeMap["sup3"] = encodeWithCurrentCodec ("\263");
+ m_entityDecodeMap["acute"] = encodeWithCurrentCodec ("\264");
+ m_entityDecodeMap["micro"] = encodeWithCurrentCodec ("\265");
+ m_entityDecodeMap["para"] = encodeWithCurrentCodec ("\266");
+ m_entityDecodeMap["middot"] = encodeWithCurrentCodec ("\267");
+ m_entityDecodeMap["cedil"] = encodeWithCurrentCodec ("\270");
+ m_entityDecodeMap["ordm"] = encodeWithCurrentCodec ("\272");
+ m_entityDecodeMap["raquo"] = encodeWithCurrentCodec ("\273");
+ m_entityDecodeMap["frac14"] = encodeWithCurrentCodec ("\274");
+ m_entityDecodeMap["frac12"] = encodeWithCurrentCodec ("\275");
+ m_entityDecodeMap["frac34"] = encodeWithCurrentCodec ("\276");
+ m_entityDecodeMap["iquest"] = encodeWithCurrentCodec ("\277");
+ m_entityDecodeMap["times"] = encodeWithCurrentCodec ("\327");
+ m_entityDecodeMap["divide"] = encodeWithCurrentCodec ("\367");
+
+ m_entityDecodeMap["copy"] = encodeWithCurrentCodec ("\251"); // copyright sign
+ m_entityDecodeMap["reg"] = encodeWithCurrentCodec ("\256"); // registered sign
+ m_entityDecodeMap["nbsp"] = encodeWithCurrentCodec ("\240"); // non breaking space
+
+ m_entityDecodeMap["fnof"] = QChar((unsigned short) 402);
+
+ m_entityDecodeMap["Delta"] = QChar((unsigned short) 916);
+ m_entityDecodeMap["Pi"] = QChar((unsigned short) 928);
+ m_entityDecodeMap["Sigma"] = QChar((unsigned short) 931);
+
+ m_entityDecodeMap["beta"] = QChar((unsigned short) 946);
+ m_entityDecodeMap["gamma"] = QChar((unsigned short) 947);
+ m_entityDecodeMap["delta"] = QChar((unsigned short) 948);
+ m_entityDecodeMap["eta"] = QChar((unsigned short) 951);
+ m_entityDecodeMap["theta"] = QChar((unsigned short) 952);
+ m_entityDecodeMap["lambda"] = QChar((unsigned short) 955);
+ m_entityDecodeMap["mu"] = QChar((unsigned short) 956);
+ m_entityDecodeMap["nu"] = QChar((unsigned short) 957);
+ m_entityDecodeMap["pi"] = QChar((unsigned short) 960);
+ m_entityDecodeMap["rho"] = QChar((unsigned short) 961);
+
+ m_entityDecodeMap["lsquo"] = QChar((unsigned short) 8216);
+ m_entityDecodeMap["rsquo"] = QChar((unsigned short) 8217);
+ m_entityDecodeMap["rdquo"] = QChar((unsigned short) 8221);
+ m_entityDecodeMap["bdquo"] = QChar((unsigned short) 8222);
+ m_entityDecodeMap["trade"] = QChar((unsigned short) 8482);
+ m_entityDecodeMap["ldquo"] = QChar((unsigned short) 8220);
+ m_entityDecodeMap["ndash"] = QChar((unsigned short) 8211);
+ m_entityDecodeMap["mdash"] = QChar((unsigned short) 8212);
+ m_entityDecodeMap["bull"] = QChar((unsigned short) 8226);
+ m_entityDecodeMap["hellip"] = QChar((unsigned short) 8230);
+ m_entityDecodeMap["emsp"] = QChar((unsigned short) 8195);
+ m_entityDecodeMap["rarr"] = QChar((unsigned short) 8594);
+ m_entityDecodeMap["rArr"] = QChar((unsigned short) 8658);
+ m_entityDecodeMap["crarr"] = QChar((unsigned short) 8629);
+ m_entityDecodeMap["le"] = QChar((unsigned short) 8804);
+ m_entityDecodeMap["ge"] = QChar((unsigned short) 8805);
+ m_entityDecodeMap["lte"] = QChar((unsigned short) 8804); // wrong, but used somewhere
+ m_entityDecodeMap["gte"] = QChar((unsigned short) 8805); // wrong, but used somewhere
+ m_entityDecodeMap["dagger"] = QChar((unsigned short) 8224);
+ m_entityDecodeMap["Dagger"] = QChar((unsigned short) 8225);
+ m_entityDecodeMap["euro"] = QChar((unsigned short) 8364);
+ m_entityDecodeMap["asymp"] = QChar((unsigned short) 8776);
+ m_entityDecodeMap["isin"] = QChar((unsigned short) 8712);
+ m_entityDecodeMap["notin"] = QChar((unsigned short) 8713);
+ m_entityDecodeMap["prod"] = QChar((unsigned short) 8719);
+ m_entityDecodeMap["ne"] = QChar((unsigned short) 8800);
+
+ m_entityDecodeMap["amp"] = "&"; // ampersand
+ m_entityDecodeMap["gt"] = ">"; // greater than
+ m_entityDecodeMap["lt"] = "<"; // less than
+ m_entityDecodeMap["quot"] = "\""; // double quote
+ m_entityDecodeMap["apos"] = "'"; // single quote
+ m_entityDecodeMap["frasl"] = "/";
+ m_entityDecodeMap["minus"] = "-";
+ m_entityDecodeMap["oplus"] = "+";
+ m_entityDecodeMap["Prime"] = "\"";
+ }
+
+ // If entity is an ASCII code like &#12349; - just decode it
+ if ( entity[0] == '#' )
+ {
+ bool valid;
+ unsigned int ascode = entity.mid(1).toUInt( &valid );
+
+ if ( !valid )
+ {
+ qWarning ( "LCHMFileImpl::decodeEntity: could not decode HTML entity '%s'", entity.ascii() );
+ return QString::null;
+ }
+
+ return (QString) (QChar( ascode ));
+ }
+ else
+ {
+ QMap<QString, QString>::const_iterator it = m_entityDecodeMap.find( entity );
+
+ if ( it == m_entityDecodeMap.end() )
+ {
+ qWarning ("LCHMFileImpl::decodeEntity: could not decode HTML entity '%s'", entity.ascii());
+ return QString::null;
+ }
+
+ return *it;
+ }
+}
+
+
+inline int LCHMFileImpl::findStringInQuotes (const QString& tag, int offset, QString& value, bool firstquote, bool decodeentities)
+{
+ int qbegin = tag.find ('"', offset);
+
+ if ( qbegin == -1 )
+ qFatal ("LCHMFileImpl::findStringInQuotes: cannot find first quote in <param> tag: '%s'", tag.ascii());
+
+ int qend = firstquote ? tag.find ('"', qbegin + 1) : tag.findRev ('"');
+
+ if ( qend == -1 || qend <= qbegin )
+ qFatal ("LCHMFileImpl::findStringInQuotes: cannot find last quote in <param> tag: '%s'", tag.ascii());
+
+ // If we do not need to decode HTML entities, just return.
+ if ( decodeentities )
+ {
+ QString htmlentity = QString::null;
+ bool fill_entity = false;
+
+ value.reserve (qend - qbegin); // to avoid multiple memory allocations
+
+ for ( int i = qbegin + 1; i < qend; i++ )
+ {
+ if ( !fill_entity )
+ {
+ if ( tag[i] == '&' ) // HTML entity starts
+ fill_entity = true;
+ else
+ value.append (tag[i]);
+ }
+ else
+ {
+ if ( tag[i] == ';' ) // HTML entity ends
+ {
+ // If entity is an ASCII code, just decode it
+ QString decode = decodeEntity( htmlentity );
+
+ if ( decode.isNull() )
+ break;
+
+ value.append ( decode );
+ htmlentity = QString::null;
+ fill_entity = false;
+ }
+ else
+ htmlentity.append (tag[i]);
+ }
+ }
+ }
+ else
+ value = tag.mid (qbegin + 1, qend - qbegin - 1);
+
+ return qend + 1;
+}
+
+
+bool LCHMFileImpl::searchWord (const QString& text,
+ bool wholeWords,
+ bool titlesOnly,
+ LCHMSearchProgressResults& results,
+ bool phrase_search)
+{
+ bool partial = false;
+
+ if ( text.isEmpty() || !m_searchAvailable )
+ return false;
+
+ QString searchword = (QString) convertSearchWord (text);
+
+#define FTS_HEADER_LEN 0x32
+ unsigned char header[FTS_HEADER_LEN];
+
+ if ( RetrieveObject (&m_chmFIftiMain, header, 0, FTS_HEADER_LEN) == 0 )
+ return false;
+
+ unsigned char doc_index_s = header[0x1E], doc_index_r = header[0x1F];
+ unsigned char code_count_s = header[0x20], code_count_r = header[0x21];
+ unsigned char loc_codes_s = header[0x22], loc_codes_r = header[0x23];
+
+ if(doc_index_s != 2 || code_count_s != 2 || loc_codes_s != 2)
+ {
+ // Don't know how to use values other than 2 yet. Maybe next chmspec.
+ return false;
+ }
+
+ unsigned char* cursor32 = header + 0x14;
+ u_int32_t node_offset = UINT32ARRAY(cursor32);
+
+ cursor32 = header + 0x2e;
+ u_int32_t node_len = UINT32ARRAY(cursor32);
+
+ unsigned char* cursor16 = header + 0x18;
+ u_int16_t tree_depth = UINT16ARRAY(cursor16);
+
+ unsigned char word_len, pos;
+ QString word;
+ u_int32_t i = sizeof(u_int16_t);
+ u_int16_t free_space;
+
+ QMemArray<unsigned char> buffer(node_len);
+
+ node_offset = GetLeafNodeOffset (searchword, node_offset, node_len, tree_depth);
+
+ if ( !node_offset )
+ return false;
+
+ do
+ {
+ // got a leaf node here.
+ if ( RetrieveObject (&m_chmFIftiMain, buffer.data(), node_offset, node_len) == 0 )
+ return false;
+
+ cursor16 = buffer.data() + 6;
+ free_space = UINT16ARRAY(cursor16);
+
+ i = sizeof(u_int32_t) + sizeof(u_int16_t) + sizeof(u_int16_t);
+ u_int64_t wlc_count, wlc_size;
+ u_int32_t wlc_offset;
+
+ while (i < node_len - free_space)
+ {
+ word_len = *(buffer.data() + i);
+ pos = *(buffer.data() + i + 1);
+
+ char *wrd_buf = new char[word_len];
+ memcpy (wrd_buf, buffer.data() + i + 2, word_len - 1);
+ wrd_buf[word_len - 1] = 0;
+
+ if ( pos == 0 )
+ word = wrd_buf;
+ else
+ word = word.mid (0, pos) + wrd_buf;
+
+ delete[] wrd_buf;
+
+ i += 2 + word_len;
+ unsigned char title = *(buffer.data() + i - 1);
+
+ size_t encsz;
+ wlc_count = be_encint (buffer.data() + i, encsz);
+ i += encsz;
+
+ cursor32 = buffer.data() + i;
+ wlc_offset = UINT32ARRAY(cursor32);
+
+ i += sizeof(u_int32_t) + sizeof(u_int16_t);
+ wlc_size = be_encint (buffer.data() + i, encsz);
+ i += encsz;
+
+ cursor32 = buffer.data();
+ node_offset = UINT32ARRAY(cursor32);
+
+ if ( !title && titlesOnly )
+ continue;
+
+ if ( wholeWords && searchword == word )
+ return ProcessWLC(wlc_count, wlc_size,
+ wlc_offset, doc_index_s,
+ doc_index_r,code_count_s,
+ code_count_r, loc_codes_s,
+ loc_codes_r, results, phrase_search);
+
+ if ( !wholeWords )
+ {
+ if ( word.startsWith (searchword))
+ {
+ partial = true;
+
+ ProcessWLC(wlc_count, wlc_size,
+ wlc_offset, doc_index_s,
+ doc_index_r,code_count_s,
+ code_count_r, loc_codes_s,
+ loc_codes_r, results, phrase_search);
+
+ }
+ else if ( QString::compare (searchword, word.mid(0, searchword.length())) < -1 )
+ break;
+ }
+ }
+ }
+ while ( !wholeWords && word.startsWith (searchword) && node_offset );
+
+ return partial;
+}
+
+
+bool LCHMFileImpl::ResolveObject(const QString& fileName, chmUnitInfo *ui) const
+{
+ return m_chmFile != NULL
+ && ::chm_resolve_object(m_chmFile, fileName.ascii(), ui) ==
+ CHM_RESOLVE_SUCCESS;
+}
+
+
+size_t LCHMFileImpl::RetrieveObject(const chmUnitInfo *ui, unsigned char *buffer,
+ LONGUINT64 fileOffset, LONGINT64 bufferSize) const
+{
+#if USE_BUILTIN_CHMLIB
+ return ::chm_retrieve_object(m_chmFile, ui, buffer,
+ fileOffset, bufferSize);
+#else
+ return ::chm_retrieve_object(m_chmFile, const_cast<chmUnitInfo*>(ui),
+ buffer, fileOffset, bufferSize);
+#endif
+}
+
+
+inline u_int32_t LCHMFileImpl::GetLeafNodeOffset(const QString& text,
+ u_int32_t initialOffset,
+ u_int32_t buffSize,
+ u_int16_t treeDepth)
+{
+ u_int32_t test_offset = 0;
+ unsigned char* cursor16, *cursor32;
+ unsigned char word_len, pos;
+ u_int32_t i = sizeof(u_int16_t);
+ QMemArray<unsigned char> buffer(buffSize);
+ QString word;
+
+ while(--treeDepth)
+ {
+ if ( initialOffset == test_offset )
+ return 0;
+
+ test_offset = initialOffset;
+ if ( RetrieveObject (&m_chmFIftiMain, buffer.data(), initialOffset, buffSize) == 0 )
+ return 0;
+
+ cursor16 = buffer.data();
+ u_int16_t free_space = UINT16ARRAY(cursor16);
+
+ while (i < buffSize - free_space )
+ {
+ word_len = *(buffer.data() + i);
+ pos = *(buffer.data() + i + 1);
+
+ char *wrd_buf = new char[word_len];
+ memcpy ( wrd_buf, buffer.data() + i + 2, word_len - 1 );
+ wrd_buf[word_len - 1] = 0;
+
+ if ( pos == 0 )
+ word = wrd_buf;
+ else
+ word = word.mid(0, pos) + wrd_buf;
+
+ delete[] wrd_buf;
+
+ if ( text <= word )
+ {
+ cursor32 = buffer.data() + i + word_len + 1;
+ initialOffset = UINT32ARRAY(cursor32);
+ break;
+ }
+
+ i += word_len + sizeof(unsigned char) +
+ sizeof(u_int32_t) + sizeof(u_int16_t);
+ }
+ }
+
+ if ( initialOffset == test_offset )
+ return 0;
+
+ return initialOffset;
+}
+
+
+inline bool LCHMFileImpl::ProcessWLC (u_int64_t wlc_count, u_int64_t wlc_size,
+ u_int32_t wlc_offset, unsigned char ds,
+ unsigned char dr, unsigned char cs,
+ unsigned char cr, unsigned char ls,
+ unsigned char lr,
+ LCHMSearchProgressResults& results,
+ bool phrase_search)
+{
+ int wlc_bit = 7;
+ u_int64_t index = 0, count;
+ size_t length, off = 0;
+ QMemArray<unsigned char> buffer (wlc_size);
+ unsigned char *cursor32;
+
+ unsigned char entry[TOPICS_ENTRY_LEN];
+ unsigned char combuf[13];
+
+ if ( RetrieveObject (&m_chmFIftiMain, buffer.data(), wlc_offset, wlc_size) == 0 )
+ return false;
+
+ for ( u_int64_t i = 0; i < wlc_count; ++i )
+ {
+ if ( wlc_bit != 7 )
+ {
+ ++off;
+ wlc_bit = 7;
+ }
+
+ index += sr_int (buffer.data() + off, &wlc_bit, ds, dr, length);
+ off += length;
+
+ if ( RetrieveObject (&m_chmTOPICS, entry, index * 16, TOPICS_ENTRY_LEN) == 0 )
+ return false;
+
+ LCHMSearchProgressResult progres;
+
+ cursor32 = entry + 4;
+ progres.titleoff = UINT32ARRAY(cursor32);
+
+ cursor32 = entry + 8;
+ progres.urloff = UINT32ARRAY(cursor32);
+
+ if ( RetrieveObject (&m_chmURLTBL, combuf, progres.urloff, 12) == 0 )
+ return false;
+
+ cursor32 = combuf + 8;
+ progres.urloff = UINT32ARRAY (cursor32);
+
+ count = sr_int (buffer.data() + off, &wlc_bit, cs, cr, length);
+ off += length;
+
+ if ( phrase_search )
+ progres.offsets.reserve (count);
+
+ for (u_int64_t j = 0; j < count; ++j)
+ {
+ u_int64_t lcode = sr_int (buffer.data() + off, &wlc_bit, ls, lr, length);
+ off += length;
+
+ if ( phrase_search )
+ progres.offsets.push_back (lcode);
+ }
+
+ results.push_back (progres);
+ }
+
+ return true;
+}
+
+
+bool LCHMFileImpl::getInfoFromWindows()
+{
+#define WIN_HEADER_LEN 0x08
+ unsigned char buffer[BUF_SIZE];
+ unsigned int factor;
+ chmUnitInfo ui;
+ long size = 0;
+
+ if ( ResolveObject("/#WINDOWS", &ui) )
+ {
+ if ( !RetrieveObject(&ui, buffer, 0, WIN_HEADER_LEN) )
+ return false;
+
+ u_int32_t entries = get_int32_le( (u_int32_t *)(buffer) );
+ u_int32_t entry_size = get_int32_le( (u_int32_t *)(buffer + 0x04) );
+
+ QByteArray uptr(entries * entry_size);
+ unsigned char* raw = (unsigned char*) uptr.data();
+
+ if ( !RetrieveObject (&ui, raw, 8, entries * entry_size) )
+ return false;
+
+ if( !ResolveObject ("/#STRINGS", &ui) )
+ return false;
+
+ for ( u_int32_t i = 0; i < entries; ++i )
+ {
+ u_int32_t offset = i * entry_size;
+
+ u_int32_t off_title = get_int32_le( (u_int32_t *)(raw + offset + 0x14) );
+ u_int32_t off_home = get_int32_le( (u_int32_t *)(raw + offset + 0x68) );
+ u_int32_t off_hhc = get_int32_le( (u_int32_t *)(raw + offset + 0x60) );
+ u_int32_t off_hhk = get_int32_le( (u_int32_t *)(raw + offset + 0x64) );
+
+ factor = off_title / 4096;
+
+ if ( size == 0 )
+ size = RetrieveObject(&ui, buffer, factor * 4096, BUF_SIZE);
+
+ if ( size && off_title )
+ m_title = QString ((const char*) (buffer + off_title % 4096));
+
+ if ( factor != off_home / 4096)
+ {
+ factor = off_home / 4096;
+ size = RetrieveObject (&ui, buffer, factor * 4096, BUF_SIZE);
+ }
+
+ if ( size && off_home )
+ m_home = QString("/") + QString( (const char*) buffer + off_home % 4096);
+
+ if ( factor != off_hhc / 4096)
+ {
+ factor = off_hhc / 4096;
+ size = RetrieveObject(&ui, buffer, factor * 4096, BUF_SIZE);
+ }
+
+ if ( size && off_hhc )
+ m_topicsFile = QString("/") + QString ((const char*) buffer + off_hhc % 4096);
+
+ if ( factor != off_hhk / 4096)
+ {
+ factor = off_hhk / 4096;
+ size = RetrieveObject (&ui, buffer, factor * 4096, BUF_SIZE);
+ }
+
+ if ( size && off_hhk )
+ m_indexFile = QString("/") + QString((const char*) buffer + off_hhk % 4096);
+ }
+ }
+ return true;
+}
+
+
+
+bool LCHMFileImpl::getInfoFromSystem()
+{
+ unsigned char buffer[BUF_SIZE];
+ chmUnitInfo ui;
+
+ int index = 0;
+ unsigned char* cursor = NULL, *p;
+ u_int16_t value = 0;
+ long size = 0;
+
+ // Run the first loop to detect the encoding. We need this, because title could be
+ // already encoded in user encoding. Same for file names
+ if ( !ResolveObject ("/#SYSTEM", &ui) )
+ return false;
+
+ // Can we pull BUFF_SIZE bytes of the #SYSTEM file?
+ if ( (size = RetrieveObject (&ui, buffer, 4, BUF_SIZE)) == 0 )
+ return false;
+
+ buffer[size - 1] = 0;
+
+ // First loop to detect the encoding
+ for ( index = 0; index < (size - 1 - (long)sizeof(u_int16_t)) ;)
+ {
+ cursor = buffer + index;
+ value = UINT16ARRAY(cursor);
+
+ switch(value)
+ {
+ case 0:
+ index += 2;
+ cursor = buffer + index;
+
+ if(m_topicsFile.isEmpty())
+ m_topicsFile = QString("/") + QString((const char*) buffer + index + 2);
+
+ break;
+
+ case 1:
+ index += 2;
+ cursor = buffer + index;
+
+ if(m_indexFile.isEmpty())
+ m_indexFile = QString("/") + QString ((const char*)buffer + index + 2);
+ break;
+
+ case 2:
+ index += 2;
+ cursor = buffer + index;
+
+ if(m_home.isEmpty() || m_home == "/")
+ m_home = QString("/") + QString ((const char*) buffer + index + 2);
+ break;
+
+ case 3:
+ index += 2;
+ cursor = buffer + index;
+ m_title = QString((const char*) (buffer + index + 2));
+ break;
+
+ case 4:
+ index += 2;
+ cursor = buffer + index;
+
+ p = buffer + index + 2;
+ m_detectedLCID = (short) (p[0] | (p[1]<<8));
+
+ break;
+
+ case 6:
+ index += 2;
+ cursor = buffer + index;
+
+ if(m_topicsFile.isEmpty()) {
+ QString topicAttempt = "/", tmp;
+ topicAttempt += QString ((const char*) buffer +index +2);
+
+ tmp = topicAttempt + ".hhc";
+
+ if ( ResolveObject( tmp, &ui) )
+ m_topicsFile = tmp;
+
+ tmp = topicAttempt + ".hhk";
+
+ if ( ResolveObject( tmp, &ui) )
+ m_indexFile = tmp;
+ }
+ break;
+
+ case 16:
+ index += 2;
+ cursor = buffer + index;
+
+ m_font = QString ((const char*) buffer + index + 2);
+ break;
+
+ default:
+ index += 2;
+ cursor = buffer + index;
+ }
+
+ value = UINT16ARRAY(cursor);
+ index += value + 2;
+ }
+
+ return true;
+}
+
+
+QCString LCHMFileImpl::convertSearchWord( const QString & src )
+{
+ static const char * searchwordtable[128] =
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "s", 0, "oe", 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "s", 0, "oe", 0, 0, "y",
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ "a", "a", "a", "a", "a", "a", "ae", "c", "e", "e", "e", "e", "i", "i", "i", "i",
+ "d", "n", "o", "o", "o", "o", "o", 0, "o", "u", "u", "u", "u", "y", "\xDE", "ss",
+ "a", "a", "a", "a", "a", "a", "ae", "c", "e", "e", "e", "e", "i", "i", "i", "i",
+ "o", "n", "o", "o", "o", "o", "o", 0, "o", "u", "u", "u", "u", "y", "\xFE", "y"
+ };
+
+ if ( !m_textCodec )
+ return (QCString) src.lower();
+
+ QCString dest = m_textCodec->fromUnicode (src);
+
+ for ( unsigned int i = 0; i < dest.size(); i++ )
+ {
+ if ( dest[i] & 0x80 )
+ {
+ int index = dest[i] & 0x7F;
+ if ( searchwordtable[index] )
+ dest.replace (i, 1, searchwordtable[index]);
+ else
+ dest.remove (i, 1);
+ }
+ }
+
+ return dest.lower();
+}
+
+
+
+void LCHMFileImpl::getSearchResults( const LCHMSearchProgressResults& tempres,
+ QStringList * results,
+ unsigned int limit_results )
+{
+ unsigned char combuf [COMMON_BUF_LEN];
+ QMap<u_int32_t, u_int32_t> urlsmap; // used to prevent duplicated urls
+
+ for ( unsigned int i = 0; i < tempres.size(); i++ )
+ {
+ if ( urlsmap.find (tempres[i].urloff) != urlsmap.end() )
+ continue;
+
+ urlsmap[tempres[i].urloff] = 1;
+
+ if ( RetrieveObject (&m_chmURLSTR, combuf, tempres[i].urloff + 8, COMMON_BUF_LEN - 1) == 0 )
+ continue;
+
+ combuf[COMMON_BUF_LEN - 1] = 0;
+ results->push_back( LCHMUrlFactory::makeURLabsoluteIfNeeded( (const char*) combuf ) );
+
+ if ( --limit_results == 0 )
+ break;
+ }
+}
+
+
+QString LCHMFileImpl::normalizeUrl( const QString & path ) const
+{
+ int pos = path.find ('#');
+ QString fixedpath = pos == -1 ? path : path.left (pos);
+
+ return LCHMUrlFactory::makeURLabsoluteIfNeeded( fixedpath );
+}
+
+
+/*
+ * FIXME: <OBJECT type="text/sitemap"><param name="Merge" value="hhaxref.chm::/HHOCX_c.hhc"></OBJECT>
+ * (from htmlhelp.chm)
+*/
+bool LCHMFileImpl::parseFileAndFillArray( const QString & file, QT34VECTOR< LCHMParsedEntry > * data, bool asIndex )
+{
+ QString src;
+ const int MAX_NEST_DEPTH = 256;
+
+ if ( !getFileContentAsString( &src, file ) || src.isEmpty() )
+ return false;
+
+ KCHMShowWaitCursor wc;
+
+/*
+ // Save the index for debugging purposes
+ QFile outfile( "parsed.htm" );
+
+ if ( outfile.open( IO_WriteOnly ) )
+ {
+ QTextStream textstream( &outfile );
+ textstream << src;
+ outfile.close();
+ }
+*/
+
+ unsigned int defaultimagenum = asIndex ? LCHMBookIcons::IMAGE_INDEX : LCHMBookIcons::IMAGE_AUTO;
+ int pos = 0, indent = 0, root_indent_offset = 0;
+ bool in_object = false, root_indent_offset_set = false;
+
+ LCHMParsedEntry entry;
+ entry.imageid = defaultimagenum;
+
+ // Split the HHC file by HTML tags
+ int stringlen = src.length();
+
+ while ( pos < stringlen && (pos = src.find ('<', pos)) != -1 )
+ {
+ int i, word_end = 0;
+
+ for ( i = ++pos; i < stringlen; i++ )
+ {
+ // If a " or ' is found, skip to the next one.
+ if ( (src[i] == '"' || src[i] == '\'') )
+ {
+ // find where quote ends, either by another quote, or by '>' symbol (some people don't know HTML)
+ int nextpos = src.find (src[i], i+1);
+ if ( nextpos == -1 && (nextpos = src.find ('>', i+1)) == -1 )
+ {
+ qWarning ("LCHMFileImpl::ParseHhcAndFillTree: corrupted TOC: %s", src.mid(i).ascii());
+ return false;
+ }
+
+ i = nextpos;
+ }
+ else if ( src[i] == '>' )
+ break;
+ else if ( !src[i].isLetterOrNumber() && src[i] != '/' && !word_end )
+ word_end = i;
+ }
+
+ QString tagword, tag = src.mid (pos, i - pos);
+
+ if ( word_end )
+ tagword = src.mid (pos, word_end - pos).lower();
+ else
+ tagword = tag.lower();
+
+ //qDebug ("tag: '%s', tagword: '%s'\n", tag.ascii(), tagword.ascii());
+
+ // <OBJECT type="text/sitemap"> - a topic entry
+ if ( tagword == "object" && tag.find ("text/sitemap", 0, false) != -1 )
+ in_object = true;
+ else if ( tagword == "/object" && in_object )
+ {
+ // a topic entry closed. Add a tree item
+ if ( entry.name )
+ {
+ if ( !root_indent_offset_set )
+ {
+ root_indent_offset_set = true;
+ root_indent_offset = indent;
+
+ if ( root_indent_offset > 1 )
+ qWarning("CHM has improper index; root indent offset is %d", root_indent_offset);
+ }
+
+ int real_indent = indent - root_indent_offset;
+
+ entry.indent = real_indent;
+ data->push_back( entry );
+ }
+ else
+ {
+ if ( !entry.urls.isEmpty() )
+ qDebug ("LCHMFileImpl::ParseAndFillTopicsTree: <object> tag with url \"%s\" is parsed, but name is empty.", entry.urls[0].ascii());
+ else
+ qDebug ("LCHMFileImpl::ParseAndFillTopicsTree: <object> tag is parsed, but both name and url are empty.");
+ }
+
+ entry.name = QString::null;
+ entry.urls.clear();
+ entry.imageid = defaultimagenum;
+ in_object = false;
+ }
+ else if ( tagword == "param" && in_object )
+ {
+ // <param name="Name" value="First Page">
+ int offset; // strlen("param ")
+ QString name_pattern = "name=", value_pattern = "value=";
+ QString pname, pvalue;
+
+ if ( (offset = tag.find (name_pattern, 0, FALSE)) == -1 )
+ qFatal ("LCHMFileImpl::ParseAndFillTopicsTree: bad <param> tag '%s': no name=\n", tag.ascii());
+
+ // offset+5 skips 'name='
+ offset = findStringInQuotes (tag, offset + name_pattern.length(), pname, TRUE, FALSE);
+ pname = pname.lower();
+
+ if ( (offset = tag.find (value_pattern, offset, FALSE)) == -1 )
+ qFatal ("LCHMFileImpl::ParseAndFillTopicsTree: bad <param> tag '%s': no value=\n", tag.ascii());
+
+ // offset+6 skips 'value='
+ findStringInQuotes (tag, offset + value_pattern.length(), pvalue, FALSE, TRUE);
+
+ //qDebug ("<param>: name '%s', value '%s'", pname.ascii(), pvalue.ascii());
+
+ if ( pname == "name" )
+ {
+ // Some help files contain duplicate names, where the second name is empty. Work it around by keeping the first one
+ if ( !pvalue.isEmpty() )
+ entry.name = pvalue;
+ }
+ else if ( pname == "local" )
+ {
+ // Check for URL duplication
+ QString url = LCHMUrlFactory::makeURLabsoluteIfNeeded( pvalue );
+
+ if ( entry.urls.find( url ) == entry.urls.end() )
+ entry.urls.push_back( url );
+ }
+ else if ( pname == "see also" && asIndex && entry.name != pvalue )
+ entry.urls.push_back (":" + pvalue);
+ else if ( pname == "imagenumber" )
+ {
+ bool bok;
+ int imgnum = pvalue.toInt (&bok);
+
+ if ( bok && imgnum >= 0 && imgnum < LCHMBookIcons::MAX_BUILTIN_ICONS )
+ entry.imageid = imgnum;
+ }
+ }
+ else if ( tagword == "ul" ) // increase indent level
+ {
+ // Fix for buggy help files
+ if ( ++indent >= MAX_NEST_DEPTH )
+ qFatal("LCHMFileImpl::ParseAndFillTopicsTree: max nest depth (%d) is reached, error in help file", MAX_NEST_DEPTH);
+
+ // This intended to fix <ul><ul>, which was seen in some buggy chm files,
+ // and brokes rootentry[indent-1] check
+ }
+ else if ( tagword == "/ul" ) // decrease indent level
+ {
+ if ( --indent < root_indent_offset )
+ indent = root_indent_offset;
+
+ DEBUGPARSER(("</ul>: new intent is %d\n", indent - root_indent_offset));
+ }
+
+ pos = i;
+ }
+
+ return true;
+}
+
+
+bool LCHMFileImpl::getFileContentAsBinary( QByteArray * data, const QString & url ) const
+{
+ chmUnitInfo ui;
+
+ if( !ResolveObject( url, &ui ) )
+ return false;
+
+ data->resize( ui.length );
+
+ if ( RetrieveObject( &ui, (unsigned char*) data->data(), 0, ui.length ) )
+ return true;
+ else
+ return false;
+}
+
+
+bool LCHMFileImpl::getFileContentAsString( QString * str, const QString & url, bool internal_encoding )
+{
+ QByteArray buf;
+
+ if ( getFileContentAsBinary( &buf, url ) )
+ {
+ unsigned int length = buf.size();
+
+ if ( length > 0 )
+ {
+ buf.resize( length + 1 );
+ buf [length] = '\0';
+
+ *str = internal_encoding ? (QString)((const char*) buf) : encodeWithCurrentCodec((const char*) buf);
+ return true;
+ }
+ }
+
+ return false;
+}
+
+
+QString LCHMFileImpl::getTopicByUrl( const QString & url ) const
+{
+ QMap< QString, QString >::const_iterator it = m_url2topics.find( url );
+
+ if ( it == m_url2topics.end() )
+ return QString::null;
+
+ return it.data();
+}
+
+
+static int chm_enumerator_callback( struct chmFile*, struct chmUnitInfo *ui, void *context )
+{
+ ((QStringList*) context)->push_back( ui->path );
+ return CHM_ENUMERATOR_CONTINUE;
+}
+
+bool LCHMFileImpl::enumerateFiles( QStringList * files )
+{
+ files->clear();
+ return chm_enumerate( m_chmFile, CHM_ENUMERATE_ALL, chm_enumerator_callback, files );
+}
+
+const QPixmap * LCHMFileImpl::getBookIconPixmap( unsigned int imagenum )
+{
+ return m_imagesKeeper.getImage( imagenum );
+}
+
+bool LCHMFileImpl::setCurrentEncoding( const LCHMTextEncoding * encoding )
+{
+ m_currentEncoding = encoding;
+ return changeFileEncoding( encoding->qtcodec );
+}
+
+
+bool LCHMFileImpl::guessTextEncoding( )
+{
+ const LCHMTextEncoding * enc = 0;
+
+ if ( !m_detectedLCID || (enc = lookupByLCID (m_detectedLCID)) == 0 )
+ qFatal ("Could not detect text encoding by LCID");
+
+ if ( changeFileEncoding (enc->qtcodec) )
+ {
+ m_currentEncoding = enc;
+ return true;
+ }
+
+ return false;
+}
+
+bool LCHMFileImpl::changeFileEncoding( const char *qtencoding )
+{
+ // Encoding could be either simple Qt codepage, or set like CP1251/KOI8, which allows to
+ // set up encodings separately for text (first) and internal files (second)
+ const char * p = strchr( qtencoding, '/' );
+ if ( p )
+ {
+ char buf[128]; // much bigger that any encoding possible. No DoS; all encodings are hardcoded.
+ strcpy( buf, qtencoding );
+ buf[p - qtencoding] = '\0';
+
+ m_textCodec = QTextCodec::codecForName( buf );
+
+ if ( !m_textCodec )
+ {
+ qWarning( "Could not set up Text Codec for encoding '%s'", buf );
+ return false;
+ }
+
+ m_textCodecForSpecialFiles = QTextCodec::codecForName( p + 1 );
+
+ if ( !m_textCodecForSpecialFiles )
+ {
+ qWarning( "Could not set up Text Codec for encoding '%s'", p + 1 );
+ return false;
+ }
+ }
+ else
+ {
+ m_textCodecForSpecialFiles = m_textCodec = QTextCodec::codecForName (qtencoding);
+
+ if ( !m_textCodec )
+ {
+ qWarning( "Could not set up Text Codec for encoding '%s'", qtencoding );
+ return false;
+ }
+ }
+
+ m_entityDecodeMap.clear();
+ return true;
+}
+
+
+void LCHMFileImpl::fillTopicsUrlMap()
+{
+ if ( !m_lookupTablesValid )
+ return;
+
+ // Read those tables
+ QByteArray topics( m_chmTOPICS.length ), urltbl( m_chmURLTBL.length ), urlstr( m_chmURLSTR.length ), strings( m_chmSTRINGS.length );
+
+ if ( !RetrieveObject( &m_chmTOPICS, (unsigned char*) topics.data(), 0, m_chmTOPICS.length )
+ || !RetrieveObject( &m_chmURLTBL, (unsigned char*) urltbl.data(), 0, m_chmURLTBL.length )
+ || !RetrieveObject( &m_chmURLSTR, (unsigned char*) urlstr.data(), 0, m_chmURLSTR.length )
+ || !RetrieveObject( &m_chmSTRINGS, (unsigned char*) strings.data(), 0, m_chmSTRINGS.length ) )
+ return;
+
+ for ( unsigned int i = 0; i < m_chmTOPICS.length; i += TOPICS_ENTRY_LEN )
+ {
+ u_int32_t off_title = get_int32_le( (u_int32_t *)(topics.data() + i + 4) );
+ u_int32_t off_url = get_int32_le( (u_int32_t *)(topics.data() + i + 8) );
+ off_url = get_int32_le( (u_int32_t *)( urltbl.data() + off_url + 8) ) + 8;
+
+ QString url = LCHMUrlFactory::makeURLabsoluteIfNeeded( (const char*) urlstr.data() + off_url );
+
+ if ( off_title < strings.size() )
+ m_url2topics[url] = encodeWithCurrentCodec ( (const char*) strings.data() + off_title );
+ else
+ m_url2topics[url] = "Untitled";
+ }
+}
+
+
+bool LCHMFileImpl::getFileSize(unsigned int * size, const QString & url)
+{
+ chmUnitInfo ui;
+
+ if( !ResolveObject( url, &ui ) )
+ return false;
+
+ *size = ui.length;
+ return true;
+}
diff --git a/lib/libchmfile/libchmfileimpl.h b/lib/libchmfile/libchmfileimpl.h
new file mode 100644
index 0000000..b609b16
--- /dev/null
+++ b/lib/libchmfile/libchmfileimpl.h
@@ -0,0 +1,286 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Portions Copyright (C) 2003 Razvan Cojocaru <razvanco@gmx.net> *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "chm_lib.h"
+
+#include "libchmfile.h"
+#include "libchmtocimage.h"
+
+#include <sys/types.h> /* for u_int{32,64}_t */
+
+//! Keeps the intermediate search result
+class LCHMSearchProgressResult
+{
+ public:
+ inline LCHMSearchProgressResult() {}
+ inline LCHMSearchProgressResult( u_int32_t t, u_int32_t u ) : titleoff(t),urloff(u) {}
+
+ QValueVector<u_int64_t> offsets;
+ u_int32_t titleoff;
+ u_int32_t urloff;
+};
+
+//! An array to keeps the intermediate search results
+typedef QT34VECTOR<LCHMSearchProgressResult> LCHMSearchProgressResults;
+
+
+//! CHM files processor; the implementation
+class LCHMFileImpl
+{
+ public:
+ LCHMFileImpl();
+ ~LCHMFileImpl();
+
+ // Implementations for LCHMFile members
+ bool loadFile( const QString& archiveName );
+ void closeAll();
+
+ QString title() const { return encodeWithCurrentCodec( m_title ); }
+ QString homeUrl() const { return encodeWithCurrentCodec( m_home ); }
+
+ bool getFileContentAsString( QString * str, const QString& url, bool internal_encoding = false );
+ bool getFileContentAsBinary( QByteArray * data, const QString& url ) const;
+ bool getFileSize( unsigned int * size, const QString& url );
+
+ bool enumerateFiles( QStringList * files );
+ QString getTopicByUrl ( const QString& url ) const;
+
+ const QPixmap * getBookIconPixmap( unsigned int imagenum );
+
+ bool setCurrentEncoding( const LCHMTextEncoding * encoding );
+
+ //! Parse the HHC or HHS file, and fill the context (asIndex is false) or index (asIndex is true) array.
+ bool parseFileAndFillArray (const QString& file, QT34VECTOR< LCHMParsedEntry > * data, bool asIndex );
+
+ /*!
+ * \brief Fast search using the $FIftiMain file in the .chm.
+ * \param text The text we're looking for.
+ * \param wholeWords Are we looking for whole words only?
+ * \param titlesOnly Are we looking for titles only?
+ * \param results A string-string hashmap that will hold
+ * the results in case of successful search. The keys are
+ * the URLs and the values are the page titles.
+ * \param phrase_search Indicates that word offset information should be kept.
+ * \return true if the search found something, false otherwise.
+ */
+ bool searchWord( const QString& word,
+ bool wholeWords,
+ bool titlesOnly,
+ LCHMSearchProgressResults& results,
+ bool phrase_search );
+
+ /*!
+ * \brief Finalize the search, resolve the matches, the and generate the results array.
+ * \param tempres Temporary search results from SearchWord.
+ * \param results A string-string hashmap that will hold the results in case of successful search.
+ * The keys are the URLs and the values are the page titles.
+ */
+ void getSearchResults( const LCHMSearchProgressResults& tempres,
+ QStringList * results,
+ unsigned int limit_results = 500 );
+
+ //! Looks up fileName in the archive.
+ bool ResolveObject( const QString& fileName, chmUnitInfo *ui ) const;
+
+ //! Retrieves an uncompressed chunk of a file in the .chm.
+ size_t RetrieveObject(const chmUnitInfo *ui, unsigned char *buffer, LONGUINT64 fileOffset, LONGINT64 bufferSize) const;
+
+ //! Encode the string with the currently selected text codec, if possible. Or return as-is, if not.
+ inline QString encodeWithCurrentCodec (const QString& str) const
+ {
+ return (m_textCodec ? m_textCodec->toUnicode (str) : str);
+ }
+
+ //! Encode the string with the currently selected text codec, if possible. Or return as-is, if not.
+ inline QString encodeWithCurrentCodec (const char * str) const
+ {
+ return (m_textCodec ? m_textCodec->toUnicode (str) : (QString) str);
+ }
+
+ //! Encode the string from internal files with the currently selected text codec, if possible.
+ //! Or return as-is, if not.
+ inline QString encodeInternalWithCurrentCodec (const QString& str) const
+ {
+ return (m_textCodecForSpecialFiles ? m_textCodecForSpecialFiles->toUnicode (str) : str);
+ }
+
+ //! Encode the string from internal files with the currently selected text codec, if possible.
+ //! Or return as-is, if not.
+ inline QString encodeInternalWithCurrentCodec (const char * str) const
+ {
+ return (m_textCodecForSpecialFiles ? m_textCodecForSpecialFiles->toUnicode (str) : (QString) str);
+ }
+
+ //! Helper. Translates from Win32 encodings to generic wxWidgets ones.
+ const char * GetFontEncFromCharSet (const QString& font) const;
+
+ //! Helper. Returns the $FIftiMain offset of leaf node or 0.
+ u_int32_t GetLeafNodeOffset(const QString& text,
+ u_int32_t initalOffset,
+ u_int32_t buffSize,
+ u_int16_t treeDepth );
+
+ //! Helper. Processes the word location code entries while searching.
+ bool ProcessWLC(u_int64_t wlc_count,
+ u_int64_t wlc_size,
+ u_int32_t wlc_offset,
+ unsigned char ds,
+ unsigned char dr,
+ unsigned char cs,
+ unsigned char cr,
+ unsigned char ls,
+ unsigned char lr,
+ LCHMSearchProgressResults& results,
+ bool phrase_search );
+
+ //! Looks up as much information as possible from #WINDOWS/#STRINGS.
+ bool getInfoFromWindows();
+
+ //! Looks up as much information as possible from #SYSTEM.
+ bool getInfoFromSystem();
+
+ //! Fill the topic-url map
+ void fillTopicsUrlMap();
+
+ //! Sets up textCodec
+ void setupTextCodec (const char * name);
+
+ //! Guess used text encoding, using m_detectedLCID and m_font. Set up m_textCodec
+ bool guessTextEncoding ();
+
+ //! Change the current CHM encoding for internal files and texts.
+ //! Encoding could be either simple Qt codepage, or set like CP1251/KOI8, which allows to
+ //! set up encodings separately for text (first) and internal files (second)
+ bool changeFileEncoding( const char *qtencoding );
+
+ //! Convert the word, so it has an appropriate encoding
+ QCString convertSearchWord ( const QString &src );
+
+ /*!
+ * Helper procedure in TOC parsing, decodes the string between the quotes (first or last) with decoding HTML
+ * entities like &iacute;
+ */
+ int findStringInQuotes (const QString& tag, int offset, QString& value, bool firstquote, bool decodeentities );
+
+ /*!
+ * Decodes Unicode HTML entities according to current encoding.
+ */
+ QString decodeEntity (const QString& entity );
+
+ /*!
+ * \brief Returns the list of all available text encodings.
+ * \return A pointer to the beginning of the text encoding table. The table could be
+ * enumerated until language == 0, which means end of table.
+ *
+ * \ingroup encoding
+ */
+ static const LCHMTextEncoding * getTextEncodingTable();
+
+ /*!
+ * \brief Looks up for encoding by LCID
+ * \param lcid LCID to look up
+ * \return A pointer to encoding structure.
+ *
+ * \ingroup encoding
+ */
+ static const LCHMTextEncoding * lookupByLCID( short lcid );
+
+ /*!
+ * \brief Get the encoding index
+ * \param enc Encoding
+ * \return An index in encoding table. getTextEncodingTable() + i gets the encoding.
+ *
+ * \ingroup encoding
+ */
+ static int getEncodingIndex( const LCHMTextEncoding * enc);
+
+ /*!
+ * Normalizes path to search in internal arrays
+ */
+ QString normalizeUrl (const QString& path ) const;
+
+
+ // Members
+
+ //! Pointer to the chmlib structure
+ chmFile * m_chmFile;
+
+ //! Opened file name
+ QString m_filename;
+
+ //! Home url, got from CHM file
+ QString m_home;
+
+ //! Context tree filename. Got from CHM file
+ QString m_topicsFile;
+
+ //! Index filename. Got from CHM file
+ QString m_indexFile;
+
+ //! Chm Title. Got from CHM file
+ QString m_title;
+
+ // Localization stuff
+ //! LCID from CHM file, used in encoding detection
+ short m_detectedLCID;
+
+ //! font charset from CHM file, used in encoding detection
+ QString m_font;
+
+ //! Chosen text codec
+ QTextCodec * m_textCodec;
+ QTextCodec * m_textCodecForSpecialFiles;
+
+ //! Current encoding
+ const LCHMTextEncoding * m_currentEncoding;
+
+ //! Map to decode HTML entitles like &acute; based on current encoding
+ QMap<QString, QString> m_entityDecodeMap;
+
+ //! TRUE if /#TOPICS, /#STRINGS, /#URLTBL and /#URLSTR are resolved, and the members below are valid
+ bool m_lookupTablesValid;
+
+ //! pointer to /#TOPICS
+ chmUnitInfo m_chmTOPICS;
+
+ //! pointer to /#STRINGS
+ chmUnitInfo m_chmSTRINGS;
+
+ //! pointer to /#URLTBL
+ chmUnitInfo m_chmURLTBL;
+
+ //! pointer to /#URLSTR
+ chmUnitInfo m_chmURLSTR;
+
+ //! Indicates whether the built-in search is available. This is true only when m_lookupTablesValid
+ //! is TRUE, and m_chmFIftiMain is resolved.
+ bool m_searchAvailable;
+
+ //! pointer to /$FIftiMain
+ chmUnitInfo m_chmFIftiMain;
+
+ //! Book TOC icon images storage
+ LCHMTocImageKeeper m_imagesKeeper;
+
+ //! Map url->topic
+ QMap< QString, QString > m_url2topics;
+};
diff --git a/lib/libchmfile/libchmtextencoding.cpp b/lib/libchmfile/libchmtextencoding.cpp
new file mode 100644
index 0000000..9ba35ee
--- /dev/null
+++ b/lib/libchmfile/libchmtextencoding.cpp
@@ -0,0 +1,197 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "libchmfileimpl.h"
+#include "libchmtextencoding.h"
+
+static const LCHMTextEncoding text_encoding_table [] =
+{
+ { "Afrikaans",0, 0x0436, 1252, 0, "CP1252" },
+ { "Albanian", 0, 0x041C, 1250, 238, "CP1250" },
+ { "Arabic", "Algeria", 0x1401, 1256, 0, "CP1256" },
+ { "Arabic", "Bahrain", 0x3C01, 1256, 0, "CP1256" },
+ { "Arabic", "Egypt", 0x0C01, 1256, 0, "CP1256" },
+ { "Arabic", "Iraq", 0x0801, 1256, 0, "CP1256" },
+ { "Arabic", "Jordan", 0x2C01, 1256, 0, "CP1256" },
+ { "Arabic", "Kuwait", 0x3401, 1256, 0, "CP1256" },
+ { "Arabic", "Lebanon", 0x3001, 1256, 0, "CP1256" },
+ { "Arabic", "Libya", 0x1001, 1256, 0, "CP1256" },
+ { "Arabic", "Morocco", 0x1801, 1256, 0, "CP1256" },
+ { "Arabic", "Oman", 0x2001, 1256, 0, "CP1256" },
+ { "Arabic", "Qatar", 0x4001, 1256, 0, "CP1256" },
+ { "Arabic", "Saudi Arabia", 0x0401, 1256, 0, "CP1256" },
+ { "Arabic", "Syria", 0x2801, 1256, 0, "CP1256" },
+ { "Arabic", "Tunisia", 0x1C01, 1256, 0, "CP1256" },
+ { "Arabic", "United Arab Emirates", 0x3801, 1256, 178, "CP1256" },
+ { "Arabic", "Yemen", 0x2401, 1256, 0, "CP1256" },
+ { "Armenian", 0, 0x042B, 0, 0, "Latin1" },
+ { "Azeri", "Cyrillic", 0x082C, 1251, 0, "CP1251" },
+ { "Azeri", "Latin", 0x042C, 1254, 162, "CP1254" },
+ { "Basque", 0, 0x042D, 1252, 0, "CP1252" },
+ { "Belarusian", 0, 0x0423, 1251, 0, "CP1251" },
+ { "Bulgarian", 0, 0x0402, 1251, 0, "CP1251" },
+ { "Catalan", 0, 0x0403, 1252, 0, "CP1252" },
+ { "Chinese", "China", 0x0804, 936, 134, "GBK" },
+ { "Chinese", "Hong Kong SAR", 0x0C04, 950, 136, "Big5" },
+ { "Chinese", "Macau SAR", 0x1404, 950, 136, "Big5" },
+ { "Chinese", "Singapore", 0x1004, 936, 134, "GB2313" },
+ { "Chinese", "Taiwan", 0x0404, 950, 136, "Big5" }, // traditional
+ { "Chinese", "Taiwan - Big5-HKSCS", 0x0404, 950, 136, "Big5-HKSCS" },
+ { "Chinese", "Taiwan - GB18030", 0x0404, 950, 136, "GB18030" },
+ { "Croatian", 0, 0x041A, 1250, 238, "CP1250" },
+ { "Czech", 0, 0x0405, 1250, 238, "CP1250" },
+ { "Danish", 0, 0x0406, 1252, 0, "CP1252" },
+ { "Dutch", "Belgium", 0x0813, 1252, 0, "CP1252" },
+ { "Dutch", "The Netherlands", 0x0413, 1252, 0, "CP1252" },
+ { "English", "Australia", 0x0C09, 1252, 0, "CP1252" },
+ { "English", "Belize", 0x2809, 1252, 0, "CP1252" },
+ { "English", "Canada", 0x1009, 1252, 0, "CP1252" },
+ { "English", "Caribbean", 0x2409, 1252, 0, "CP1252" },
+ { "English", "Ireland", 0x1809, 1252, 0, "CP1252" },
+ { "English", "Jamaica", 0x2009, 1252, 0, "CP1252" },
+ { "English", "New Zealand", 0x1409, 1252, 0, "CP1252" },
+ { "English", "Phillippines", 0x3409, 1252, 0, "CP1252" },
+ { "English", "South Africa", 0x1C09, 1252, 0, "CP1252" },
+ { "English", "Trinidad", 0x2C09, 1252, 0, "CP1252" },
+ { "English", "United Kingdom", 0x0809, 1252, 0, "CP1252" },
+ { "English", "United States", 0x0409, 1252, 0, "CP1252" },
+ { "Estonian", 0, 0x0425, 1257, 186, "CP1257" },
+ { "FYRO Macedonian", 0, 0x042F, 1251, 0, "CP1251" },
+ { "Faroese", 0, 0x0438, 1252, 0, "CP1252" },
+ { "Farsi", 0, 0x0429, 1256, 178, "CP1256" },
+ { "Finnish", 0, 0x040B, 1252, 0, "CP1252" },
+ { "French", "Belgium", 0x080C, 1252, 0, "CP1252" },
+ { "French", "Canada", 0x0C0C, 1252, 0, "CP1252" },
+ { "French", "France", 0x040C, 1252, 0, "CP1252" },
+ { "French", "Luxembourg", 0x140C, 1252, 0, "CP1252" },
+ { "French", "Switzerland", 0x100C, 1252, 0, "CP1252" },
+ { "German", "Austria", 0x0C07, 1252, 0, "CP1252" },
+ { "German", "Germany", 0x0407, 1252, 0, "CP1252" },
+ { "German", "Liechtenstein", 0x1407, 1252, 0, "CP1252" },
+ { "German", "Luxembourg", 0x1007, 1252, 0, "CP1252" },
+ { "German", "Switzerland", 0x0807, 1252, 0, "CP1252" },
+ { "Greek", 0, 0x0408, 1253, 161, "CP1253" },
+ { "Hebrew", 0, 0x040D, 1255, 177, "CP1255" },
+ { "Hindi", 0, 0x0439, 0, 0, "Latin1" },
+ { "Hungarian", 0, 0x040E, 1250, 238, "CP1250" },
+ { "Icelandic", 0, 0x040F, 1252, 0, "CP1252" },
+ { "Indonesian", 0, 0x0421, 1252, 0, "CP1252" },
+ { "Italian", "Italy", 0x0410, 1252, 0, "CP1252" },
+ { "Italian", "Switzerland", 0x0810, 1252, 0, "CP1252" },
+ { "Japanese", "Shift-JIS", 0x0411, 932, 128, "Shift-JIS" },
+ { "Japanese", "JIS7", 0x0411, 932, 128, "JIS7" },
+ { "Japanese", "eucJP", 0x0411, 932, 128, "eucJP" },
+ { "Korean", 0, 0x0412, 949, 129, "eucKR" },
+ { "Latvian", 0, 0x0426, 1257, 186, "CP1257" },
+ { "Lithuanian", 0, 0x0427, 1257, 186, "CP1257" },
+ { "Malay", "Brunei", 0x083E, 1252, 0, "CP1252" },
+ { "Malay", "Malaysia", 0x043E, 1252, 0, "CP1252" },
+ { "Maltese", 0, 0x043A, 0, 0, "Latin1" },
+ { "Marathi", 0, 0x044E, 0, 0, "Latin1" },
+ { "Norwegian", "Bokmal", 0x0414, 1252, 0, "CP1252" },
+ { "Norwegian", "Nynorsk", 0x0814, 1252, 0, "CP1252" },
+ { "Polish", 0, 0x0415, 1250, 238, "CP1250" },
+ { "Portuguese", "Brazil", 0x0416, 1252, 0, "CP1252" },
+ { "Portuguese", "Portugal", 0x0816, 1252, 0, "CP1252" },
+ { "Romanian", "Romania", 0x0418, 1250, 238, "CP1250" },
+ { "Russian", "Cyrillic", 0x0419, 1251, 204, "CP1251" },
+ { "Russian", "KOI-8", 0x7001, 2251, 204, "KOI8-R" },
+ { "Russian", "KOI-8 (TOC 1251)", 0x7002, 3251, 0, "CP1251/KOI8-R" },
+ { "Russian", "Cyrillic (TOC KOI8)", 0x7003, 3251, 0, "KOI8-R/CP1251" },
+ { "Sanskrit", 0, 0x044F, 0, 0, "Latin1" },
+ { "Serbian", "Cyrillic", 0x0C1A, 1251, 0, "CP1251" },
+ { "Serbian", "Latin", 0x081A, 1250, 238, "CP1250" },
+ { "Setsuana", 0, 0x0432, 1252, 0, "CP1252" },
+ { "Slovak", 0, 0x041B, 1250, 238, "CP1250" },
+ { "Slovenian", 0, 0x0424, 1250, 238, "CP1250" },
+ { "Spanish", "Argentina", 0x2C0A, 1252, 0, "CP1252" },
+ { "Spanish", "Bolivia", 0x400A, 1252, 0, "CP1252" },
+ { "Spanish", "Chile", 0x340A, 1252, 0, "CP1252" },
+ { "Spanish", "Colombia", 0x240A, 1252, 0, "CP1252" },
+ { "Spanish", "Costa Rica", 0x140A, 1252, 0, "CP1252" },
+ { "Spanish", "Dominican Republic", 0x1C0A, 1252, 0, "CP1252" },
+ { "Spanish", "Ecuador", 0x300A, 1252, 0, "CP1252" },
+ { "Spanish", "El Salvador", 0x440A, 1252, 0, "CP1252" },
+ { "Spanish", "Guatemala", 0x100A, 1252, 0, "CP1252" },
+ { "Spanish", "Honduras", 0x480A, 1252, 0, "CP1252" },
+ { "Spanish", "Mexico", 0x080A, 1252, 0, "CP1252" },
+ { "Spanish", "Nicaragua", 0x4C0A, 1252, 0, "CP1252" },
+ { "Spanish", "Panama", 0x180A, 1252, 0, "CP1252" },
+ { "Spanish", "Paraguay", 0x3C0A, 1252, 0, "CP1252" },
+ { "Spanish", "Peru", 0x280A, 1252, 0, "CP1252" },
+ { "Spanish", "Puerto Rico", 0x500A, 1252, 0, "CP1252" },
+ { "Spanish", "Spain", 0x0C0A, 1252, 0, "CP1252" },
+ { "Spanish", "Uruguay", 0x380A, 1252, 0, "CP1252" },
+ { "Spanish", "Venezuela", 0x200A, 1252, 0, "CP1252" },
+ { "Swahili", 0, 0x0441, 1252, 0, "CP1252" },
+ { "Swedish", "Finland", 0x081D, 1252, 0, "CP1252" },
+ { "Swedish", "Sweden", 0x041D, 1252, 0, "CP1252" },
+ { "Tamil", 0, 0x0449, 0, 0, "TSCII" },
+ { "Tatar", 0, 0x0444, 1251, 204, "CP1251" },
+ { "Thai", 0, 0x041E, 874, 222, "TIS-620" },
+ { "Turkish", 0, 0x041F, 1254, 162, "CP1254" },
+ { "Ukrainian", "Cyrillic", 0x0422, 1251, 0, "CP1251" },
+ { "Ukrainian", "KOI-8", 0x8422, 2251, 204, "KOI8-U" },
+ { "Unicode", "UTF-8", 0x7010, 0, 0, "UTF-8" },
+ { "Unicode", "UTF-16", 0x7011, 0, 0, "UTF-16" },
+ { "Urdu", 0, 0x0420, 1256, 178, "CP1256" },
+ { "Uzbek", "Cyrillic", 0x0843, 1251, 0, "CP1251" },
+ { "Uzbek", "Latin", 0x0443, 1254, 162, "CP1254" },
+ { "Vietnamese", 0, 0x042A, 1258, 163, "CP1258" },
+ { "Xhosa", 0, 0x0434, 1252, 0, "CP1252" },
+ { "Zulu", 0, 0x0435, 1252, 0, "CP1252" },
+ { 0, 0, 0, 0, 0, 0 }
+};
+
+
+const LCHMTextEncoding * LCHMFileImpl::getTextEncodingTable()
+{
+ return text_encoding_table;
+}
+
+const LCHMTextEncoding * LCHMFileImpl::lookupByLCID( short lcid )
+{
+ for ( const LCHMTextEncoding * t = text_encoding_table; t->language; t++ )
+ if ( t->winlcid == lcid )
+ return t;
+
+ return 0;
+}
+
+/*
+const LCHMTextEncoding * LCHMFileImpl::lookupByWinCharset( int charset )
+{
+ for ( const text_encoding_t * t = text_encoding_table; t->charset; t++ )
+ if ( t->wincharset == charset )
+ return t;
+
+ return 0;
+}
+*/
+
+int LCHMFileImpl::getEncodingIndex( const LCHMTextEncoding * enc)
+{
+ for ( int i = 0; text_encoding_table[i].language; i++ )
+ if ( (text_encoding_table + i) == enc )
+ return i;
+
+ return -1;
+}
diff --git a/lib/libchmfile/libchmtextencoding.h b/lib/libchmfile/libchmtextencoding.h
new file mode 100644
index 0000000..ff34736
--- /dev/null
+++ b/lib/libchmfile/libchmtextencoding.h
@@ -0,0 +1,40 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef LIBCHMTEXTENCODING_H
+#define LIBCHMTEXTENCODING_H
+
+
+/*!
+ * Represents a text encoding of CHM file; also has some useful routines.
+ */
+typedef struct LCHMTextEncoding
+{
+ const char * language; //! French, English, etc. language == 0 represents the end of table.
+ const char * sublanguage; //! French:Canada, French:France etc. May be 0 - no sublanguage
+ int winlcid; //! Windows LCID for this language
+ int wincodepage; //! Windows codepage for this language.
+ int wincharset; //! Windows charset.
+ const char * qtcodec; //! Qt text codec to use
+};
+
+
+#endif /* LIBCHMTEXTENCODING_H */
diff --git a/lib/libchmfile/libchmtocimage.cpp b/lib/libchmfile/libchmtocimage.cpp
new file mode 100644
index 0000000..c272b10
--- /dev/null
+++ b/lib/libchmfile/libchmtocimage.cpp
@@ -0,0 +1,2112 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "libchmfile.h"
+#include "libchmtocimage.h"
+
+typedef struct
+{
+ unsigned int size;
+ const char * data;
+} png_memory_image_t;
+
+
+static const png_memory_image_t png_image_bookarray[42] =
+{
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x80\x00\x80\x00\x00\x00\x00\x00"
+ "\x80\x00\x80\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x80"
+ "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\xFF\x00\x00\x00\x00\x80\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80\x00\x00\x00\x00\x01\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\xC0\xC0\xC0\x00\xC0\x40\xC0\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\xC0\x40\xC0\x00\x40\xC0\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80"
+ "\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x40\xC0"
+ "\x00\x40\xC0\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80\x00\x00\x00\x00\xFF\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x40\xC0\x00\x40\xC0\x40\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x40\xC0\x00\x40\xC0\x40\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80\x00\x80\x00\x80\x00"
+ "\x80\x80\x80\x00\x00\x00\x00\x01\x02\x00\x00\x00\x01\x80\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\xC0\x40\xC0\x00\x40\xC0\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80"
+ "\x00\x80\x00\x80\x00\x80\x00\x80\x80\x80\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x80\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x40\xC0\x40\x00\x40\x40\x40\x00\x00\x00\x00\x00\x80\x80\x80\x00\x40\x40\x40\x00\x3F\x3F\x3F"
+ "\x00\xC1\xC1\xC1\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\xFF\x80\x00\x80\xFF\x80\x00\x80\xFF\x80\x00\x80\xFF\x00\x00\x00\xFF\x80\x80\x80\xFF"
+ "\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x80"
+ "\x00\x80\xFF\x80\x00\x80\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x00\x00"
+ "\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x80\x00\x80\xFF\x00\x00\x00"
+ "\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x19\x71\xA3\xBE\x36\x4F\x5A\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80"
+ "\xFF\x40\x40\x40\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x80\x00\x00\x3F\xFF\x3F\x00\x00\x00\x00\x00\x80"
+ "\x80\x80\xFF\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3F\x3F\x3F\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x7F\x7F\x7F\x00\x00\x00\x00\x00\x81\x81\x81\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x40\x40\x40\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x7F\x7F\x7F\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x80\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3F\x3F\x3F\x00\x80\x80"
+ "\x80\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\xFF\xFF\xFF\x00\x80\x00\x80\x00\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00"
+ "\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x01\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x81\x81\x81\x00\x40\x40\x40"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x01\x80\x00\x80"
+ "\x00\x00\x00\x00\x00\x81\x01\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x81\x81\x81\x00\x81\x81\x81\x00\x40\x40\x40\x00\x3F\x3F\x3F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x80\x00\x80\xFF\x80\x00\x80\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\xC0\xC0\xC0\x00\x40\x40\x40\x00\x3F\x3F\x3F\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x80\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x80\x00\x80\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xEC\xAF\x46\xD5\x91\xC8\xE3\xA4\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00"
+ "\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x01\x00\x00"
+ "\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x80\x00\x80\x00\x00\x00\x00\x00"
+ "\x80\x00\x80\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x80\x00\x80\xFF\x00\x00\x00\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x01\x01\x00\x00\x00\x00\x00\x81\x00\x80"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80\x00\x00\x00\x00\x01\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x80\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x02\x01"
+ "\x00\x00\x00\x81\x00\x80\x00\xC1\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00"
+ "\x80\x00\x00\x00\x00\x00\x7F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80"
+ "\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x3F\x40\x40"
+ "\x00\x00\x00\x00\x00\x81\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x80\x00\x81\x00\x80\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80\x00\x00\x00\x00\xFF\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x80\x00\x40\xC0\x40\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x81\x00\x80\x00\x00\x00\x00\x00\xC0\x40\xC0\x00\xC1\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80\x00\x80\x00\x80\x00"
+ "\x80\x80\x80\x00\x00\x00\x00\x01\x02\x00\x00\x00\x01\x80\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\xC0\x40\xC0\x00\x40\xC0\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80"
+ "\x00\x80\x00\x80\x00\x80\x00\x80\x80\x80\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x80\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x40\xC0\x40\x00\x40\x40\x40\x00\x00\x00\x00\x00\x80\x80\x80\x00\x40\x40\x40\x00\x3F\x3F\x3F"
+ "\x00\xC1\xC1\xC1\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\xFF\x80\x00\x80\xFF\x80\x00\x80\xFF\x80\x00\x80\xFF\x00\x00\x00\xFF\x80\x80\x80\xFF"
+ "\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x80"
+ "\x00\x80\xFF\x80\x00\x80\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x00\x00"
+ "\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x80\x00\x80\xFF\x00\x00\x00"
+ "\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0B\x78\x8F\xD2\x1A\xFF\x32\x3B\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00"
+ "\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x80\x80\x80"
+ "\xFF\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x01\x80\x80\x80\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF"
+ "\xFF\x80\x80\x80\xFF\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x04\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x7F\xFF\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x80\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x02\x01"
+ "\x00\x00\x01\x01\x00\x00\x00\x81\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\xFF\xFF\xFF\x00\x80\x00\x80\x00\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x7F\x00\x80"
+ "\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC0\xC0\x00\x00\xFF\xFF\x00"
+ "\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x81\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00"
+ "\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x01\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x81\x81\x81\x00\x40\x40\x40"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x01\x80\x00\x80"
+ "\x00\x00\x00\x00\x00\x81\x01\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x81\x81\x81\x00\x81\x81\x81\x00\x40\x40\x40\x00\x3F\x3F\x3F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x80\x00\x80\xFF\x80\x00\x80\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\xC0\xC0\xC0\x00\x40\x40\x40\x00\x3F\x3F\x3F\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x80\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x80\x00\x80\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\xB6\x69\xF8\x9A\x72\x7B\xFD\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x80\x80\x80\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00"
+ "\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x80\x80\x80\xFF\x7F\x7F\x80\x00\xC1\xC1\xC0\x00"
+ "\x3F\x3F\x40\x00\xC1\xC1\xC0\x00\x3F\x3F\x40\x00\xC1\xC1\xC0\x00\x7F\x7F\x40\x00\x00\x00\x80\xFF\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x01\x00\x00"
+ "\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\xC1\xC1\xC1\x00"
+ "\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0"
+ "\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0"
+ "\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x80\x80"
+ "\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00"
+ "\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF"
+ "\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF"
+ "\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF"
+ "\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00"
+ "\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0"
+ "\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0"
+ "\xFF\xFF\xFF\x00\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF"
+ "\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF"
+ "\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00"
+ "\x00\x00\xFF\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF"
+ "\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF"
+ "\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x01\x00\x00\x00\x00\x80\x80"
+ "\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x80\x80\x80\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7F\x7B\x78\xBB\x65\xD9\x1C\xEF\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x80\x80\x80\xFF\x7F\x7F\x7F\x00\x00\x00\x01\x00"
+ "\xC1\xC1\xC0\x00\x3F\x3F\x40\x00\xC1\xC1\xC0\x00\x3F\x3F\x40\x00\x7F\x7F\xFF\x00\x00\x00\x00\xFF\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x01\x00\x00"
+ "\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF"
+ "\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x3F\x3F\x40\x00\xC1\xC1\xC0\x00\x3F\x3F\x40\x00\xC1\xC1\xC0\x00\x3F\x3F\x40\x00\xC1\xC1\xC1\x00"
+ "\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\x7F\x80\x00\x81\x81\x80\x00\x80\x80\x80\x00\x04\x00\x00\x00\x00\x7F\x7F"
+ "\x7F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x81\x81\x00\x00\x00\x00\x00\xC1\xC1\xC0\x00"
+ "\x00\x00\xC0\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xC1\xC1\xC1\x00"
+ "\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00"
+ "\x00\x01\x00\x7F\x7F\x80\x00\x80\x80\x80\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0"
+ "\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0"
+ "\xFF\x00\x00\x00\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF"
+ "\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF"
+ "\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\x00\x00\x00\xFF\x80\x80\x80\xFF\x00"
+ "\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\xFF"
+ "\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF"
+ "\x00\xFF\xFF\xFF\x00\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x80\x80\x80\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xCA\x77\x06\x21\xB0\x9C\x3D\x2E\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00"
+ "\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x01\x00\x00"
+ "\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00"
+ "\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x81\x81\x80\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x01\x00\x00"
+ "\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01"
+ "\x00\x00\x00\x00\x00\xC1\xC0\xC0\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\xFF\x00\x00\xC1\xC0\xC0\x00"
+ "\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\x00\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0"
+ "\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x80\x80"
+ "\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00"
+ "\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF"
+ "\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF"
+ "\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF"
+ "\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00"
+ "\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0"
+ "\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0"
+ "\xFF\xFF\xFF\x00\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF"
+ "\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF"
+ "\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00"
+ "\x00\x00\xFF\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF"
+ "\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF"
+ "\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x01\x00\x00\x00\x00\x80\x80"
+ "\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x80\x80\x80\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x79\x5A\x0A\xDD\xD6\x45\x4D\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00"
+ "\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x01\x00\x00"
+ "\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
+ "\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x04\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x7F\xFF\xFF\x00\x00\x00\x00\xFF\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x01\x00\xFF"
+ "\xFF\xFF\xFF\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF"
+ "\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01"
+ "\x00\x00\x00\x00\x00\xC1\xC0\xC0\x00\x00\x00\x00\x00\xC1\xC1\xC0\x00\x00\xFF\x00\x00\xC1\xC0\xC0\x00"
+ "\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x81\x81\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x80\x80\x00\x00\xC0\xC0\x00\x3F"
+ "\x00\x00\x00\xC0\xC0\xC0\x00\xC0\xC0\x80\x00\x00\x00\xC0\x00\xC0\xC0\x80\x00\x00\x00\xC0\x00\xC0\xC0"
+ "\x80\x00\x00\x00\xC0\x00\x3F\x3F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x80\x80\x80\xFF\xC0\xC0\xC0\xFF"
+ "\x80\x80\x80\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xC1\xC1\xC1\x00"
+ "\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\xC1\xC1\xC1\x00\x00"
+ "\x00\x01\x00\x7F\x7F\x80\x00\x80\x80\x80\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0"
+ "\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0"
+ "\xFF\x00\x00\x00\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF"
+ "\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF"
+ "\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\x00\x00\x00\xFF\x80\x80\x80\xFF\x00"
+ "\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\xFF"
+ "\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF"
+ "\x00\xFF\xFF\xFF\x00\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x80\x80\x80\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x33\x28\x09\x1C\xAE\x31\x32\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\x80\x80\x80\xFF\x80\x80\x80\xFF\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\xFF\x00\x00\x00\xFF\x00\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x01\xFF\x00\x01\x01\x00\x00\x00\x00\x01\x00\xFF\xFF\xFF\x00"
+ "\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x01\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\xFF"
+ "\xFF\x01\x00\x00\x00\x00\x00\x01\x01\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01\x01\xFF\x00\x00\x00"
+ "\x00\x00\xFF\xFF\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x01\x01\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF\x00\x00\xFF"
+ "\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x01\x01\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\xFF\xFF\x00\x00\xFF\xFF\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE8\x04\x5D\xFD\xA0\x80\xC9\x63\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x01\x00\x00\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\x01\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x81\x81\x80\x00\x00\x00\x00\x00\x80"
+ "\x80\x80\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\xFF\xFF\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\xFF\x00"
+ "\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x01\x01\x00\x01\x01\x00\x00\x01\x01\xFF\x00\x01\x01\x00\x00\x00\x00\x01\x00\xFF\xFF\xFF\x00"
+ "\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\x00\x00\x00\x00\x00\xFF\x00\x01\x00\xFF"
+ "\xFF\x01\x00\x00\x00\x00\x00\x01\x01\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x01\x00\xFF\x00\x00\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01\x01\xFF\x00\x00\x00"
+ "\x00\x00\xFF\xFF\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x01\x01\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF\x00\x00\xFF"
+ "\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x01\x01\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\xFF\xFF\x00\x00\xFF\xFF\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x73\x22\x4F\x1D\x9B\xFC\x6D\x6C\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01"
+ "\x01\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x01\x00\x00\x01\x01\x00\x00"
+ "\x01\x01\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\xFF\x00\xFF\xFF\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x01\x01\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x01\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF"
+ "\xFF\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x01\x01\xFF\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1"
+ "\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE3\xD9\x62\x47\xFA\x28\x6C\x06\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x01\x00\x00\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00"
+ "\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF"
+ "\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x00\xFF\x00"
+ "\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\x00\x00\x00\x00\x00\x00\x01\x01\x00\x01"
+ "\x01\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00"
+ "\x00\x00\xFF\xFF\x00\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00"
+ "\x01\x01\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\xFF\xFF\x00\xFF\xFF\x01\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x01\x01\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x01\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF"
+ "\xFF\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x01\x01\xFF\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1"
+ "\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2D\x7C\x8C\x20\x93\x9B\xCB\xA7\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\xC0\xC0\xC0\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x40\x40\x40\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\xC0"
+ "\xC0\xC0\x00\x00\x00\x00\x00\x40\x40\x40\x00\x40\x40\x3F\x00\x00\x80\x81\x00\x00\x00\x00\x00\x00\x80"
+ "\x7F\x00\x00\x00\x00\x00\xC0\xC0\xC1\x00\x40\x40\x40\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF"
+ "\xFF\x00\x80\x00\xFF\x00\x00\xFF\xFF\x00\x80\x00\xFF\x00\x80\x00\xFF\x00\x00\xFF\xFF\x00\x00\x80\xFF"
+ "\xC0\xC0\xC0\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF"
+ "\x7F\x7F\x7F\x00\xC1\xC1\xC1\x00\x40\xC0\xC0\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x01\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\xC0\xC0\xC0\x00\x40\x40\x40\x00\x3F\x3F\x3F\x00\x01\x81"
+ "\x01\x00\x80\x00\x80\x00\x7F\x7F\x7F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xC1\xC1\xC0"
+ "\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x40\x40\x40\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0"
+ "\x00\x40\x40\x40\x00\x3F\x3F\x3F\x00\xC1\xC1\xC1\x00\x00\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x00\x00\x00\x00\xC0"
+ "\xC0\xC0\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xC0\xC0\x00\xC0\x00\x00\x00\x40"
+ "\x40\x3F\x00\xC0\xC0\xC1\x00\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x01\x01\x00\x00\x00\x00"
+ "\x00\x00\xC0\xC0\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\xC0\x40\x40\x00\x40\x40\x3F\x00\x00\x00\x00\x00\x40\xC0\xC0\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x01\x00\x3F\x3F\x3F\x00\xFF\xFF\xFF\x00"
+ "\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xC0\x40\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x7F\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x01"
+ "\x01\x00\x00\x01\x01\xFF\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x80\xFF\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40"
+ "\x01\x00\x00\x81\x00\x00\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x01\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\x40\x00\x00\x00\x81\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x40\x40\xC0\x00\x00\x00\x00\x00\x80\x80\x00"
+ "\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00"
+ "\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x32\x9B\x2E\x2D\x01\x77\x57\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00"
+ "\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x01\x00\x00"
+ "\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC0\xC0\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x40\x40\x40\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x80\x80\xFF\x00\x80\x80\xFF\x00\x00"
+ "\xFF\xFF\x00\x00\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF"
+ "\xFF\x00\x80\x00\xFF\x00\x00\xFF\xFF\x00\x80\x00\xFF\x00\x80\x00\xFF\x00\x00\xFF\xFF\x00\x00\x80\xFF"
+ "\xC0\xC0\xC0\xFF\x00\x00\x00\x00\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x01\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x3F\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x80"
+ "\x00\x00\xFF\x80\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\xC1\xC1\xC0"
+ "\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x40\x40\x40\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x3F\x40\x40"
+ "\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x80\xFF\x00\x81\x80\x80\x00\x00\xFF\xFF\x00"
+ "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x00\x00\x00\x00\xC0"
+ "\xC0\xC0\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x80\x80\x00\xC0\xC1\xC1\x00\x3F"
+ "\x00\x00\x00\xC0\xC0\xC1\x00\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x01\x01\x00\x00\x00\x00"
+ "\x00\x00\xC0\xC0\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x81\x80\x80\x00\xC0\x40\x40\x00\x40\x40\x3F\x00\x01\x00\xFF\x00\x40\xC0\xC0\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\x3F\x3F\x3F\x00\xFF\xFF\xFF\x00"
+ "\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xC0\x40\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x7F\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x01"
+ "\x01\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x80\xFF\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40"
+ "\x01\x00\x00\x81\x00\x00\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x01\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\x40\x00\x00\x00\x81\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x40\x40\xC0\x00\x00\x00\x00\x00\x80\x80\x00"
+ "\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00"
+ "\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x2B\xAD\x4B\x8B\x6D\x23\xB6\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\xC0\xC0\xC0\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x40\x40\x40\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\xC0"
+ "\xC0\xC0\x00\x00\x00\x00\x00\x40\x40\x40\x00\x40\x40\x3F\x00\x00\x80\x81\x00\x00\x00\x00\x00\x00\x80"
+ "\x7F\x00\x00\x00\x00\x00\xC0\xC0\xC1\x00\x40\x40\x40\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF"
+ "\xFF\x00\x80\x00\xFF\x00\x00\xFF\xFF\x00\x80\x00\xFF\x00\x80\x00\xFF\x00\x00\xFF\xFF\x00\x00\x80\xFF"
+ "\xC0\xC0\xC0\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF"
+ "\x7F\x7F\x7F\x00\xC1\xC1\xC1\x00\x40\xC0\xC0\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x01\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\xC0\xC0\xC0\x00\x40\x40\x40\x00\x3F\x3F\x3F\x00\x01\x81"
+ "\x01\x00\x80\x00\x80\x00\x7F\x7F\x7F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xC1\xC1\xC0"
+ "\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x40\x40\x40\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0"
+ "\x00\x40\x40\x40\x00\x3F\x3F\x3F\x00\xC1\xC1\xC1\x00\x00\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x00\x00\x00\x00\xC0"
+ "\xC0\xC0\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xC0\xC0\x00\xC0\x00\x00\x00\x40"
+ "\x40\x3F\x00\xC0\xC0\xC1\x00\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x81\x81\x00\x00\x00"
+ "\x00\x00\xC0\x40\x40\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\xC0\x40\x40\x00\x40\x40\x3F\x00\x00\x00\x00\x00\x40\xC0\xC0\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x81\x80\x00\xFF\x7F\x7F\x00\x80\x00\x00\x00\x40\x40\xC0\x00\xC0\xC0\xC0\x00"
+ "\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xC0\x40\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x7F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81"
+ "\x81\x81\x00\x80\x00\x80\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x80\xFF\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x7F\x00\x00\x80\xFF\x00\x00\x00\x00"
+ "\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x80\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x80\x80\x80\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\x00\xFF\x00\x00\x80\xFF\x00\x00\x80\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\x40\x00\x40\x40\x81\x00\x00"
+ "\x00\x7F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x7F\x00\x00\x00"
+ "\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x40\x40\xC0\x00\x00\x00\x00\x00\x80\x80\x00"
+ "\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00"
+ "\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF5\x35\xB3\xDB\x47\x22\xC5\x3E\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\xFF\xFF\x00\x00\x01\x01\x00\x00\x00"
+ "\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x01\x00\x00"
+ "\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC0\xC0\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x40\x40\x40\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x80\x80\xFF\x00\x80\x80\xFF\x00\x00"
+ "\xFF\xFF\x00\x00\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF"
+ "\xFF\x00\x80\x00\xFF\x00\x00\xFF\xFF\x00\x80\x00\xFF\x00\x80\x00\xFF\x00\x00\xFF\xFF\x00\x00\x80\xFF"
+ "\xC0\xC0\xC0\xFF\x00\x00\x00\x00\x01\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x01\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x3F\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x80"
+ "\x00\x00\xFF\x80\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\xC1\xC1\xC0"
+ "\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x40\x40\x40\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x3F\x40\x40"
+ "\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x80\xFF\x00\x81\x80\x80\x00\x00\xFF\xFF\x00"
+ "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x00\x00\x00\x00\xC0"
+ "\xC0\xC0\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x80\x80\x00\xC0\xC1\xC1\x00\x3F"
+ "\x00\x00\x00\xC0\xC0\xC1\x00\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x81\x81\x00\x00\x00"
+ "\x00\x00\xC0\x40\x40\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x81\x80\x80\x00\xC0\x40\x40\x00\x40\x40\x3F\x00\x01\x00\xFF\x00\x40\xC0\xC0\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x81\x80\x00\xFF\x7F\x7F\x00\x80\x00\x00\x00\x40\x40\xC0\x00\xC0\xC0\xC0\x00"
+ "\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xC0\x40\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x7F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81"
+ "\x81\x81\x00\x80\x00\x80\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x80\xFF\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x7F\x00\x00\x80\xFF\x00\x00\x00\x00"
+ "\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x80\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x80\x80\x80\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\x00\xFF\x00\x00\x80\xFF\x00\x00\x80\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\x40\x00\x40\x40\x81\x00\x00"
+ "\x00\x7F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x7F\x00\x00\x00"
+ "\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x40\x40\xC0\x00\x00\x00\x00\x00\x80\x80\x00"
+ "\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00"
+ "\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xD7\xDE\xC4\xFF\x42\xC7\x9B\xA9\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00\x80"
+ "\x80\x80\x00\xC1\xC1\xC1\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x80\x80\x80\x00\x3F\x3F\x3F\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x01\x00"
+ "\xFF\xFF\xFF\x00\x00\x00\x01\x00\x00\x00\x7F\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\xFF\xFF"
+ "\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00"
+ "\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x01\x01\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\xFF\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\x75\x7A\xA1\xB2\x30\x65\x74\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x81\x80\x80\x00\x7F\x80"
+ "\x80\x00\x00\x00\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00"
+ "\xFF\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00"
+ "\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF"
+ "\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00\xFF\x00"
+ "\x00\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x04\x00"
+ "\x00\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\xFF\x00\x00\x01\x01\x00\xFF\x00\x00\x00\x81\x80\x80\x00\x3F\x3F\x3F\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x80\x80\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x01\x01\x01\x00\x01\x01\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x01\x01\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\xFF\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xA2\xDD\xCE\xCA\x46\xBC\x69\xD0\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x81\x01\x81\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80\x00\x7F\xFF\x7F\x00\xC1\xC1\xC1\x00\x40\x40\x40\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\x7F\xFF\x7F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x81\x01\x81\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\xFF\x00\x81\x01\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7F\xFF\x7F\x00\x7F\xFF"
+ "\x7F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x7F\xFF\x7F\x00\x00\x00\x01\x00\x00\x00\x00\x00\x7F\xFF\x80\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xFF\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x01\x00\x7F\xFF\x7F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x7F\xFF\x7F\x00"
+ "\x81\x01\x81\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7F\xFF\x7F\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7E\x13\x5A\xB8\x0F\x88\x51\xFF\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x81\x80\x80\x00\x7F\x80"
+ "\x80\x00\x00\x00\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00"
+ "\xFF\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x01\x01\x00\x00\x00\x00"
+ "\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x80\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7F\xFF\x7F\x00\xC1\xC1\xC1\x00\x40\x40\x40\x00\x02\x00"
+ "\x00\x00\x00\x01\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x7F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x01\x01\x00\x00\x00\x00\x00\x81\x00\x80\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x80\x80\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x81\x01\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7F\xFF\x7F\x00\x7F\xFF"
+ "\x7F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x7F\xFF\x7F\x00\x00\x00\x01\x00\x00\x00\x00\x00\x7F\xFF\x80\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xFF\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x01\x00\x7F\xFF\x7F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x7F\xFF\x7F\x00"
+ "\x81\x01\x81\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7F\xFF\x7F\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xD9\x8B\x81\x99\x2A\x3C\x4C\x83\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x80\x80\x80\xFF\x80\x80\x80\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x80\x80\x80\xFF\x80\x80\x80\xFF\x00"
+ "\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x00\x00"
+ "\x00\x00\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00"
+ "\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x80\x00\x80"
+ "\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x80\x80"
+ "\x80\x00\xC1\xC1\xC1\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\xC0\xC0\xC0"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x80\x80\x80\x00\xFF\xFF\xFF\x00\xC1\xC1\xC1\x00\x40"
+ "\x40\x40\x00\x01\x80\x00\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x80\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\xFF\x7F\x00\xC1\xC1\xC1\x00\x40\x40\x40\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x40\x40\x40\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC9\x37\xA7\x79\xF8\x99\x78\xFD\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x81\x80\x80\x00\x7F\x80\x80\x00\x00\x00"
+ "\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00"
+ "\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\xFF\xFF"
+ "\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00\x00\x81\x80\x80\x00"
+ "\x01\x01\x01\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x81\x81\x80\x00\x81\x81\x81\x00\x01"
+ "\x01\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00"
+ "\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x80\x00\x80"
+ "\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x80\x80"
+ "\x80\x00\xC1\xC1\xC1\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\xC0\xC0\xC0"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x80\x80\x80\x00\xFF\xFF\xFF\x00\xC1\xC1\xC1\x00\x40"
+ "\x40\x40\x00\x01\x80\x00\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x80\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\xFF\x7F\x00\xC1\xC1\xC1\x00\x40\x40\x40\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x40\x40\x40\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7E\xFB\xBE\x76\x34\x86\xB8\x07\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x40\x40\x40\x00\xC0\xC0\xC0\x00\x40\x40"
+ "\x40\x00\xC0\xC0\xC0\x00\x40\x40\x40\x00\xC0\xC0\xC0\x00\x40\x40\x40\x00\xC0\xC0\xC0\x00\x80\x80\x80"
+ "\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x7F\x7F\x7F\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF"
+ "\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00"
+ "\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x01\x00\x00"
+ "\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x80\x80\x80\x00\x00\x00\x00\x00\x04\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x01\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0"
+ "\xFF\x40\x40\x40\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\xFF\xFF\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x01\x01\x01\x00\xFF"
+ "\xFF\xFF\x00\x01\x01\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
+ "\x01\x00\x00\x00\xFF\x00\x40\x40\x40\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00\xFF\xFF\x01\x00\xFF\xFF\x00"
+ "\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\x00\x00\xFF\x00\x01\x01\x01\x00\x80\x80\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00"
+ "\x3F\x3F\x40\x00\xC0\xC0\xC0\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x01\x01\x00\x80\x80\x00\x00\x40\x40\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\xFF\x00\x3F\x3F\x3F\x00\x80\x80"
+ "\x00\x00\x01\x01\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x01\x01\x01\x00\x80\x80\x00\x00\x40\x40\xC0"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x00\x00\x00\x01\x00\x81\x81\x01\x00\x40\x40\xC0\x00\x80\x80\x00\x00\x01\x01\x01\x00"
+ "\x01\x01\x01\x00\x80\x80\x00\x00\x40\x40\xC0\x00\xC0\xC0\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x40"
+ "\x40\xC0\x00\x00\x00\x00\x00\x40\x40\xC0\x00\x80\x80\xC0\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00"
+ "\x00\x00\x40\x40\xC0\x00\xC0\xC0\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xC0\xC0\xC0\xFF\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x80\x80\x00\xC0\xC0\xC0\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xD7\x04\xC0\x9D\x86\xE8\xEF\xDB\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xC0\xC0\xC0\xFF\xFF\x00\x00\xFF\xFF\x00"
+ "\x00\xFF\x80\x80\x80\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00"
+ "\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0"
+ "\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xC0\xC0\xC0"
+ "\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF"
+ "\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x02\x01"
+ "\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC0"
+ "\xC0\x00\x00\x00\x00\x00\x00\x01\x01\x00\x01\x01\xFF\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x01\x01\x00\x3F\x3F\x40\x00\x00\xFF\xFF\x00\x00\x00\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF"
+ "\x00\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x80\x80\x00\xFF"
+ "\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00"
+ "\x3F\x3F\x40\x00\xC0\xC0\xC0\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x01\x01\x00\x80\x80\x00\x00\x40\x40\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\xFF\x00\x3F\x3F\x3F\x00\x80\x80"
+ "\x00\x00\x01\x01\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x01\x01\x01\x00\x80\x80\x00\x00\x40\x40\xC0"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x00\x00\x00\x01\x00\x81\x81\x01\x00\x40\x40\xC0\x00\x80\x80\x00\x00\x01\x01\x01\x00"
+ "\x01\x01\x01\x00\x80\x80\x00\x00\x40\x40\xC0\x00\xC0\xC0\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x40"
+ "\x40\xC0\x00\x00\x00\x00\x00\x40\x40\xC0\x00\x80\x80\xC0\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00"
+ "\x00\x00\x40\x40\xC0\x00\xC0\xC0\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xC0\xC0\xC0\xFF\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x80\x80\x00\xC0\xC0\xC0\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xAA\x18\xF9\xFF\xA4\xB4\xD4\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x01\x00"
+ "\x00\x00\x00\x80\x80\x80\xFF\x80\x80\x80\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\xFF\xFF\x00"
+ "\x00\x00\x00\xFF\x00\xC1\xC1\xC1\x00\x40\x40\x40\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0"
+ "\x00\x40\x40\x40\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x01\x01\x01\x00\x80\x80\x80\x00\x80\x80\x80\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x3F\x3F\x3F\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x80\x80\x80\x00\x40\x40\x40\x00\x00\x00"
+ "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x3F\x3F\x3F\x00\x80\x80\x80\x00\x01\x01\x01\x00\x00\x00\x00\x00\x01\x01\x01"
+ "\x00\x80\x80\x80\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x81\x81\x00"
+ "\x40\x40\x40\x00\x80\x80\x80\x00\x01\x01\x01\x00\x80\x80\x80\x00\x40\x40\x40\x00\xC0\xC0\xC0\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x81\x81\x81\x00\x40\x40\x40\x00\x3F\x3F\x3F\x00\x00\x00\x00\x00\xC0\xC0"
+ "\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00"
+ "\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x80\x80\x80\x00\xFF"
+ "\xFF\xFF\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xD1\xD0\x9F\x60\xE3\xE0\x4D\xCB\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x81\x80\x80\x00\x7F\x80\x80\x00\x00\x00"
+ "\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00"
+ "\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\xFF\xFF"
+ "\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x01"
+ "\x00\x00\x01\xC1\xC0\xC0\x00\xC1\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC0"
+ "\xC0\x00\x00\x00\x00\x00\x00\x01\x01\x00\xC1\xC1\xC1\x00\x01\x01\x00\x00\x01\x01\x01\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\x00\x00"
+ "\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\x00\x00\x00\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC0\xC0\x00\x01\x01\x01\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x80\x80\x80\x00\x40\x40\x40\x00\x00\x00"
+ "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\xFF\x00\x3F\x3F\x3F\x00\x80\x80\x80\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01"
+ "\x00\x80\x80\x80\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x81\x81\x00"
+ "\x40\x40\x40\x00\x80\x80\x80\x00\x01\x01\x01\x00\x80\x80\x80\x00\x40\x40\x40\x00\xC0\xC0\xC0\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x81\x81\x81\x00\x40\x40\x40\x00\x3F\x3F\x3F\x00\x00\x00\x00\x00\xC0\xC0"
+ "\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00"
+ "\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x80\x80\x80\x00\xFF"
+ "\xFF\xFF\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xE9\xB2\xE9\x24\xBC\x59\xC0\x67\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x01\x81\x00\xC1\xC1\xC1\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x80\xFF\xFF\xFF\x00\xFF\x00\x00\x80\xFF\xC0\xC0\xC0"
+ "\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x80\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00"
+ "\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0"
+ "\xFF\x00\x00\x80\xFF\x80\x80\x00\x00\x00\x00\x00\x00\x01\x01\x81\x00\x01\x01\x81\x00\xC1\xC1\xC0\x00"
+ "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x00\x00\x80\xFF\xFF\xFF\x00\xFF\x00\xFF\x00\xFF\xFF"
+ "\xFF\x00\xFF\x00\xFF\x00\xFF\xFF\xFF\x00\xFF\x00\x00\x80\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\xFF\xFF\xFF\x00\xFF\x00\x00\x80\xFF\xFF\xFF\x00\xFF\x00\xFF\x00\xFF\xFF\xFF\x00\xFF\x00\x00\x00"
+ "\xFF\xFF\xFF\x00\xFF\x00\x00\x80\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"
+ "\x01\x00\x00\x00\xFF\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x80\x80\x00\x00\x00\x01\x80\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x01\x01\x80\x00\xFF\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x01\x80\x00\x80\x80\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x80\xFF\x00\xFF\x00\xFF\x00\x00\x00\xFF\x00\xFF\x00\xFF\x00\x00\x00\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\xC1\xC1\xC1\x00\x00\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00"
+ "\x00\x01\x80\x00\x00\x00\x00\x00\x00\x01\x00\x00\x80\x80\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x89\x0B\xF3\xB4\x69\x4F\x85\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x81\x80\x80\x00\x7F\x80\x80\x00\x00\x00"
+ "\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00"
+ "\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\x80\x80\x80\xFF\x00\x00\x80\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x80\xFF\xFF\xFF\x00"
+ "\xFF\x00\x00\x80\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\x02\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x80\x80"
+ "\x80\xFF\x00\x00\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00"
+ "\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00"
+ "\xFF\x00\x00\x00\x00\xC1\xC0\xC0\x00\x40\x40\xC0\x00\x00\x80\x00\x00\x00\x00\x00\x00\x01\x01\x81\x00"
+ "\x00\x00\x00\x00\xC0\xC0\x40\x00\x3F\x3F\x3F\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xC0\xC0\xC0\xFF\x00\x00\x80\xFF\xFF"
+ "\xFF\x00\xFF\x00\xFF\x00\xFF\xFF\xFF\x00\xFF\x00\xFF\x00\xFF\xFF\xFF\x00\xFF\x00\x00\x80\xFF\xC0\xC0"
+ "\xC0\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x80\xFF\xFF\xFF\x00\xFF\x00\x00\x80\xFF\xFF\xFF\x00\xFF\x00\xFF\x00"
+ "\xFF\xFF\xFF\x00\xFF\x00\x00\x00\xFF\xFF\xFF\x00\xFF\x00\x00\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x00\x00\x00\x01\x80\x00\x00\x00\x00\x00\xFF\x00"
+ "\x00\x00\x01\x01\x80\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x01\x80\x00\x80\x80\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x80\xFF\x00\xFF\x00\xFF\x00\x00\x00\xFF\x00\xFF\x00\xFF"
+ "\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC0\x00\x00\x00\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x00\x00\x80"
+ "\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x97\x2A\x21\x92\x43\x90\x14\x7B\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x80\x00"
+ "\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x81\x81\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x81\x81\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x81\x01\x00\x7F\x7F"
+ "\xFF\x00\x80\x80\x00\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x7F\x7F\xFF\x00\x01\x01\x01\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01\x01\x00\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\xC0\xC0\x40\x00\x7F\x7F\xFF\x00\x00"
+ "\x00\x01\x00\x80\x80\x00\x00\x01\x01\x01\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x01\x01"
+ "\x01\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xC0\xC0\x40\x00\x7F\x7F\xFF\x00\x00\x00\x01\x00\x00\x00\x00\x00\x80\x80\x00\x00\xC0\xC0\xC0"
+ "\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x00\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xFF\x00\x81\x81\x81\x00\x01\x01\x01\x00\x81\x81\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\xFF\x80\x80\x00\xFF\xFF\xFF\x00\xFF\x00\x00"
+ "\x00\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x80\x80\x00\xFF\x80\x80\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x80"
+ "\x80\x00\xFF\x00\x00\x00\x00\x40\x40\xC1\x00\x3F\x3F\x3F\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF"
+ "\xFF\x00\x01\x01\x01\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\xC0\xC0\x40"
+ "\x00\x00\x00\xC0\x00\x00\x00\x00\x00\xC1\xC1\xC0\x00\x00\x00\xC1\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00"
+ "\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x80\x80\x00\xFF\x00\x00\x00\xFF\x00"
+ "\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x34\xE6\xE2\x1F\x81\x45\x95\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x81\x80\x80\x00\x7F\x80\x80\x00\x00\x00"
+ "\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00"
+ "\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x80\x80\x00"
+ "\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\x02\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x01\x00\x00\x00\x00\x00\x81\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x81\x81\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x01"
+ "\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x81\x80\x00\x00\x7F\x7F"
+ "\xFF\x00\x80\x80\x00\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00"
+ "\xFF\x00\xFF\xFF\x00\x81\x80\x00\x00\x7F\x7F\xFF\x00\x01\x01\x01\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01\x01\x00\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC0\xC0\x00\xC0\x81\x01\x00\x7F\x7F\xFF\x00\x00"
+ "\x00\x01\x00\x80\x80\x00\x00\x01\x01\x01\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x01\x01"
+ "\x01\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xC0\xC0\x40\x00\x7F\x7F\xFF\x00\x00\x00\x01\x00\x00\x00\x00\x00\x80\x80\x00\x00\xC0\xC0\xC0"
+ "\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x00\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xFF\x00\x81\x81\x81\x00\x01\x01\x01\x00\x81\x81\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\xFF\x80\x80\x00\xFF\xFF\xFF\x00\xFF\x00\x00"
+ "\x00\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x80\x80\x00\xFF\x80\x80\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x80"
+ "\x80\x00\xFF\x00\x00\x00\x00\x40\x40\xC1\x00\x3F\x3F\x3F\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF"
+ "\xFF\x00\x01\x01\x01\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\xC0\xC0\x40"
+ "\x00\x00\x00\xC0\x00\x00\x00\x00\x00\xC1\xC1\xC0\x00\x00\x00\xC1\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00"
+ "\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x80\x80\x00\xFF\x00\x00\x00\xFF\x00"
+ "\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xD0\x0C\x16\x8A\x64\xF0\xC0\x3D\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF"
+ "\x00\x00\x00\x00\x01\x01\x01\x00\x01\x01\x01\x00\x81\x81\x81\x00\x01\x01\x00\x00\xC1\xC1\xC1\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x04\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x40\x40\x40\x00\x00\xFF\xFF\x00\x80\x00\x00\x00\x40\x40"
+ "\x40\x00\x3F\x3F\x3F\x00\x00\x00\x00\x00\xC0\xC0\x40\x00\xC0\xC0\x80\x00\x7F\x7F\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x00\x00\x00"
+ "\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x02\x00\x00\x00\x00\xC0\xC0\xC0\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0"
+ "\xC1\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\xC0\xC0"
+ "\xC0\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\xFF\x80\x80\x00\xFF\x00\xFF\x00\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x80\x80\x80"
+ "\xFF\xC0\xC0\xC0\xFF\xC0\xC0\xC0\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80\x81\x00\x00"
+ "\x40\x00\xC0\x00\x00\x80\x80\x00\xC0\xC0\xC0\x00\x40\x40\x40\x00\xC0\xC0\xC0\x00\xC0\xC0\xC0\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00"
+ "\x00\x00\x00\x00\x80\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC0\x80\x80\x00\x40\x40"
+ "\x40\x00\x00\x00\x00\x00\x40\xC0\xC0\x00\xFF\x7F\x80\x00\x81\x81\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x80\x00\x00\x00\xC0\xC0\xC0"
+ "\x00\x7F\x7F\x7F\x00\x00\x00\x00\x00\x3F\x3F\x3F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00"
+ "\xC1\xC1\xC0\x00\x80\x7F\x3F\x00\x00\x80\x01\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xC0\xC0\xC0\xFF\xC0\xC0\xC0\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\x80\x80\xFF\xC0\xC0"
+ "\xC0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3F\x3F\x3F"
+ "\x00\x00\x00\x00\x00\x00\x81\x81\x00\x00\x80\x80\x00\x00\xC0\xC0\x00\xC1\xC1\xC1\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x40"
+ "\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xBE\x4D\x07\xF0\xED\x63\x0A\xFD\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x81\x80\x80\x00\x7F\x80\x80\x00\x00\x00"
+ "\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00"
+ "\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\xFF\xFF"
+ "\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00\x00\xC1\xC0\xC0\x00"
+ "\x81\x81\x81\x00\x01\x00\x00\x00\x01\x00\x00\x00\x81\x81\x81\x00\x01\x01\x00\x00\xC1\xC1\xC1\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x04\x01"
+ "\x00\x00\x01\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x40\x40\x40\x00\x00\xFF\xFF\x00\x80\x00\x00\x00\x40\x40"
+ "\x40\x00\x3F\x3F\x3F\x00\x00\x00\x00\x00\xC0\xC0\x40\x00\xC0\xC0\x80\x00\x7F\x7F\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x00\x00\x00"
+ "\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x02\x00\x00\x00\x00\xC0\xC0\xC0\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0"
+ "\xC1\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\xC0\xC0"
+ "\xC0\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\xFF\x80\x80\x00\xFF\x00\xFF\x00\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x80\x80\x80"
+ "\xFF\xC0\xC0\xC0\xFF\xC0\xC0\xC0\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80\x81\x00\x00"
+ "\x40\x00\xC0\x00\x00\x80\x80\x00\xC0\xC0\xC0\x00\x40\x40\x40\x00\xC0\xC0\xC0\x00\xC0\xC0\xC0\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00"
+ "\x00\x00\x00\x00\x80\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC0\x80\x80\x00\x40\x40"
+ "\x40\x00\x00\x00\x00\x00\x40\xC0\xC0\x00\xFF\x7F\x80\x00\x81\x81\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x80\x00\x00\x00\xC0\xC0\xC0"
+ "\x00\x7F\x7F\x7F\x00\x00\x00\x00\x00\x3F\x3F\x3F\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00"
+ "\xC1\xC1\xC0\x00\x80\x7F\x3F\x00\x00\x80\x01\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xC0\xC0\xC0\xFF\xC0\xC0\xC0\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\x80\x80\xFF\xC0\xC0"
+ "\xC0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3F\x3F\x3F"
+ "\x00\x00\x00\x00\x00\x00\x81\x81\x00\x00\x80\x80\x00\x00\xC0\xC0\x00\xC1\xC1\xC1\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x40"
+ "\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x2F\x35\xC9\x77\x48\x56\x41\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x80"
+ "\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x80\x80\x80\xFF\x00\x00\x00\x00\x40\x40\x40"
+ "\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x7F\x7F\x80\x00\x00\x00\xFF\x00\x81\x81\x81\x00\x00\x00\x00\x00\x40\x40\x40\x00\x40"
+ "\x40\x40\x00\x04\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x40\x40\x40\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x81\x81\x81\x00\x01\x01\x00\x00\x80\x80"
+ "\x81\x00\x00\x00\x00\x00\x80\x80\x80\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\xC0\xC0\xC0"
+ "\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF"
+ "\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x04\x00\x00\x00\x01\x00\x00\x00\x00\x80\x80\x80\x00\x40\x40\x40\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x01\x01\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3F\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40"
+ "\x40\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\x80\x80\x80"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80"
+ "\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xB6\x05\xC9\xAB\x7C\x77\xA6\xA1\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x81\x80\x80\x00\x7F\x80\x80\x00\x00\x00"
+ "\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00"
+ "\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\xFF\xFF"
+ "\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x01"
+ "\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\xFF\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x80\x80\x80\xFF\x00\x00\x00\x00\xFF\x00\x00"
+ "\xFF\x00\x00\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00"
+ "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x80\x80\x80\xFF\x00\x00\x00\x00\x40\x40\x40\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x00\x00"
+ "\x00\x00\x81\x81\x81\x00\x00\x00\x00\x00\x40\x40\x40\x00\x40\x40\x40\x00\x04\x00\x00\x00\x00\x80\x80"
+ "\x80\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\xFF\xFF\xFF"
+ "\x00\x00\x00\x00\x00\x81\x81\x81\x00\x01\x01\x01\x00\x80\x80\x80\x00\x00\x00\x00\x00\x80\x80\x80\x00"
+ "\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\xC0\xC0\xC0\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00"
+ "\x00\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x04\x00"
+ "\x00\x00\x01\x00\x00\x00\x00\x80\x80\x80\x00\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x80\x80\x80"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x3F\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00\x40\x40\x40\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00"
+ "\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x40\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x40\x40\x40\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x35\xD6\xA3\x81\xA7\xB0\x8B\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x01\x01\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\xFF\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01\x01\xFF\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF\x00\x00\x00\x00\xFF\x00"
+ "\x00\x00\x00\x00\xFF\xFF\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\xFF\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00"
+ "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x81\x81\x00\x40\x40\x3F"
+ "\x00\x81\x81\x80\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
+ "\x00\x00\x01\x01\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00"
+ "\x00\x00\x00\x00\x01\x01\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\xFF\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x01\x00\x00\x00"
+ "\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x35\x86\x1E\xD6\xF6\xF1\x59\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x81\x80\x80\x00\x7F\x80\x80\x00\x00\x00"
+ "\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00"
+ "\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x01\x01\x00\x00\x00\x00\x00\x01\x00\xFF"
+ "\x00\xFF\xFF\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x01"
+ "\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\xFF\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x01\x01\xFF\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00"
+ "\xFF\x00\x00\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00"
+ "\x00\x00\x00\x00\xFF\xFF\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\xFF\x00\xC1\xC1\xC1\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00"
+ "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x81\x81\x81\x00\x40\x40\x3F"
+ "\x00\x81\x81\x80\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"
+ "\x00\x00\x01\x01\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00"
+ "\x00\x00\x00\x00\x01\x01\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\xFF\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x01\x00\x00\x00"
+ "\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\xC0\x00\x00\x00\xC1"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x34\xBA\xF9\x00\x88\x01\xD9\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x3F\x3F\x3F\x00\x01\x01"
+ "\x00\x00\xFF\xFF\x00\x00\xC1\xC1\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\xFF\x00\x00\x00\x00\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\xFF\xFF\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\xC0\xC0\x80\x00\x00\x00\x81"
+ "\x00\x7F\x7F\x80\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF"
+ "\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\xFF"
+ "\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x7F\x7F\x80\x00\x00\x00\xFF\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\xC0\xC0\xC0\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\xC1\xC1\xC1\x00\x00\x00\x00\x00\xC1\xC1\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x80\x80\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x3F\x3F\x3F\x00\xC1"
+ "\xC1\xC0\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\xFF\x00\x00\x00"
+ "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x40\x40\x40\x00\x81\x81\x80\x00\x00\x00\x01\x00\xC0\xC0\xC0\x00\x7F\x7F\x80\x00\x00\x00\x00"
+ "\x00\x01\x01\x00\x00\x40\x40\x40\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF"
+ "\x80\x80\x80\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x3F\x3F\x3F\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x40\x40\x40\x00\xC0\xC0\xC0\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x7F"
+ "\x7F\x80\x00\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x81\x81\x80\x00\x80\x80\x80\x00\x80\x80\x80"
+ "\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\xD9\xC6\x01\x2A\xF1\x62\x54\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xC1\xC0\xC0\x00\x3F\x40\x40\x00\x00\x00"
+ "\x00\x00\x00\xFF\xFF\x00\xC1\xC1\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\xFF"
+ "\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x80\x80\x80"
+ "\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF"
+ "\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\x00\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\xFF"
+ "\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x02\x01"
+ "\x00\x00\x01\x01\x00\x00\x01\x81\x80\x80\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\xC0\xC0\xC0\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\xFF\x00\xC1\xC1\xC1\x00\x00\x00\x00\x00\xC1\xC1\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x80\x80\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x3F\x3F\x3F\x00\xC1"
+ "\xC1\xC0\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\xFF\x00\x00\x00"
+ "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x40\x40\x40\x00\x81\x81\x80\x00\x00\x00\x01\x00\xC0\xC0\xC0\x00\x7F\x7F\x80\x00\x00\x00\x00"
+ "\x00\x01\x01\x00\x00\x40\x40\x40\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF"
+ "\x80\x80\x80\xFF\xC0\xC0\xC0\xFF\xFF\xFF\x00\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x3F\x3F\x3F\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x40\x40\x40\x00\xC0\xC0\xC0\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\x00\x7F"
+ "\x7F\x80\x00\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x40\x00\x81\x81\x80\x00\x80\x80\x80\x00\x80\x80\x80"
+ "\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x35\x50\x04\xC5\x7F\x63\x55\x6E\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x7F\x7F\x7F\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x40\x40\x40\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x01\x01\x00\x00\xFF\xFF"
+ "\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00"
+ "\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF"
+ "\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x02\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x01\x01"
+ "\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x00\x00"
+ "\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00"
+ "\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x04\x40\x40\x40\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x01\x01\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\xFF"
+ "\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x80\x80\x80\x00\xC1\xC1\xC1\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\x00\x00"
+ "\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\xFF\xFF\xFF\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x40\x40\x40\x00\x40\x40\x40"
+ "\x00\x00\x00\x00\x00\x01\x01\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00"
+ "\x01\x01\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x3F\x3F\x3F\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00"
+ "\x00\x00\xFF\x80\x80\x80\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7C\xD8\x09\x7C\xF1\x24\x22\x3A\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x81\x80\x80\x00\x7F\x80\x80\x00\x00\x00"
+ "\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00"
+ "\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\xFF\xFF"
+ "\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x01"
+ "\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\xFF\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x01\x01\x00\x00\xFF\xFF"
+ "\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\xFF\x00\x00\x00\xFF\xFF\x00\x00"
+ "\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\xC1\xC0\xC0\x00\x00\xFF\xFF\x00"
+ "\x01\x01\x01\x00\xFF\xFF\x00\x00\x00\xFF\x00\x00\x01\x01\x01\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x02\x00\x00\x00\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\xFF\xFF\xFF\x00\x00"
+ "\x00\x00\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x01\x01"
+ "\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x00\x00"
+ "\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00"
+ "\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x04\x40\x40\x40\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x01\x01\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\xFF\xFF\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\xFF"
+ "\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x80\x80\x80\x00\xC1\xC1\xC1\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\x00\x00"
+ "\x00\x00\x01\x01\x00\x00\x01\x01\x00\x00\xFF\xFF\xFF\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xFF"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x40\x40\x40\x00\x40\x40\x40"
+ "\x00\x00\x00\x00\x00\x01\x01\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00"
+ "\x01\x01\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x3F\x3F\x3F\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xC0\xC0\xFF"
+ "\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00"
+ "\x00\x00\xFF\x80\x80\x80\xFF\x80\x80\x80\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\xE9\x1F\xBE\x0F\x02\xCD\x5F\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xFF\x80\x80\x80\xFF\x00"
+ "\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\xFF\xFF\x00\x00\x01\x01\x00\xFF\xFF\xFF"
+ "\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x00\x00\x00\x00"
+ "\x00\x00\x00\x01\x00\x01\x01\x00\x00\xFF\xFF\x00\x01\x01\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\xFF\x00\x00\x00\xFF\x80\x80\x80\x00\x00\x00"
+ "\x00\x00\x80\x80\x80\x00\xC1\xC1\xC1\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\x80\x80\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x01\xFF\x80\x80\x80\x00\x80"
+ "\x80\x80\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x01\x01\x01\x00\xFF\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00"
+ "\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x40\x40\x40\xFF\xFF\xFF\xFF\x00\x01\x01\x01\x00\x00\xFF\xFF"
+ "\x00\x00\x00\x00\x00\x01\x01\x01\x00\xFF\xFF\xFF\x00\xC1\xC1\xC1\x00\x3F\x3F\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xC0\xC0\xC0\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\x00\x01\x01\x00\x00\x7F\x7F\x00\x00\x80\x80\x00\x01"
+ "\x01\x01\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x01\x00\xFF\xFF\xFF\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x80\x7F\x7F\x00\x00\xFF\xFF"
+ "\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\xC1\xC1\xC1\x00\x80\x80\x80\x00"
+ "\x00\x7F\x7F\x00\x80\x81\x81\x00\x00\x01\x01\x00\x00\x01\x01\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x00\xFF\xFF\xFF\x00\x00\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\xC1\xC1\xC0\x00\xC1\xC1\xC1"
+ "\x00\xC0\xC0\xC0\x00\x00\x01\x01\x00\x00\xFF\xFF\x00\x01\x01\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80"
+ "\x80\x80\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFC\x80\xFB\x9C\x8E\x95\x3D\x08\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1108,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x10\x00\x00\x00\x10\x08"
+ "\x06\x00\x00\x00\x1F\xF3\xFF\x61\x00\x00\x04\x1B\x49\x44\x41\x54\x18\x19\x01\x10\x04\xEF\xFB\x01\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x81\x80\x80\x00\x7F\x80\x80\x00\x00\x00"
+ "\x00\x00\x81\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x80\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00"
+ "\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF"
+ "\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xC0\xC0\xC0\xFF\xFF\xFF\xFF\xFF\x80\x80\x80\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\xFF\xFF"
+ "\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\xFF\x00\x00\xFF\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\xFF\xFF\x00"
+ "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00"
+ "\x00\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xC0\xC0\xC0\x00\x00\x00\x00\x00\x02\x01"
+ "\x00\x00\x01\xC1\xC0\xC0\x00\x81\x80\x80\x00\x01\x01\x01\x00\x01\x01\x01\x00\x80\x80\x80\x00\x01\xFF"
+ "\xFF\x00\x80\x80\x80\x00\xC1\xC1\xC1\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x01"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\xFF\xFF\xFF\x00\x80\x80\xFF\x00\x00\x00\xFF\xFF\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC0\xC0\xC0\xFF\x00"
+ "\x00\x00\xFF\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x01\xFF\x80\x80\x80\x00\x80"
+ "\x80\x80\x00\x00\xFF\xFF\x00\x00\x00\x00\x00\x01\x01\x01\x00\xFF\xFF\xFF\x00\x00\x00\xFF\x00\x00\x00"
+ "\x00\x00\x00\x00\x01\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x40\x40\x40\xFF\xFF\xFF\xFF\x00\x01\x01\x01\x00\x00\xFF\xFF"
+ "\x00\x00\x00\x00\x00\x01\x01\x01\x00\xFF\xFF\xFF\x00\xC1\xC1\xC1\x00\x3F\x3F\xFF\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xC0\xC0\xC0\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00\x00\x01\x01\x00\x00\x7F\x7F\x00\x00\x80\x80\x00\x01"
+ "\x01\x01\x00\xC0\xC0\xC0\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x01\x00\xFF\xFF\xFF\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x80\x7F\x7F\x00\x00\xFF\xFF"
+ "\x00\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\xC1\xC1\xC1\x00\x80\x80\x80\x00"
+ "\x00\x7F\x7F\x00\x80\x81\x81\x00\x00\x01\x01\x00\x00\x01\x01\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x80\x80\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\x00\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\x00\xFF\xFF\xFF\x00\x00\x00\xFF\xFF\xFF"
+ "\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\xFF\xC0\xC0\xC0\xFF\x00\x00\x00\xFF\x02\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC1\xC1\xC1\x00\xC1\xC1\xC0\x00\xC1\xC1\xC1"
+ "\x00\xC0\xC0\xC0\x00\x00\x01\x01\x00\x00\xFF\xFF\x00\x01\x01\x01\x00\x00\x00\x00\x00\xFF\xFF\xFF\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80"
+ "\x80\x80\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x98\x02\xAF\x81\x39\xA0\x85\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+}
+
+};
+
+
+LCHMTocImageKeeper::LCHMTocImageKeeper( )
+{
+ for ( int i = 0; i < LCHMBookIcons::MAX_BUILTIN_ICONS; i++ )
+ {
+ const png_memory_image_t * image = png_image_bookarray + i;
+
+ if ( !m_images[i].loadFromData ((const uchar*)image->data, image->size, "PNG") )
+ qFatal ( "Could not load image %d", i );
+ }
+}
+
+const QPixmap * LCHMTocImageKeeper::getImage( int id )
+{
+ if ( id < 0 || id > LCHMBookIcons::MAX_BUILTIN_ICONS )
+ qFatal("LCHMTocImageKeeper::getImage: requested image id (%d) is out of range (%d)", id, LCHMBookIcons::MAX_BUILTIN_ICONS );
+
+ return &m_images[id];
+}
diff --git a/lib/libchmfile/libchmtocimage.h b/lib/libchmfile/libchmtocimage.h
new file mode 100644
index 0000000..73f84da
--- /dev/null
+++ b/lib/libchmfile/libchmtocimage.h
@@ -0,0 +1,32 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+
+//! This class is used to retrieve the book TOC icons associated with images
+class LCHMTocImageKeeper
+{
+ public:
+ LCHMTocImageKeeper();
+ const QPixmap * getImage( int id );
+
+ private:
+ QPixmap m_images[LCHMBookIcons::MAX_BUILTIN_ICONS];
+};
diff --git a/lib/libchmfile/libchmurlfactory.h b/lib/libchmfile/libchmurlfactory.h
new file mode 100644
index 0000000..29ac433
--- /dev/null
+++ b/lib/libchmfile/libchmurlfactory.h
@@ -0,0 +1,122 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <qdir.h>
+#include <qstring.h>
+#include <qregexp.h>
+
+namespace LCHMUrlFactory
+{
+
+static inline bool isRemoteURL( const QString & url, QString & protocol )
+{
+ // Check whether the URL is external
+ QRegExp uriregex ( "^(\\w+):\\/\\/" );
+ QRegExp mailtoregex ( "^(mailto):" );
+
+ // mailto: can also have different format, so handle it
+ if ( url.startsWith( "mailto:" ) )
+ {
+ protocol = "mailto";
+ return true;
+ }
+ else if ( uriregex.search ( url ) != -1 )
+ {
+ QString proto = uriregex.cap ( 1 ).lower();
+
+ // Filter the URLs which need to be opened by a browser
+ if ( proto == "http"
+ || proto == "ftp"
+ || proto == "mailto"
+ || proto == "news" )
+ {
+ protocol = proto;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// Some JS urls start with javascript://
+static inline bool isJavascriptURL( const QString & url )
+{
+ return url.startsWith ("javascript://");
+}
+
+// Parse urls like "ms-its:file name.chm::/topic.htm"
+static inline bool isNewChmURL( const QString & url, QString & chmfile, QString & page )
+{
+ QRegExp uriregex ( "^ms-its:(.*)::(.*)$" );
+
+ if ( uriregex.search ( url ) != -1 )
+ {
+ chmfile = uriregex.cap ( 1 );
+ page = uriregex.cap ( 2 );
+
+ return true;
+ }
+
+ return false;
+}
+
+static inline QString makeURLabsoluteIfNeeded( const QString & url )
+{
+ QString p1, p2, newurl = url;
+
+ if ( !isRemoteURL (url, p1)
+ && !isJavascriptURL (url)
+ && !isNewChmURL (url, p1, p2) )
+ {
+ newurl = QDir::cleanDirPath (url);
+
+ // Normalize url, so it becomes absolute
+ if ( newurl[0] != '/' )
+ newurl = "/" + newurl;
+ }
+
+ //qDebug ("makeURLabsolute (%s) -> (%s)", url.ascii(), newurl.ascii());
+ return newurl;
+}
+
+
+// Returns a special string, which allows the kio-slave, or viewwindow-browser iteraction
+// to regognize our own internal urls, which is necessary to show image-only pages.
+static inline QString getInternalUriExtension()
+{
+ return ".KCHMVIEWER_SPECIAL_HANDLER";
+}
+
+
+static inline bool handleFileType( const QString& link, QString& generated )
+{
+ QString intext = getInternalUriExtension();
+
+ if ( !link.endsWith( intext ) )
+ return false;
+
+ QString filelink = link.left( link.length() - strlen( intext ) );
+ generated = "<html><body><img src=\"" + filelink + "\"></body></html>";
+ return true;
+}
+
+
+};
diff --git a/lib/libchmfile/qt34.cpp b/lib/libchmfile/qt34.cpp
new file mode 100644
index 0000000..fd7028a
--- /dev/null
+++ b/lib/libchmfile/qt34.cpp
@@ -0,0 +1,259 @@
+/***************************************************************************
+ * Copyright (C) 2007 by Albert Astals Cid, aacid@kde.org *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <qdir.h>
+
+#include "qt34.h"
+
+LIBCHMCString::LIBCHMCString()
+{
+}
+
+LIBCHMCString::LIBCHMCString(const char *string)
+{
+#if defined (USE_QT_4)
+ cs = QByteArray(string);
+#else
+ cs = QCString(string);
+#endif
+}
+
+
+const char *LIBCHMCString::toCString() const
+{
+ return cs.data();
+}
+
+
+void LIBCHMCString::clear()
+{
+#if defined (USE_QT_4)
+ cs = QByteArray();
+#else
+ cs = QCString();
+#endif
+}
+
+bool LIBCHMCString::operator==(const QString &string) const
+{
+ return QString(cs) == string;
+}
+
+uint LIBCHMCString::length() const
+{
+ return cs.length();
+}
+
+bool LIBCHMCString::isEmpty() const
+{
+ return cs.isEmpty();
+}
+
+void LIBCHMCString::prepend(char c)
+{
+ cs = c + cs;
+}
+
+char LIBCHMCString::at(uint i) const
+{
+ return cs.at(i);
+}
+
+void LIBCHMCString::replace(uint index, uint len, const char *str)
+{
+ cs.replace(index, len, str);
+}
+
+void LIBCHMCString::remove(uint index, uint len)
+{
+ cs.remove(index, len);
+}
+
+LIBCHMCString LIBCHMCString::lower()
+{
+#if defined (USE_QT_4)
+ return cs.toLower().data();
+#else
+ return cs.lower().data();
+#endif
+}
+
+
+
+LIBCHMRegExp::LIBCHMRegExp(const QString &regexp)
+{
+ re = QRegExp(regexp);
+}
+
+int LIBCHMRegExp::search(const QString &str, int offset)
+{
+#if defined (USE_QT_4)
+ return re.indexIn(str, offset);
+#else
+ return re.search(str, offset);
+#endif
+}
+
+QString LIBCHMRegExp::cap(int nth)
+{
+ return re.cap(nth);
+}
+
+void LIBCHMRegExp::setMinimal(bool minimal)
+{
+ return re.setMinimal(minimal);
+}
+
+int LIBCHMRegExp::matchedLength() const
+{
+ return re.matchedLength();
+}
+
+
+
+
+LIBCHMString::LIBCHMString()
+{
+}
+
+LIBCHMString::LIBCHMString(const QString &string)
+{
+ s = string;
+}
+
+LIBCHMString::LIBCHMString(const char *string)
+{
+ s = QString(string);
+}
+
+QString LIBCHMString::lower() const
+{
+#if defined (USE_QT_4)
+ return s.toLower();
+#else
+ return s.lower();
+#endif
+}
+
+const char *LIBCHMString::ascii() const
+{
+#if defined (USE_QT_4)
+ return s.toAscii();
+#else
+ return s.ascii();
+#endif
+}
+
+int LIBCHMString::find(char c, int index) const
+{
+#if defined (USE_QT_4)
+ return s.indexOf(c, index);
+#else
+ return s.find(c, index);
+#endif
+}
+
+int LIBCHMString::find(const QChar &c, int index) const
+{
+#if defined (USE_QT_4)
+ return s.indexOf(c, index);
+#else
+ return s.find(c, index);
+#endif
+}
+
+int LIBCHMString::find(const QString &string, int index, bool cs) const
+{
+#if defined (USE_QT_4)
+ Qt::CaseSensitivity cse;
+ if (cs) cse = Qt::CaseSensitive;
+ else cse = Qt::CaseInsensitive;
+ return s.indexOf(string, index, cse);
+#else
+ return s.find(string, index, cs);
+#endif
+}
+
+int LIBCHMString::findRev(char c) const
+{
+#if defined (USE_QT_4)
+ return s.lastIndexOf(c);
+#else
+ return s.findRev(c);
+#endif
+}
+
+QChar LIBCHMString::at(uint i) const
+{
+ return s.at(i);
+}
+
+QString LIBCHMString::left(uint len) const
+{
+ return s.left(len);
+}
+
+LIBCHMString LIBCHMString::mid(uint index, uint len) const
+{
+ return s.mid(index, len);
+}
+
+bool LIBCHMString::isEmpty() const
+{
+ return s.isEmpty();
+}
+
+QString LIBCHMString::toString() const
+{
+ return s;
+}
+
+bool LIBCHMString::operator==(const QString &string) const
+{
+ return s == string;
+}
+
+
+
+QString LIBCHMDir::cleanDirPath(const QString &dir)
+{
+#if defined (USE_QT_4)
+ return QDir::cleanPath(dir);
+#else
+ return QDir::cleanDirPath(dir);
+#endif
+}
+
+
+
+bool LIBCHMStringList::contains(const QStringList &list, const QString &string)
+{
+ return list.contains(string);
+}
+
+QStringList LIBCHMStringList::split(const QRegExp &regexp, const QString &string)
+{
+#if defined (USE_QT_4)
+ return string.split(regexp, QString::SkipEmptyParts);
+#else
+ return QStringList::split(regexp, string);
+#endif
+}
diff --git a/lib/libchmfile/qt34.h b/lib/libchmfile/qt34.h
new file mode 100644
index 0000000..0835b0a
--- /dev/null
+++ b/lib/libchmfile/qt34.h
@@ -0,0 +1,123 @@
+/***************************************************************************
+ * Copyright (C) 2007 by Albert Astals Cid, aacid@kde.org *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef INCLUDE_QT34_H
+#define INCLUDE_QT34_H
+
+#include <qregexp.h>
+#include <qstring.h>
+
+// Qt3/Qt4 compatibility: in Qt3 QVector stores pointers, not values - so QValueVector should be used.
+// In Qt4 QVector stores values, so we can use QVector
+#if defined (USE_QT_4)
+ #define LIBCHMVector QVector
+#else
+#include <qvaluevector.h>
+ #define LIBCHMVector QValueVector
+#endif
+
+#if defined (USE_QT_4)
+ #define LIBCHMMemArray QVector
+#else
+ #define LIBCHMMemArray QMemArray
+#endif
+
+class LIBCHMCString
+{
+ public:
+ LIBCHMCString();
+ LIBCHMCString(const char *string);
+
+ const char *toCString() const;
+
+ void clear();
+
+ bool operator==(const QString &string) const;
+ uint length() const;
+ bool isEmpty() const;
+ void prepend(char c);
+ char at(uint i) const;
+ void replace(uint index, uint len, const char *str);
+ void remove(uint index, uint len);
+ LIBCHMCString lower();
+
+ private:
+#if defined (USE_QT_4)
+ QByteArray cs;
+#else
+ QCString cs;
+#endif
+};
+
+class LIBCHMRegExp
+{
+ public:
+ LIBCHMRegExp(const QString &regexp);
+
+ int search(const QString &str, int offset = 0);
+ QString cap(int nth);
+ void setMinimal(bool minimal);
+ int matchedLength() const;
+
+ private:
+ QRegExp re;
+};
+
+class LIBCHMString
+{
+ public:
+ LIBCHMString();
+ LIBCHMString(const QString &string);
+ LIBCHMString(const char *string);
+
+ QString lower() const;
+ const char *ascii() const;
+ int find(char c, int index = -1) const;
+ int find(const QChar &c, int index) const;
+ int find(const QString &string, int index, bool cs) const;
+ int findRev(char c) const;
+ QChar at(uint i) const;
+ QString left(uint len) const;
+ LIBCHMString mid(uint index, uint len = 0xffffffff) const;
+ bool isEmpty() const;
+
+ QString toString() const;
+
+ bool operator==(const QString &string) const;
+
+ private:
+ QString s;
+};
+
+class LIBCHMDir
+{
+ public:
+ static QString cleanDirPath(const QString &dir);
+};
+
+class LIBCHMStringList
+{
+ public:
+ static bool contains(const QStringList &list, const QString &string);
+ static QStringList split(const QRegExp &regexp, const QString &string);
+};
+
+#endif
diff --git a/po/Makefile.am b/po/Makefile.am
new file mode 100644
index 0000000..0fa209c
--- /dev/null
+++ b/po/Makefile.am
@@ -0,0 +1 @@
+POFILES = AUTO
diff --git a/po/cs.po b/po/cs.po
new file mode 100644
index 0000000..a5846d8
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,845 @@
+# translation of kchmviewer.po to
+# This file is put in the public domain.
+#
+# Hynek Fabian <hynek.fabian@mobilbonus.cz>, 2006.
+msgid ""
+msgstr ""
+"Project-Id-Version: kchmviewer\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-03-13 20:31-0700\n"
+"PO-Revision-Date: 2006-08-31 20:54+0200\n"
+"Last-Translator: Hynek Fabian <hynek.fabian@mobilbonus.cz>\n"
+"Language-Team: <cs@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.2\n"
+
+#. i18n: file kchmsetupdialog.ui line 24
+#: rc.cpp:3
+#, no-c-format
+msgid "KchmViewer settings"
+msgstr "Nastavení KchmViewer"
+
+#. i18n: file kchmsetupdialog.ui line 54
+#: rc.cpp:6
+#, no-c-format
+msgid "General behavior"
+msgstr "Běžné chovaní"
+
+#. i18n: file kchmsetupdialog.ui line 73
+#: rc.cpp:9
+#, no-c-format
+msgid "If no arguments given on load"
+msgstr "Bez parametrů při spučtení"
+
+#. i18n: file kchmsetupdialog.ui line 84
+#: rc.cpp:12
+#, no-c-format
+msgid "Open the 'open CHM file' dialog"
+msgstr "Ukaž dialog 'Výběr CHM souboru'"
+
+#. i18n: file kchmsetupdialog.ui line 92
+#: rc.cpp:15
+#, no-c-format
+msgid "Open the &last used CHM file, if exist"
+msgstr "Otevři pos&lední používaný CHM soubor"
+
+#. i18n: file kchmsetupdialog.ui line 95
+#: rc.cpp:18
+#, no-c-format
+msgid "Alt+L"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 105
+#: rc.cpp:21
+#, no-c-format
+msgid "History"
+msgstr "Historie"
+
+#. i18n: file kchmsetupdialog.ui line 124
+#: rc.cpp:24
+#, no-c-format
+msgid "Store history information for"
+msgstr "Uschovat informace o historii posledních"
+
+#. i18n: file kchmsetupdialog.ui line 143
+#: rc.cpp:28
+#, no-c-format
+msgid "latest files"
+msgstr "souborů"
+
+#. i18n: file kchmsetupdialog.ui line 153
+#: rc.cpp:31
+#, no-c-format
+msgid "R&emember extra information for history files"
+msgstr "Pamatovat si &extra informace souborů historie"
+
+#. i18n: file kchmsetupdialog.ui line 156
+#: rc.cpp:34
+#, no-c-format
+msgid "Alt+E"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 159
+#: rc.cpp:37
+#, no-c-format
+msgid ""
+"Remembers the information about the files, which were opened. Remembers last "
+"opened page, search history, font size, bookmarks and so on."
+msgstr ""
+"Pamatuje si poslední otevřenou stránku, historii hledání, velikost písma, "
+"záložky a podobné informace o prohlížených souborech."
+
+#. i18n: file kchmsetupdialog.ui line 171
+#: rc.cpp:40
+#, no-c-format
+msgid "CHM security settings"
+msgstr "Bezpečnostní volby"
+
+#. i18n: file kchmsetupdialog.ui line 182
+#: rc.cpp:43
+#, no-c-format
+msgid "When external link clicked"
+msgstr "Při kliknutí na externí odkaz"
+
+#. i18n: file kchmsetupdialog.ui line 193
+#: rc.cpp:46
+#, no-c-format
+msgid "Alwa&ys open it in external browser"
+msgstr "Vžd&y otevřít v externím prohlížeči"
+
+#. i18n: file kchmsetupdialog.ui line 196
+#: rc.cpp:49
+#, no-c-format
+msgid "Alt+Y"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 204
+#. i18n: file kchmsetupdialog.ui line 244
+#: rc.cpp:52 rc.cpp:65
+#, no-c-format
+msgid "Ask for confirmation"
+msgstr "Vyžádat si potvrzení"
+
+#. i18n: file kchmsetupdialog.ui line 212
+#: rc.cpp:55
+#, no-c-format
+msgid "Do not open the link"
+msgstr "Neotevírat odkaz"
+
+#. i18n: file kchmsetupdialog.ui line 225
+#: rc.cpp:59
+#, no-c-format
+msgid "When link pointed to a new CHM file clicked"
+msgstr "Při kliknutí na odkaz na jiný CHM soubor"
+
+#. i18n: file kchmsetupdialog.ui line 236
+#: rc.cpp:62
+#, no-c-format
+msgid "Always open a new CHM file"
+msgstr "Otevřít odkazovaný CHM soubor"
+
+#. i18n: file kchmsetupdialog.ui line 252
+#: rc.cpp:68
+#, no-c-format
+msgid "Do not open a new CHM file"
+msgstr "Neotvírat odkazovaný soubor"
+
+#. i18n: file kchmsetupdialog.ui line 266
+#: rc.cpp:71
+#, no-c-format
+msgid "Version-specific settings"
+msgstr "Zvláštní nastavení verzí"
+
+#. i18n: file kchmsetupdialog.ui line 277
+#: rc.cpp:74
+#, no-c-format
+msgid "Qt version settings"
+msgstr "Nastavení Qt verze"
+
+#. i18n: file kchmsetupdialog.ui line 299
+#: rc.cpp:77
+#, no-c-format
+msgid ""
+"Enter the path to the program, which will be used as a browser for external "
+"links. A <i>%s</i> symbol will be replaced by the URL clicked."
+msgstr ""
+"Cesta k externímu prohlížeči. Symbol <i>%s</i> bude nahrazen volanou URL."
+
+#. i18n: file kchmsetupdialog.ui line 325
+#: rc.cpp:80
+#, no-c-format
+msgid "KDE version settings"
+msgstr "Nastavení KDE verze"
+
+#. i18n: file kchmsetupdialog.ui line 336
+#: rc.cpp:83
+#, no-c-format
+msgid "To show HTML content, use"
+msgstr "HTML obsah zobrazit pomocí"
+
+#. i18n: file kchmsetupdialog.ui line 347
+#: rc.cpp:86
+#, no-c-format
+msgid "&QTextBrowser-based widget"
+msgstr "&QTextBrowser prvku"
+
+#. i18n: file kchmsetupdialog.ui line 350
+#: rc.cpp:89
+#, no-c-format
+msgid "Alt+Q"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 358
+#: rc.cpp:92
+#, no-c-format
+msgid "&KHTMLPart-based widget"
+msgstr "&KHTMLPart prvku"
+
+#. i18n: file kchmsetupdialog.ui line 361
+#: rc.cpp:95
+#, no-c-format
+msgid "Alt+K"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 371
+#: rc.cpp:98
+#, no-c-format
+msgid "KHTMLPart security"
+msgstr "Zabezpečení KHTMLPart"
+
+#. i18n: file kchmsetupdialog.ui line 382
+#: rc.cpp:101
+#, no-c-format
+msgid "Enable Java&Script"
+msgstr "Povolit Java&Script"
+
+#. i18n: file kchmsetupdialog.ui line 385
+#: rc.cpp:104
+#, no-c-format
+msgid "Alt+S"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 393
+#: rc.cpp:107
+#, no-c-format
+msgid "Enable &plugins"
+msgstr "&Povolit moduly"
+
+#. i18n: file kchmsetupdialog.ui line 396
+#: rc.cpp:110
+#, no-c-format
+msgid "Alt+P"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 404
+#: rc.cpp:113
+#, no-c-format
+msgid "Enable &Java"
+msgstr "Povolit &Javu"
+
+#. i18n: file kchmsetupdialog.ui line 407
+#: rc.cpp:116
+#, no-c-format
+msgid "Alt+J"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 415
+#: rc.cpp:119
+#, no-c-format
+msgid "Enable &refresh"
+msgstr "Povolit obnovení"
+
+#. i18n: file kchmsetupdialog.ui line 418
+#: rc.cpp:122
+#, no-c-format
+msgid "Alt+R"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 432
+#: rc.cpp:125
+#, no-c-format
+msgid "Advanced"
+msgstr "Rozšířené nastavení"
+
+#. i18n: file kchmsetupdialog.ui line 443
+#: rc.cpp:128
+#, no-c-format
+msgid "View HTML source command uses"
+msgstr "Prohlížeč zdrojového kódu HTML"
+
+#. i18n: file kchmsetupdialog.ui line 454
+#: rc.cpp:131
+#, no-c-format
+msgid "Built-in HTML source viewer"
+msgstr "Zabudovaný prohlížeč zdrojového kódu"
+
+#. i18n: file kchmsetupdialog.ui line 465
+#: rc.cpp:135
+#, no-c-format
+msgid "E&xternal program, specified below"
+msgstr "E&xterní program uvedený níže"
+
+#. i18n: file kchmsetupdialog.ui line 468
+#: rc.cpp:138
+#, no-c-format
+msgid "Alt+X"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 484
+#: rc.cpp:141
+#, no-c-format
+msgid "External program:"
+msgstr "Externí prohlížeč:"
+
+#. i18n: file kchmsetupdialog.ui line 501
+#: rc.cpp:144
+#, fuzzy, no-c-format
+msgid "Search engine to use"
+msgstr "Hledání nevedlo k žádnému výsledku"
+
+#. i18n: file kchmsetupdialog.ui line 528
+#: rc.cpp:148
+#, no-c-format
+msgid ""
+"Use the search based on internal CHM index. This engine cannot search for "
+"any symbols except underscode, does not support multibyte languages, and is "
+"not always available."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 555
+#: rc.cpp:152
+#, no-c-format
+msgid ""
+"Use new kchmviewer internal search engine (recommended). This engine "
+"indexes symbols, so it is possible to search for special symbols (like \"C++"
+"\"). All languages are supported. The index will be generated before the "
+"first search."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 588
+#: rc.cpp:158
+#, no-c-format
+msgid "F1"
+msgstr ""
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Hynek Fabian"
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "radonek@gmail.com"
+
+#: kchmbookmarkwindow.cpp:44
+msgid "&Add"
+msgstr "Přid&at"
+
+#: kchmbookmarkwindow.cpp:46
+msgid "&Del"
+msgstr "O&dstranit"
+
+#: kchmbookmarkwindow.cpp:88
+msgid "%1 - add a bookmark"
+msgstr "%1 - vložení záložky"
+
+#: kchmbookmarkwindow.cpp:89 kchmbookmarkwindow.cpp:131
+msgid "Enter the name for this bookmark:"
+msgstr "Zadejte jméno záložky"
+
+#: kchmbookmarkwindow.cpp:130
+msgid "%1 - edit the bookmark name"
+msgstr "%1 - změna názvu záložky"
+
+#: kchmbookmarkwindow.cpp:201
+msgid "&Add bookmark"
+msgstr "Přid&at záložku"
+
+#: kchmdialogchooseurlfromlist.cpp:34
+msgid "Topics"
+msgstr "Témata"
+
+#: kchmdialogchooseurlfromlist.cpp:39
+msgid "Please select one of the topics below:"
+msgstr "Zvolte si jedno z níže uvedených témat:"
+
+#: kchmdialogchooseurlfromlist.cpp:43
+msgid "&Ok"
+msgstr ""
+
+#: kchmmainwindow.cpp:122
+#, fuzzy
+msgid ""
+"%1 version %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2004-2007\n"
+"http://www.kchmviewer.net\n"
+"\n"
+"Licensed under GNU GPL license.\n"
+"\n"
+"Please check my another project, http://www.transientmail.com - temporary e-"
+"mail address, which expires automatically."
+msgstr ""
+"%1 verze %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2005-2006\n"
+"www.kchmviewer.net\n"
+"\n"
+"Licencováno GNU GPL.\n"
+"\n"
+"Zkuste náš další projekt, www.transientmail.com - dočasná adresa "
+"elektronické pošty která časem sama zaniká."
+
+#: kchmmainwindow.cpp:139
+msgid "*.chm|Compressed Help Manual (*.chm)"
+msgstr "*.chm|Soubory nápovědy (*.chm)"
+
+#: kchmmainwindow.cpp:141
+msgid "Compressed Help Manual (*.chm)"
+msgstr "Soubory nápovědy (*.chm)"
+
+#: kchmmainwindow.cpp:151
+msgid "Loading aborted"
+msgstr "Načítaní přerušeno"
+
+#: kchmmainwindow.cpp:261
+msgid "%1 - failed to load the chm file"
+msgstr "%1 - načtení souboru s nápovědou se nezdařilo"
+
+#: kchmmainwindow.cpp:262
+msgid "Unable to load the chm file %1"
+msgstr "Nepovedlo se načíst soubor nápovědy %1"
+
+#: kchmmainwindow.cpp:272
+msgid "Could not load file %1"
+msgstr "Nelze číst soubor %1"
+
+#: kchmmainwindow.cpp:288
+msgid "About %1"
+msgstr "O aplikaci %1"
+
+#: kchmmainwindow.cpp:374
+msgid "%1 - remote link clicked - %2"
+msgstr "%1 - aktivován externí odkaz - %2"
+
+#: kchmmainwindow.cpp:375
+msgid ""
+"A remote link %1 will start the external program to open it.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"Odkaz %1 bude otevřen v externím prohlížeči.\n"
+"\n"
+"Přejete si pokračovat?"
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&Yes"
+msgstr "&Ano"
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&No"
+msgstr "&Ne"
+
+#: kchmmainwindow.cpp:400
+msgid "%1 - JavsScript link clicked"
+msgstr "%1 - aktivován JavaScript odkaz"
+
+#: kchmmainwindow.cpp:401
+msgid ""
+"You have clicked a JavaScript link.\n"
+"To prevent security-related issues JavaScript URLs are disabled in CHM files."
+msgstr ""
+"Kliknuli jste na JavaScriptový odkaz\n"
+"Z bezpečnostních důvodů je použití JavaScriptových adres v souborech "
+"nápovědy potlačeno."
+
+#: kchmmainwindow.cpp:409
+msgid "%1 - link to a new CHM file clicked"
+msgstr "%1 - aktivován odkaz na CHM soubor"
+
+#: kchmmainwindow.cpp:410
+msgid ""
+"You have clicked a link, which leads to a new CHM file %1.\n"
+"The current file will be closed.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"Kliknuli jste na odkaz ukazující na soubor nápovědy %1.\n"
+"Aktuální soubor bude uzavřen.\n"
+"\n"
+"Přejete si pokračovat ?"
+
+#: kchmmainwindow.cpp:474
+msgid "File Operations"
+msgstr "Práce se soubory"
+
+#: kchmmainwindow.cpp:478
+msgid "Open File"
+msgstr "Otevřít"
+
+#: kchmmainwindow.cpp:484
+msgid "Click this button to open an existing chm file."
+msgstr "Výběr existujícího souboru nápovědy k prohlížení"
+
+#: kchmmainwindow.cpp:489
+msgid "Print File"
+msgstr "Tisk"
+
+#: kchmmainwindow.cpp:495
+msgid "Click this button to print the current page"
+msgstr "Stiskem toho tlačítka vytisknete současnou stránku"
+
+#: kchmmainwindow.cpp:510
+msgid "E&xtract CHM content..."
+msgstr "Ro&zbalit..."
+
+#: kchmmainwindow.cpp:511
+msgid ""
+"Click this button to extract the whole CHM file content into a specific "
+"directory"
+msgstr ""
+"Tímto tlačítkem extrahujete obsah souboru nápovědy do zadaného adresáře"
+
+#: kchmmainwindow.cpp:517
+msgid "&Recent files"
+msgstr "Ot&evřít nedávný"
+
+#: kchmmainwindow.cpp:526
+msgid "&Select all"
+msgstr "&Vybrat vše"
+
+#: kchmmainwindow.cpp:544
+msgid "&Change settings..."
+msgstr "&Změnit nastavení"
+
+#: kchmmainwindow.cpp:551
+msgid "About &Qt"
+msgstr "O &Qt"
+
+#: kchmmainwindow.cpp:553
+msgid "What's &This"
+msgstr "Co je &tohle ?"
+
+#: kchmmainwindow.cpp:836
+msgid ""
+"Changing browser view options or search engine used\n"
+"requires restarting the application to take effect."
+msgstr ""
+
+#: kchmmainwindow.cpp:954
+msgid "Index"
+msgstr "Obsah"
+
+#: kchmmainwindow.cpp:977 kchmsearchengine.cpp:246
+msgid "Search"
+msgstr "Hledání"
+
+#: kchmmainwindow.cpp:1044
+msgid "Could not locate opened topic in content window"
+msgstr "Téma nebylo nalezeno"
+
+#: kchmmainwindow.cpp:1056 kchmmainwindow.cpp:1062
+msgid "Choose a directory to store CHM content"
+msgstr "Zvolte cílový adresář"
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting CHM content"
+msgstr "Rozbaluji soubor nápovědy"
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting files..."
+msgstr "Extrakce souborů..."
+
+#: kchmmainwindow.cpp:1075
+msgid "Abort"
+msgstr "Přerušit"
+
+#: kchmnavtoolbar.cpp:33
+msgid "Navigation"
+msgstr "Navigace"
+
+#: kchmnavtoolbar.cpp:37
+msgid "Move backward in history"
+msgstr "Předchozí"
+
+#: kchmnavtoolbar.cpp:42
+msgid "Click this button to move backward in browser history"
+msgstr "Přesun v historii o krok zpět"
+
+#: kchmnavtoolbar.cpp:46
+msgid "Move forward in history"
+msgstr "Vpřed"
+
+#: kchmnavtoolbar.cpp:51
+msgid "Click this button to move forward in browser history"
+msgstr "Přesun v historii o krok vpřed"
+
+#: kchmnavtoolbar.cpp:55
+msgid "Go to the home page"
+msgstr "Úvodní stránka"
+
+#: kchmnavtoolbar.cpp:60
+msgid "Click this button to move to the home page"
+msgstr "Přesun na úvodní stranu"
+
+#: kchmsearchengine.cpp:246
+msgid "A closing quote character is missing."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:50
+msgid "Find in page"
+msgstr "Hledání na stránce"
+
+#: kchmsearchtoolbar.cpp:67
+msgid "Enter here the text to search in the current page."
+msgstr "Zde zadaný text bude vyhledán na aktuální stránce"
+
+#: kchmsearchtoolbar.cpp:74
+msgid "Previous search result"
+msgstr "Předešlý výsledek hledání"
+
+#: kchmsearchtoolbar.cpp:79
+msgid "Click this button to find previous search result."
+msgstr "Stiskem toho tlačítka se vrátíte předešlý nalezený výraz"
+
+#: kchmsearchtoolbar.cpp:83
+msgid "Next search result"
+msgstr "Další výsledek hledání"
+
+#: kchmsearchtoolbar.cpp:88
+msgid "Click this button to find next search result."
+msgstr "Stiskem tohoto tlačítka se přesunete na další výskyt hledaného výrazu"
+
+#: kchmsearchtoolbar.cpp:92
+msgid "Locate this topic in content window"
+msgstr "Vyhledej toto téma"
+
+#: kchmsearchtoolbar.cpp:97
+msgid ""
+"Click this button to find current topic in the content window, and open it."
+msgstr "Stiskem tohoto tlačítka otevřete okno s obsahem na aktuálním tématu"
+
+#: kchmsearchtoolbar.cpp:101
+msgid "Increase font size"
+msgstr "Zvětšit písmo"
+
+#: kchmsearchtoolbar.cpp:106
+msgid "Click this button to increase the font size."
+msgstr "Toto tlačítko zvětší velikost použitého písma"
+
+#: kchmsearchtoolbar.cpp:110
+msgid "Decrease font size"
+msgstr "Zmenšit písmo"
+
+#: kchmsearchtoolbar.cpp:115
+msgid "Click this button to decrease the font size."
+msgstr "Toto tlačítko zmenší velikost použítého písma"
+
+#: kchmsearchtoolbar.cpp:119
+msgid "View HTML source"
+msgstr "Zobrazit zdrojový kód"
+
+#: kchmsearchtoolbar.cpp:124
+msgid "Click this button to open a separate window with the page HTML source."
+msgstr ""
+"Stisknutím tohoto tlačítka otevřete okno s HTML zdrojovým kódem stránky"
+
+#: kchmsearchtoolbar.cpp:128
+msgid "Add to bookmarks"
+msgstr "Přidat k záložkám"
+
+#: kchmsearchtoolbar.cpp:133
+msgid "Click this button to add the current page to the bookmarks list."
+msgstr "Tímto čudlíkem přidáte aktuální stránku mezi záložky"
+
+#: kchmsearchtoolbar.cpp:136
+msgid "Prev page in TOC"
+msgstr "Předchozí stránka"
+
+#: kchmsearchtoolbar.cpp:141
+msgid "Click this button to go to previous page in Table Of Content."
+msgstr "Přesun na obsahově předcházející stránku"
+
+#: kchmsearchtoolbar.cpp:144
+msgid "Next page in TOC"
+msgstr "Následující stránka"
+
+#: kchmsearchtoolbar.cpp:149
+msgid "Click this button to go to next page in Table of Content."
+msgstr "Přesun na obsahově následující stránku"
+
+#: kchmsearchtoolbar.cpp:155
+msgid "&Increase font"
+msgstr "Z&většit písmo"
+
+#: kchmsearchtoolbar.cpp:156
+msgid "&Decrease font"
+msgstr "Z&menšit písmo"
+
+#: kchmsearchtoolbar.cpp:157
+msgid "&View HTML source"
+msgstr "&Zobrazit zdroj"
+
+#: kchmsearchtoolbar.cpp:160
+msgid "&Bookmark this page"
+msgstr "&Přidat záložku"
+
+#: kchmsearchtoolbar.cpp:163
+msgid "&Full screen"
+msgstr "&Celá obrazovka"
+
+#: kchmsearchtoolbar.cpp:165
+msgid "&Show contents window"
+msgstr "&Okno obsahu"
+
+#: kchmsearchtoolbar.cpp:167
+msgid "&Locate in contents window"
+msgstr "&Najít v obsahu"
+
+#: kchmsearchtoolbar.cpp:220
+msgid "&Set language"
+msgstr "Vybrat &jazyk"
+
+#: kchmsearchtoolbar.cpp:243
+msgid "&Set codepage"
+msgstr "Vybrat &kódování"
+
+#: kchmsearchwindow.cpp:43
+msgid "Type in word(s) to search for:"
+msgstr "Zadejte hledaná slova:"
+
+#: kchmsearchwindow.cpp:46
+msgid "<a href=\"q\"><b>Help</b></a>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:58
+msgid "Go"
+msgstr ""
+
+#: kchmsearchwindow.cpp:66
+msgid "Title"
+msgstr "Titul"
+
+#: kchmsearchwindow.cpp:67
+msgid "Location"
+msgstr "Umístění"
+
+#: kchmsearchwindow.cpp:130
+msgid "Search returned %1 result(s)"
+msgstr "Nalezeno %1 výsledků"
+
+#: kchmsearchwindow.cpp:133
+msgid "Search returned no results"
+msgstr "Hledání nevedlo k žádnému výsledku"
+
+#: kchmsearchwindow.cpp:136 kchmviewwindow_qtextbrowser.cpp:211
+msgid "Search failed"
+msgstr "Hledání se nezdařilo"
+
+#: kchmsearchwindow.cpp:169 kchmsearchwindow.cpp:175
+msgid "How to use search"
+msgstr "Jak používat vyhledávání"
+
+#: kchmsearchwindow.cpp:170
+msgid ""
+"<html><p>The improved search engine allows you to search for a word, symbol "
+"or phrase, which is set of words and symbols included in quotes. Only the "
+"documents which include all the terms speficide in th search query are "
+"shown; no prefixes needed.<p>Unlike MS CHM internal search index, my "
+"improved search engine indexes everything, including special symbols. "
+"Therefore it is possible to search (and find!) for something like <i>$q = "
+"new ChmFile();</i>. This search also fully supports Unicode, which means "
+"that you can search in non-English documents.<p>If you want to search for a "
+"quote symbol, use quotation mark instead. The engine treats a quote and a "
+"quotation mark as the same symbol, which allows to use them in phrases.</"
+"html>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:176
+msgid ""
+"The search query can contain a few prefixes.\n"
+"A set of words inside the quote marks mean that you are searching for exact "
+"phrase.\n"
+"A word with minus sign means that it should be absent in the search result.\n"
+"A word with plus mark or without any mark means that it must be present in "
+"the search result.\n"
+"\n"
+"Note that only letters and digits are indexed.\n"
+"You cannot search for non-character symbols other than underscope, and those "
+"symbols will be removed from the search query.\n"
+"For example, search for 'C' will give the same result as searching for 'C++'."
+msgstr ""
+"Hledaný výraz může obsahovat několik prefixů.\n"
+"Vložení několika slov do uvozovek značí že chcete najít přesnou frázi.\n"
+"Slovo se znaménkem minus se ve výsledku nebude vyskytovat.\n"
+"Slovo se znaménkem plus nebo bez znaménka musí být ve výsledku přítomno.\n"
+"\n"
+"Hledání bere v úvahu pouze písmena, číslice a znak podtržítka.\n"
+"Ostatní znaky budou z hledaného výrazu odstraněny.\n"
+"Například hledání 'C' povede ke stejným výsledkům jako hledaní 'C++'."
+
+#: kchmsearchwindow.cpp:226
+#, fuzzy
+msgid "Search is not available"
+msgstr "Hledání se nezdařilo"
+
+#: kchmsearchwindow.cpp:227
+msgid ""
+"<p>The search feature is not avaiable for this chm file.<p>The old search "
+"engine depends on indexes present in chm files itself. Not every chm file "
+"has an index; it is set up during chm file creation. Therefore if the search "
+"index was not created during chm file creation, this makes search impossible."
+"<p>Solution: use new search engine (menu Settings/Advanced), which generates "
+"its own index."
+msgstr ""
+
+#: kchmviewwindow_qtextbrowser.cpp:171
+msgid "Printing (page %1)..."
+msgstr "Probíhá tisk strany %1 ..."
+
+#: kchmviewwindow_qtextbrowser.cpp:179
+msgid "Printing completed"
+msgstr "Tisk dokončen"
+
+#: kchmviewwindow_qtextbrowser.cpp:183
+msgid "Printing aborted"
+msgstr "Tisk přerušen"
+
+#: kchmviewwindow_qtextbrowser.cpp:189
+msgid "%1 - could not print"
+msgstr "%1 - nelze tisknout"
+
+#: kchmviewwindow_qtextbrowser.cpp:190
+msgid ""
+"Could not print.\n"
+"Your Qt library has been compiled without printing support"
+msgstr ""
+"Není možné tisknout.\n"
+"Vaše knihovna Qt byla přeložena bez podpory tisku."
+
+#: kchmviewwindowmgr.cpp:65
+msgid "&Window"
+msgstr "&Okno"
+
+#: main.cpp:46
+msgid ""
+"'--search <query>' specifies the search query to search, and activate the "
+"first entry if found"
+msgstr ""
+
+#: main.cpp:47
+msgid ""
+"'--sindex <word>' specifies the word to find in index, and activate if found"
+msgstr ""
+
+#: main.cpp:54
+msgid "CHM file viewer"
+msgstr "Prohlížeč CHM souborů"
+
+#~ msgid "Match similar words"
+#~ msgstr "Podobná slova"
diff --git a/po/du.po b/po/du.po
new file mode 100644
index 0000000..a166a43
--- /dev/null
+++ b/po/du.po
@@ -0,0 +1,870 @@
+# translation of du.po to
+# This file is put in the public domain.
+#
+# Rinse de Vries <rinsedevries@kde.nl>, 2006.
+# Rinse de Vries <rinsedevries@home.nl>, 2006.
+msgid ""
+msgstr ""
+"Project-Id-Version: du\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-03-13 20:31-0700\n"
+"PO-Revision-Date: 2006-09-09 22:48+0200\n"
+"Last-Translator: Rinse de Vries <rinsedevries@home.nl>\n"
+"Language-Team: <nl@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. i18n: file kchmsetupdialog.ui line 24
+#: rc.cpp:3
+#, no-c-format
+msgid "KchmViewer settings"
+msgstr "KchmViewer instellen"
+
+#. i18n: file kchmsetupdialog.ui line 54
+#: rc.cpp:6
+#, no-c-format
+msgid "General behavior"
+msgstr "Algemeen gedrag"
+
+#. i18n: file kchmsetupdialog.ui line 73
+#: rc.cpp:9
+#, no-c-format
+msgid "If no arguments given on load"
+msgstr "Als er geen argumenten zijn meegegeven bij het laden"
+
+#. i18n: file kchmsetupdialog.ui line 84
+#: rc.cpp:12
+#, no-c-format
+msgid "Open the 'open CHM file' dialog"
+msgstr "Open de dialoog 'CHM-bestand openen'"
+
+#. i18n: file kchmsetupdialog.ui line 92
+#: rc.cpp:15
+#, no-c-format
+msgid "Open the &last used CHM file, if exist"
+msgstr "Open het &laatstgebruikte CHM-bestand, als dat bestaat"
+
+#. i18n: file kchmsetupdialog.ui line 95
+#: rc.cpp:18
+#, no-c-format
+msgid "Alt+L"
+msgstr "Alt+L"
+
+#. i18n: file kchmsetupdialog.ui line 105
+#: rc.cpp:21
+#, no-c-format
+msgid "History"
+msgstr "Geschiedenis"
+
+#. i18n: file kchmsetupdialog.ui line 124
+#: rc.cpp:24
+#, no-c-format
+msgid "Store history information for"
+msgstr "Geschiedenis opslaan voor"
+
+#. i18n: file kchmsetupdialog.ui line 143
+#: rc.cpp:28
+#, no-c-format
+msgid "latest files"
+msgstr "laatste bestanden"
+
+#. i18n: file kchmsetupdialog.ui line 153
+#: rc.cpp:31
+#, no-c-format
+msgid "R&emember extra information for history files"
+msgstr "Extra info&rmatie voor geschiedenisbestanden onthouden"
+
+#. i18n: file kchmsetupdialog.ui line 156
+#: rc.cpp:34
+#, no-c-format
+msgid "Alt+E"
+msgstr "Alt+E"
+
+#. i18n: file kchmsetupdialog.ui line 159
+#: rc.cpp:37
+#, no-c-format
+msgid ""
+"Remembers the information about the files, which were opened. Remembers last "
+"opened page, search history, font size, bookmarks and so on."
+msgstr ""
+"Onthoudt de informatie over de bestanden die geopend zijn. Onthoudt de "
+"laatstgeopende pagina, zoekgeschiedenis, tekengrootte, bladwijzers, etc."
+
+#. i18n: file kchmsetupdialog.ui line 171
+#: rc.cpp:40
+#, no-c-format
+msgid "CHM security settings"
+msgstr "CHM-beveiliging instellen"
+
+#. i18n: file kchmsetupdialog.ui line 182
+#: rc.cpp:43
+#, no-c-format
+msgid "When external link clicked"
+msgstr "Wanneer externe koppelingen aangeklikt worden"
+
+#. i18n: file kchmsetupdialog.ui line 193
+#: rc.cpp:46
+#, no-c-format
+msgid "Alwa&ys open it in external browser"
+msgstr "Altijd openen in e&xterne browser"
+
+#. i18n: file kchmsetupdialog.ui line 196
+#: rc.cpp:49
+#, no-c-format
+msgid "Alt+Y"
+msgstr "Alt+Y"
+
+#. i18n: file kchmsetupdialog.ui line 204
+#. i18n: file kchmsetupdialog.ui line 244
+#: rc.cpp:52 rc.cpp:65
+#, no-c-format
+msgid "Ask for confirmation"
+msgstr "Om bevestiging vragen"
+
+#. i18n: file kchmsetupdialog.ui line 212
+#: rc.cpp:55
+#, no-c-format
+msgid "Do not open the link"
+msgstr "Koppeling niet volgen"
+
+#. i18n: file kchmsetupdialog.ui line 225
+#: rc.cpp:59
+#, no-c-format
+msgid "When link pointed to a new CHM file clicked"
+msgstr ""
+"Als een koppeling die naar een nieuw CHM-bestand verwijst wordt aangeklikt"
+
+#. i18n: file kchmsetupdialog.ui line 236
+#: rc.cpp:62
+#, no-c-format
+msgid "Always open a new CHM file"
+msgstr "Altijd een nieuw CHM-bestand openen"
+
+#. i18n: file kchmsetupdialog.ui line 252
+#: rc.cpp:68
+#, no-c-format
+msgid "Do not open a new CHM file"
+msgstr "Geen nieuw CHM-bestand openen"
+
+#. i18n: file kchmsetupdialog.ui line 266
+#: rc.cpp:71
+#, no-c-format
+msgid "Version-specific settings"
+msgstr "Versiespecifieke instellingen"
+
+#. i18n: file kchmsetupdialog.ui line 277
+#: rc.cpp:74
+#, no-c-format
+msgid "Qt version settings"
+msgstr "Qt-versie instellen"
+
+#. i18n: file kchmsetupdialog.ui line 299
+#: rc.cpp:77
+#, no-c-format
+msgid ""
+"Enter the path to the program, which will be used as a browser for external "
+"links. A <i>%s</i> symbol will be replaced by the URL clicked."
+msgstr ""
+"Voer het pad naar het programma in dat zal worden gebruikt als externe "
+"browser voor externe koppelingen. De plaatshouder <i>%s</i> zal worden "
+"vervangen door het URL-adres dat is aangeklikt."
+
+#. i18n: file kchmsetupdialog.ui line 325
+#: rc.cpp:80
+#, no-c-format
+msgid "KDE version settings"
+msgstr "KDE-versie instellen"
+
+#. i18n: file kchmsetupdialog.ui line 336
+#: rc.cpp:83
+#, no-c-format
+msgid "To show HTML content, use"
+msgstr "Om HTML-inhoud te tonen, gebruik"
+
+#. i18n: file kchmsetupdialog.ui line 347
+#: rc.cpp:86
+#, no-c-format
+msgid "&QTextBrowser-based widget"
+msgstr "&QTextBrowser-gebaseerde widget"
+
+#. i18n: file kchmsetupdialog.ui line 350
+#: rc.cpp:89
+#, no-c-format
+msgid "Alt+Q"
+msgstr "Alt+Q"
+
+#. i18n: file kchmsetupdialog.ui line 358
+#: rc.cpp:92
+#, no-c-format
+msgid "&KHTMLPart-based widget"
+msgstr "&KHTMLPart-gebaseerde widget"
+
+#. i18n: file kchmsetupdialog.ui line 361
+#: rc.cpp:95
+#, no-c-format
+msgid "Alt+K"
+msgstr "Alt+K"
+
+#. i18n: file kchmsetupdialog.ui line 371
+#: rc.cpp:98
+#, no-c-format
+msgid "KHTMLPart security"
+msgstr "Veiligheid voor KHTMLPart"
+
+#. i18n: file kchmsetupdialog.ui line 382
+#: rc.cpp:101
+#, no-c-format
+msgid "Enable Java&Script"
+msgstr "Java&Script activeren"
+
+#. i18n: file kchmsetupdialog.ui line 385
+#: rc.cpp:104
+#, no-c-format
+msgid "Alt+S"
+msgstr "Alt+S"
+
+#. i18n: file kchmsetupdialog.ui line 393
+#: rc.cpp:107
+#, no-c-format
+msgid "Enable &plugins"
+msgstr "&Plugins activeren"
+
+#. i18n: file kchmsetupdialog.ui line 396
+#: rc.cpp:110
+#, no-c-format
+msgid "Alt+P"
+msgstr "Alt+P"
+
+#. i18n: file kchmsetupdialog.ui line 404
+#: rc.cpp:113
+#, no-c-format
+msgid "Enable &Java"
+msgstr "&Java activeren"
+
+#. i18n: file kchmsetupdialog.ui line 407
+#: rc.cpp:116
+#, no-c-format
+msgid "Alt+J"
+msgstr "Alt+J"
+
+#. i18n: file kchmsetupdialog.ui line 415
+#: rc.cpp:119
+#, no-c-format
+msgid "Enable &refresh"
+msgstr "Ve&rversen activeren"
+
+#. i18n: file kchmsetupdialog.ui line 418
+#: rc.cpp:122
+#, no-c-format
+msgid "Alt+R"
+msgstr "Alt+R"
+
+#. i18n: file kchmsetupdialog.ui line 432
+#: rc.cpp:125
+#, no-c-format
+msgid "Advanced"
+msgstr "Geavanceerd"
+
+#. i18n: file kchmsetupdialog.ui line 443
+#: rc.cpp:128
+#, no-c-format
+msgid "View HTML source command uses"
+msgstr "Commando 'HTML-bron tonen' gebruikt"
+
+#. i18n: file kchmsetupdialog.ui line 454
+#: rc.cpp:131
+#, no-c-format
+msgid "Built-in HTML source viewer"
+msgstr "Ingebouwde viewer voor HTML-bron"
+
+#. i18n: file kchmsetupdialog.ui line 465
+#: rc.cpp:135
+#, no-c-format
+msgid "E&xternal program, specified below"
+msgstr "E&xtern programma, hieronder opgegeven"
+
+#. i18n: file kchmsetupdialog.ui line 468
+#: rc.cpp:138
+#, no-c-format
+msgid "Alt+X"
+msgstr "Alt+X"
+
+#. i18n: file kchmsetupdialog.ui line 484
+#: rc.cpp:141
+#, no-c-format
+msgid "External program:"
+msgstr "Extern programma:"
+
+#. i18n: file kchmsetupdialog.ui line 501
+#: rc.cpp:144
+#, fuzzy, no-c-format
+msgid "Search engine to use"
+msgstr "Zoekopdracht gaf geen resultaten"
+
+#. i18n: file kchmsetupdialog.ui line 528
+#: rc.cpp:148
+#, no-c-format
+msgid ""
+"Use the search based on internal CHM index. This engine cannot search for "
+"any symbols except underscode, does not support multibyte languages, and is "
+"not always available."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 555
+#: rc.cpp:152
+#, no-c-format
+msgid ""
+"Use new kchmviewer internal search engine (recommended). This engine "
+"indexes symbols, so it is possible to search for special symbols (like \"C++"
+"\"). All languages are supported. The index will be generated before the "
+"first search."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 588
+#: rc.cpp:158
+#, no-c-format
+msgid "F1"
+msgstr "F1"
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Rinse de Vries"
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "rinsedevries@kde.nl"
+
+#: kchmbookmarkwindow.cpp:44
+msgid "&Add"
+msgstr "&Toev."
+
+#: kchmbookmarkwindow.cpp:46
+msgid "&Del"
+msgstr "&Verw."
+
+#: kchmbookmarkwindow.cpp:88
+msgid "%1 - add a bookmark"
+msgstr "%1 - voeg een bladwijzer toe"
+
+#: kchmbookmarkwindow.cpp:89 kchmbookmarkwindow.cpp:131
+msgid "Enter the name for this bookmark:"
+msgstr "Voer de naam in van deze bladwijzer:"
+
+#: kchmbookmarkwindow.cpp:130
+msgid "%1 - edit the bookmark name"
+msgstr "%1 - bewerk de bladwijzernaam"
+
+#: kchmbookmarkwindow.cpp:201
+msgid "&Add bookmark"
+msgstr "Bl&adwijzer toevoegen"
+
+#: kchmdialogchooseurlfromlist.cpp:34
+msgid "Topics"
+msgstr "Onderwerpen"
+
+#: kchmdialogchooseurlfromlist.cpp:39
+msgid "Please select one of the topics below:"
+msgstr "Selecteer hieronder een van de onderwerpen:"
+
+#: kchmdialogchooseurlfromlist.cpp:43
+msgid "&Ok"
+msgstr "&OK"
+
+#: kchmmainwindow.cpp:122
+#, fuzzy
+msgid ""
+"%1 version %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2004-2007\n"
+"http://www.kchmviewer.net\n"
+"\n"
+"Licensed under GNU GPL license.\n"
+"\n"
+"Please check my another project, http://www.transientmail.com - temporary e-"
+"mail address, which expires automatically."
+msgstr ""
+"%1 versie %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2005-2006\n"
+"www.kchmviewer.net\n"
+"\n"
+"Gelicenseerd onder de GNU GPL-licentie.\n"
+"\n"
+"Probeer ook ons andere project, www.transientmail.com - tijdelijk e-"
+"mailadres dat automatisch verloopt."
+
+#: kchmmainwindow.cpp:139
+msgid "*.chm|Compressed Help Manual (*.chm)"
+msgstr "*.chm|Compressed Help Manual (*.chm)"
+
+#: kchmmainwindow.cpp:141
+msgid "Compressed Help Manual (*.chm)"
+msgstr "Compressed Help Manual (*.chm)"
+
+#: kchmmainwindow.cpp:151
+msgid "Loading aborted"
+msgstr "Laden afgebroken"
+
+#: kchmmainwindow.cpp:261
+msgid "%1 - failed to load the chm file"
+msgstr "%1 - laden van chm-bestand is mislukt"
+
+#: kchmmainwindow.cpp:262
+msgid "Unable to load the chm file %1"
+msgstr "chm-bestand %1 kon niet worden geladen"
+
+#: kchmmainwindow.cpp:272
+msgid "Could not load file %1"
+msgstr "Kon het bestand %1 niet laden."
+
+#: kchmmainwindow.cpp:288
+msgid "About %1"
+msgstr "Info over %1"
+
+#: kchmmainwindow.cpp:374
+msgid "%1 - remote link clicked - %2"
+msgstr "%1 - externe koppeling aangeklikt %2"
+
+#: kchmmainwindow.cpp:375
+msgid ""
+"A remote link %1 will start the external program to open it.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"De externe koppeling %1 zal het externe programma starten om haar te "
+"openen.\n"
+"\n"
+"Wilt u doorgaan?"
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&Yes"
+msgstr "&Ja"
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&No"
+msgstr "&Nee"
+
+#: kchmmainwindow.cpp:400
+msgid "%1 - JavsScript link clicked"
+msgstr "%1 - JavaScript-koppeling aangeklikt"
+
+#: kchmmainwindow.cpp:401
+msgid ""
+"You have clicked a JavaScript link.\n"
+"To prevent security-related issues JavaScript URLs are disabled in CHM files."
+msgstr ""
+"U hebt op een JavaScript-koppeling geklikt.\n"
+"Om veiligheidgerelateerde problemen te voorkomen zijn JavaScript-koppelingen "
+"uitgeschakeld in CHM-bestanden."
+
+#: kchmmainwindow.cpp:409
+msgid "%1 - link to a new CHM file clicked"
+msgstr "%1 - koppeling naar nieuw CHM-bestand aangeklikt"
+
+#: kchmmainwindow.cpp:410
+msgid ""
+"You have clicked a link, which leads to a new CHM file %1.\n"
+"The current file will be closed.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"U hebt op een koppeling geklikt die leidt naar het nieuwe CHM-bestand %1.\n"
+"Het huidige bestand zal worden gesloten.\n"
+"\n"
+"Wilt u doorgaan?"
+
+#: kchmmainwindow.cpp:474
+msgid "File Operations"
+msgstr "Bestandsoperaties"
+
+#: kchmmainwindow.cpp:478
+msgid "Open File"
+msgstr "Bestand openen"
+
+#: kchmmainwindow.cpp:484
+msgid "Click this button to open an existing chm file."
+msgstr "Klik op deze knop om een bestaand CHM-bestand te openen."
+
+#: kchmmainwindow.cpp:489
+msgid "Print File"
+msgstr "Bestand afdrukken"
+
+#: kchmmainwindow.cpp:495
+msgid "Click this button to print the current page"
+msgstr "Klik op deze knop om de huidige pagina af te drukken"
+
+#: kchmmainwindow.cpp:510
+msgid "E&xtract CHM content..."
+msgstr "CHM-inhoud &uitpakken..."
+
+#: kchmmainwindow.cpp:511
+msgid ""
+"Click this button to extract the whole CHM file content into a specific "
+"directory"
+msgstr ""
+"Klik op deze knop om het hele CHM-bestand uit te pakken naar een specifieke "
+"map"
+
+#: kchmmainwindow.cpp:517
+msgid "&Recent files"
+msgstr "&Recente bestanden"
+
+#: kchmmainwindow.cpp:526
+msgid "&Select all"
+msgstr "Alles &selecteren"
+
+#: kchmmainwindow.cpp:544
+msgid "&Change settings..."
+msgstr "Instellingen wij&zigen..."
+
+#: kchmmainwindow.cpp:551
+msgid "About &Qt"
+msgstr "Over &Qt"
+
+#: kchmmainwindow.cpp:553
+msgid "What's &This"
+msgstr "Wat is di&t"
+
+#: kchmmainwindow.cpp:836
+msgid ""
+"Changing browser view options or search engine used\n"
+"requires restarting the application to take effect."
+msgstr ""
+
+#: kchmmainwindow.cpp:954
+msgid "Index"
+msgstr "Index"
+
+#: kchmmainwindow.cpp:977 kchmsearchengine.cpp:246
+msgid "Search"
+msgstr "Zoeken"
+
+#: kchmmainwindow.cpp:1044
+msgid "Could not locate opened topic in content window"
+msgstr "Het geopende onderwerp kon niet in het tekstvender gevonden worden"
+
+#: kchmmainwindow.cpp:1056 kchmmainwindow.cpp:1062
+msgid "Choose a directory to store CHM content"
+msgstr "Kies een map om de CHM-inhoud in op te slaan"
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting CHM content"
+msgstr "CHM-inhoud uitpakken"
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting files..."
+msgstr "Bestanden uitpakken..."
+
+#: kchmmainwindow.cpp:1075
+msgid "Abort"
+msgstr "Afbreken"
+
+#: kchmnavtoolbar.cpp:33
+msgid "Navigation"
+msgstr "Navigatie"
+
+#: kchmnavtoolbar.cpp:37
+msgid "Move backward in history"
+msgstr "Ga terug in de geschiedenis"
+
+#: kchmnavtoolbar.cpp:42
+msgid "Click this button to move backward in browser history"
+msgstr "Klik op deze knop om terug in de bladergeschiedenis te gaan."
+
+#: kchmnavtoolbar.cpp:46
+msgid "Move forward in history"
+msgstr "Ga vooruit in de geschiedenis"
+
+#: kchmnavtoolbar.cpp:51
+msgid "Click this button to move forward in browser history"
+msgstr "Klik op deze knop om vooruit in de bladergeschiedenis te gaan"
+
+#: kchmnavtoolbar.cpp:55
+msgid "Go to the home page"
+msgstr "Ga naar de beginpagina"
+
+#: kchmnavtoolbar.cpp:60
+msgid "Click this button to move to the home page"
+msgstr "Klik op deze knop om naar de beginpagina te gaan"
+
+#: kchmsearchengine.cpp:246
+msgid "A closing quote character is missing."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:50
+msgid "Find in page"
+msgstr "Zoeken in pagina"
+
+#: kchmsearchtoolbar.cpp:67
+msgid "Enter here the text to search in the current page."
+msgstr "Voer hier de tekst in waarna u in de huidige pagina wilt zoeken"
+
+#: kchmsearchtoolbar.cpp:74
+msgid "Previous search result"
+msgstr "Vorig zoekresultaat"
+
+#: kchmsearchtoolbar.cpp:79
+msgid "Click this button to find previous search result."
+msgstr "Klik op deze knop om naar het vorige zoekresultaat te gaan"
+
+#: kchmsearchtoolbar.cpp:83
+msgid "Next search result"
+msgstr "Volgend zoekresultaat"
+
+#: kchmsearchtoolbar.cpp:88
+msgid "Click this button to find next search result."
+msgstr "Klik op deze knop om naar het volgende zoekresultaat te gaan."
+
+#: kchmsearchtoolbar.cpp:92
+msgid "Locate this topic in content window"
+msgstr "Zoek dit onderwerp op in het tekstvenster"
+
+#: kchmsearchtoolbar.cpp:97
+msgid ""
+"Click this button to find current topic in the content window, and open it."
+msgstr ""
+"Klik op deze knop om het huidige onderwerp op te zoeken in het tekstvenster "
+"en te openen."
+
+#: kchmsearchtoolbar.cpp:101
+msgid "Increase font size"
+msgstr "Lettertekens vergroten"
+
+#: kchmsearchtoolbar.cpp:106
+msgid "Click this button to increase the font size."
+msgstr "Klik op deze knop om de tekst te vergroten."
+
+#: kchmsearchtoolbar.cpp:110
+msgid "Decrease font size"
+msgstr "Lettertekens verkleinen"
+
+#: kchmsearchtoolbar.cpp:115
+msgid "Click this button to decrease the font size."
+msgstr "Klik op deze knop om de tekst te verkleinen."
+
+#: kchmsearchtoolbar.cpp:119
+msgid "View HTML source"
+msgstr "HTML-bron tonen"
+
+#: kchmsearchtoolbar.cpp:124
+msgid "Click this button to open a separate window with the page HTML source."
+msgstr ""
+"Klik op deze knop om een apart venster te openen waarin de HTML-broncode "
+"wordt weergegeven."
+
+#: kchmsearchtoolbar.cpp:128
+msgid "Add to bookmarks"
+msgstr "Aan bladwijzers toevoegen"
+
+#: kchmsearchtoolbar.cpp:133
+msgid "Click this button to add the current page to the bookmarks list."
+msgstr ""
+"Klik op deze knop om de huidige pagina toe te voegen aan de lijst met "
+"bladwijzers."
+
+#: kchmsearchtoolbar.cpp:136
+msgid "Prev page in TOC"
+msgstr "Vorige pagina in inhoudsopgave"
+
+#: kchmsearchtoolbar.cpp:141
+msgid "Click this button to go to previous page in Table Of Content."
+msgstr ""
+"Klik op deze knop om naar de vorige pagina in de inhoudsopgave te gaan."
+
+#: kchmsearchtoolbar.cpp:144
+msgid "Next page in TOC"
+msgstr "Volgende pagina in inhoudsopgave"
+
+#: kchmsearchtoolbar.cpp:149
+msgid "Click this button to go to next page in Table of Content."
+msgstr ""
+"Klik op deze knop om naar de volgende pagina in de inhoudsopgave te gaan."
+
+#: kchmsearchtoolbar.cpp:155
+msgid "&Increase font"
+msgstr "Lettertekens ver&groten"
+
+#: kchmsearchtoolbar.cpp:156
+msgid "&Decrease font"
+msgstr "Lettertekens ver&kleinen"
+
+#: kchmsearchtoolbar.cpp:157
+msgid "&View HTML source"
+msgstr "HTML-bron &tonen"
+
+#: kchmsearchtoolbar.cpp:160
+msgid "&Bookmark this page"
+msgstr "&Bladwijzer voor deze pagina"
+
+#: kchmsearchtoolbar.cpp:163
+msgid "&Full screen"
+msgstr "&Volledig scherm"
+
+#: kchmsearchtoolbar.cpp:165
+msgid "&Show contents window"
+msgstr "Tek&stvenster tonen"
+
+#: kchmsearchtoolbar.cpp:167
+msgid "&Locate in contents window"
+msgstr "Zoeken in inhou&dsopgave"
+
+#: kchmsearchtoolbar.cpp:220
+msgid "&Set language"
+msgstr "Taal in&stellen"
+
+#: kchmsearchtoolbar.cpp:243
+msgid "&Set codepage"
+msgstr "Codepagina in&stellen"
+
+#: kchmsearchwindow.cpp:43
+msgid "Type in word(s) to search for:"
+msgstr "Voer de woorden in waarnaar u wilt zoeken:"
+
+#: kchmsearchwindow.cpp:46
+msgid "<a href=\"q\"><b>Help</b></a>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:58
+msgid "Go"
+msgstr ""
+
+#: kchmsearchwindow.cpp:66
+msgid "Title"
+msgstr "Titel"
+
+#: kchmsearchwindow.cpp:67
+msgid "Location"
+msgstr "Locatie"
+
+#: kchmsearchwindow.cpp:130
+msgid "Search returned %1 result(s)"
+msgstr "Zoekopdracht gaf %1 resultaten"
+
+#: kchmsearchwindow.cpp:133
+msgid "Search returned no results"
+msgstr "Zoekopdracht gaf geen resultaten"
+
+#: kchmsearchwindow.cpp:136 kchmviewwindow_qtextbrowser.cpp:211
+msgid "Search failed"
+msgstr "Zoekopdracht is mislukt"
+
+#: kchmsearchwindow.cpp:169 kchmsearchwindow.cpp:175
+msgid "How to use search"
+msgstr "Hoe de zoekopdracht te gebruiken"
+
+#: kchmsearchwindow.cpp:170
+msgid ""
+"<html><p>The improved search engine allows you to search for a word, symbol "
+"or phrase, which is set of words and symbols included in quotes. Only the "
+"documents which include all the terms speficide in th search query are "
+"shown; no prefixes needed.<p>Unlike MS CHM internal search index, my "
+"improved search engine indexes everything, including special symbols. "
+"Therefore it is possible to search (and find!) for something like <i>$q = "
+"new ChmFile();</i>. This search also fully supports Unicode, which means "
+"that you can search in non-English documents.<p>If you want to search for a "
+"quote symbol, use quotation mark instead. The engine treats a quote and a "
+"quotation mark as the same symbol, which allows to use them in phrases.</"
+"html>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:176
+msgid ""
+"The search query can contain a few prefixes.\n"
+"A set of words inside the quote marks mean that you are searching for exact "
+"phrase.\n"
+"A word with minus sign means that it should be absent in the search result.\n"
+"A word with plus mark or without any mark means that it must be present in "
+"the search result.\n"
+"\n"
+"Note that only letters and digits are indexed.\n"
+"You cannot search for non-character symbols other than underscope, and those "
+"symbols will be removed from the search query.\n"
+"For example, search for 'C' will give the same result as searching for 'C++'."
+msgstr ""
+"De zoekopdracht kan enkele voorvoegsels bevatten.\n"
+"Een set woorden tussen aanhalingstekens betekent dat u zoekt naar de exacte "
+"woordcombinatie.\n"
+"Een woord met het min-teken ervoor betekent dat dit woord niet in het "
+"zoekresultaat mag voorkomen.\n"
+"Een woord met het plus-teken ervoor betekent dat het in het zoekresultaat "
+"moet voorkomen.\n"
+"\n"
+"Onthoud dat alleen letters en cijfers worden geïndexeerd.\n"
+"U kunt niet zoeken naar symbolen (liggend streepje uitgezonderd), deze "
+"zullen uit de zoekopdracht worden verwijderd.\n"
+"Bijvoorbeeld, zoeken naar 'C' zal dezelfde resultaten geven als zoeken naar "
+"'C++'."
+
+#: kchmsearchwindow.cpp:226
+#, fuzzy
+msgid "Search is not available"
+msgstr "Zoekopdracht is mislukt"
+
+#: kchmsearchwindow.cpp:227
+msgid ""
+"<p>The search feature is not avaiable for this chm file.<p>The old search "
+"engine depends on indexes present in chm files itself. Not every chm file "
+"has an index; it is set up during chm file creation. Therefore if the search "
+"index was not created during chm file creation, this makes search impossible."
+"<p>Solution: use new search engine (menu Settings/Advanced), which generates "
+"its own index."
+msgstr ""
+
+#: kchmviewwindow_qtextbrowser.cpp:171
+msgid "Printing (page %1)..."
+msgstr "Afdrukken (pagina %1)..."
+
+#: kchmviewwindow_qtextbrowser.cpp:179
+msgid "Printing completed"
+msgstr "Afdrukken voltooid"
+
+#: kchmviewwindow_qtextbrowser.cpp:183
+msgid "Printing aborted"
+msgstr "Afdrukken afgebroken"
+
+#: kchmviewwindow_qtextbrowser.cpp:189
+msgid "%1 - could not print"
+msgstr "%1 - kon niet afdrukken"
+
+#: kchmviewwindow_qtextbrowser.cpp:190
+msgid ""
+"Could not print.\n"
+"Your Qt library has been compiled without printing support"
+msgstr ""
+"Kon niet afdrukken.\n"
+"Uw Qt-bibliotheek is gecompileerd zonder ondersteuning voor afdrukken"
+
+#: kchmviewwindowmgr.cpp:65
+msgid "&Window"
+msgstr "&Venster"
+
+#: main.cpp:46
+msgid ""
+"'--search <query>' specifies the search query to search, and activate the "
+"first entry if found"
+msgstr ""
+
+#: main.cpp:47
+msgid ""
+"'--sindex <word>' specifies the word to find in index, and activate if found"
+msgstr ""
+
+#: main.cpp:54
+msgid "CHM file viewer"
+msgstr "CHM-bestandsviewer"
+
+#~ msgid "Match similar words"
+#~ msgstr "Incl. overeenkomende woorden"
+
+#~ msgid "Shift+Enter"
+#~ msgstr "Shift+Enter"
+
+#~ msgid "Ctrl+Enter"
+#~ msgstr "Ctrl+Enter"
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..96af72e
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,878 @@
+# translation of kchmviewer.po to Fr_fr
+# This file is put in the public domain.
+#
+# Stephan Bellegy <stephan@bellegy.org>, 2006.
+# Sun Wukong <sun.wukong@rx3.net>, 2006.
+msgid ""
+msgstr ""
+"Project-Id-Version: kchmviewer\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-03-13 20:31-0700\n"
+"PO-Revision-Date: 2006-08-18 00:31+0200\n"
+"Last-Translator: Sun Wukong <sun.wukong@rx3.net>\n"
+"Language-Team: Fr_fr <kde-francophone@kde.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. i18n: file kchmsetupdialog.ui line 24
+#: rc.cpp:3
+#, no-c-format
+msgid "KchmViewer settings"
+msgstr "Paramétrage de KchmViewer"
+
+#. i18n: file kchmsetupdialog.ui line 54
+#: rc.cpp:6
+#, no-c-format
+msgid "General behavior"
+msgstr "Comportement général"
+
+#. i18n: file kchmsetupdialog.ui line 73
+#: rc.cpp:9
+#, no-c-format
+msgid "If no arguments given on load"
+msgstr "Si aucun argument n'a été spécifié au démarrage"
+
+#. i18n: file kchmsetupdialog.ui line 84
+#: rc.cpp:12
+#, no-c-format
+msgid "Open the 'open CHM file' dialog"
+msgstr "Ouvrir la boîte de dialogue «Ouvrir un fichier CHM»"
+
+#. i18n: file kchmsetupdialog.ui line 92
+#: rc.cpp:15
+#, no-c-format
+msgid "Open the &last used CHM file, if exist"
+msgstr "Ouvrir le &dernier fichier CHM s'il existe"
+
+#. i18n: file kchmsetupdialog.ui line 95
+#: rc.cpp:18
+#, no-c-format
+msgid "Alt+L"
+msgstr "Alt+D"
+
+#. i18n: file kchmsetupdialog.ui line 105
+#: rc.cpp:21
+#, no-c-format
+msgid "History"
+msgstr "Historique"
+
+#. i18n: file kchmsetupdialog.ui line 124
+#: rc.cpp:24
+#, no-c-format
+msgid "Store history information for"
+msgstr "Mémoriser l'historique pour"
+
+#. i18n: file kchmsetupdialog.ui line 143
+#: rc.cpp:28
+#, no-c-format
+msgid "latest files"
+msgstr "les derniers fichiers"
+
+#. i18n: file kchmsetupdialog.ui line 153
+#: rc.cpp:31
+#, no-c-format
+msgid "R&emember extra information for history files"
+msgstr "Se rapp&eler les informations complémentaires pour l'historique"
+
+#. i18n: file kchmsetupdialog.ui line 156
+#: rc.cpp:34
+#, no-c-format
+msgid "Alt+E"
+msgstr "Alt+E"
+
+#. i18n: file kchmsetupdialog.ui line 159
+#: rc.cpp:37
+#, no-c-format
+msgid ""
+"Remembers the information about the files, which were opened. Remembers last "
+"opened page, search history, font size, bookmarks and so on."
+msgstr ""
+"Se rappelle les informations concernant les fichiers précédemment ouverts. "
+"Se rappelle la dernière page consultée, la dernière recherche effectuée, la "
+"taille de la police, les marque-pages, etc."
+
+#. i18n: file kchmsetupdialog.ui line 171
+#: rc.cpp:40
+#, no-c-format
+msgid "CHM security settings"
+msgstr "Paramètres de sécurité CHM"
+
+#. i18n: file kchmsetupdialog.ui line 182
+#: rc.cpp:43
+#, no-c-format
+msgid "When external link clicked"
+msgstr "Quand un lien externe est cliqué"
+
+#. i18n: file kchmsetupdialog.ui line 193
+#: rc.cpp:46
+#, no-c-format
+msgid "Alwa&ys open it in external browser"
+msgstr "Toujours l'ouvrir dans un navigateur e&xterne"
+
+#. i18n: file kchmsetupdialog.ui line 196
+#: rc.cpp:49
+#, no-c-format
+msgid "Alt+Y"
+msgstr "Alt+X"
+
+#. i18n: file kchmsetupdialog.ui line 204
+#. i18n: file kchmsetupdialog.ui line 244
+#: rc.cpp:52 rc.cpp:65
+#, no-c-format
+msgid "Ask for confirmation"
+msgstr "Demander la confirmation"
+
+#. i18n: file kchmsetupdialog.ui line 212
+#: rc.cpp:55
+#, no-c-format
+msgid "Do not open the link"
+msgstr "Ne pas ouvrir le lien"
+
+#. i18n: file kchmsetupdialog.ui line 225
+#: rc.cpp:59
+#, no-c-format
+msgid "When link pointed to a new CHM file clicked"
+msgstr "Lorsqu'un lien sur un fichier externe est cliqué "
+
+#. i18n: file kchmsetupdialog.ui line 236
+#: rc.cpp:62
+#, no-c-format
+msgid "Always open a new CHM file"
+msgstr "Toujours ouvrir un nouveau fichier CHM"
+
+#. i18n: file kchmsetupdialog.ui line 252
+#: rc.cpp:68
+#, no-c-format
+msgid "Do not open a new CHM file"
+msgstr "Ne pas ouvrir un nouveau fichier CHM"
+
+#. i18n: file kchmsetupdialog.ui line 266
+#: rc.cpp:71
+#, no-c-format
+msgid "Version-specific settings"
+msgstr "Paramètres spécifiques à la version"
+
+#. i18n: file kchmsetupdialog.ui line 277
+#: rc.cpp:74
+#, no-c-format
+msgid "Qt version settings"
+msgstr "Paramètres spécifiques à la version de Qt"
+
+#. i18n: file kchmsetupdialog.ui line 299
+#: rc.cpp:77
+#, no-c-format
+msgid ""
+"Enter the path to the program, which will be used as a browser for external "
+"links. A <i>%s</i> symbol will be replaced by the URL clicked."
+msgstr ""
+"Entrer le chemin du navigateur qui sera utilisé pour afficher les liens "
+"externes. Un symbole <i>%s</i> sera remplacé par l'URL cliquée."
+
+#. i18n: file kchmsetupdialog.ui line 325
+#: rc.cpp:80
+#, no-c-format
+msgid "KDE version settings"
+msgstr "Paramètres spécifiques à la version de KDE"
+
+#. i18n: file kchmsetupdialog.ui line 336
+#: rc.cpp:83
+#, no-c-format
+msgid "To show HTML content, use"
+msgstr "Pour afficher le contenu HTML, utiliser"
+
+#. i18n: file kchmsetupdialog.ui line 347
+#: rc.cpp:86
+#, no-c-format
+msgid "&QTextBrowser-based widget"
+msgstr "un widget basé sur &QTtextBrowser"
+
+#. i18n: file kchmsetupdialog.ui line 350
+#: rc.cpp:89
+#, no-c-format
+msgid "Alt+Q"
+msgstr "Alt+Q"
+
+#. i18n: file kchmsetupdialog.ui line 358
+#: rc.cpp:92
+#, no-c-format
+msgid "&KHTMLPart-based widget"
+msgstr "un widget basé sur &KHTMLPart"
+
+#. i18n: file kchmsetupdialog.ui line 361
+#: rc.cpp:95
+#, no-c-format
+msgid "Alt+K"
+msgstr "Alt+K"
+
+#. i18n: file kchmsetupdialog.ui line 371
+#: rc.cpp:98
+#, no-c-format
+msgid "KHTMLPart security"
+msgstr "Sécurité pour KHTMLPart"
+
+#. i18n: file kchmsetupdialog.ui line 382
+#: rc.cpp:101
+#, no-c-format
+msgid "Enable Java&Script"
+msgstr "Activer le support Java&Script"
+
+#. i18n: file kchmsetupdialog.ui line 385
+#: rc.cpp:104
+#, no-c-format
+msgid "Alt+S"
+msgstr "Alt+S"
+
+#. i18n: file kchmsetupdialog.ui line 393
+#: rc.cpp:107
+#, no-c-format
+msgid "Enable &plugins"
+msgstr "Activer les &greffons"
+
+#. i18n: file kchmsetupdialog.ui line 396
+#: rc.cpp:110
+#, no-c-format
+msgid "Alt+P"
+msgstr "Alt+G"
+
+#. i18n: file kchmsetupdialog.ui line 404
+#: rc.cpp:113
+#, no-c-format
+msgid "Enable &Java"
+msgstr "Activer le support &Java"
+
+#. i18n: file kchmsetupdialog.ui line 407
+#: rc.cpp:116
+#, no-c-format
+msgid "Alt+J"
+msgstr "Alt+J"
+
+#. i18n: file kchmsetupdialog.ui line 415
+#: rc.cpp:119
+#, no-c-format
+msgid "Enable &refresh"
+msgstr "Permettre le &rafraîchissement"
+
+#. i18n: file kchmsetupdialog.ui line 418
+#: rc.cpp:122
+#, no-c-format
+msgid "Alt+R"
+msgstr "Alt+R"
+
+#. i18n: file kchmsetupdialog.ui line 432
+#: rc.cpp:125
+#, no-c-format
+msgid "Advanced"
+msgstr "Paramétrage avancé"
+
+#. i18n: file kchmsetupdialog.ui line 443
+#: rc.cpp:128
+#, no-c-format
+msgid "View HTML source command uses"
+msgstr "Pour voir le source code HTML, utiliser : "
+
+#. i18n: file kchmsetupdialog.ui line 454
+#: rc.cpp:131
+#, no-c-format
+msgid "Built-in HTML source viewer"
+msgstr "le visionneur intégré de code source HTML"
+
+#. i18n: file kchmsetupdialog.ui line 465
+#: rc.cpp:135
+#, no-c-format
+msgid "E&xternal program, specified below"
+msgstr "Un programme e&xterne, spécifié ci-dessous"
+
+#. i18n: file kchmsetupdialog.ui line 468
+#: rc.cpp:138
+#, no-c-format
+msgid "Alt+X"
+msgstr "Alt+X"
+
+#. i18n: file kchmsetupdialog.ui line 484
+#: rc.cpp:141
+#, no-c-format
+msgid "External program:"
+msgstr "Programme externe :"
+
+#. i18n: file kchmsetupdialog.ui line 501
+#: rc.cpp:144
+#, fuzzy, no-c-format
+msgid "Search engine to use"
+msgstr "La recherche ne renvoie pas de résultat"
+
+#. i18n: file kchmsetupdialog.ui line 528
+#: rc.cpp:148
+#, no-c-format
+msgid ""
+"Use the search based on internal CHM index. This engine cannot search for "
+"any symbols except underscode, does not support multibyte languages, and is "
+"not always available."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 555
+#: rc.cpp:152
+#, no-c-format
+msgid ""
+"Use new kchmviewer internal search engine (recommended). This engine "
+"indexes symbols, so it is possible to search for special symbols (like \"C++"
+"\"). All languages are supported. The index will be generated before the "
+"first search."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 588
+#: rc.cpp:158
+#, no-c-format
+msgid "F1"
+msgstr "F1"
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr ""
+"_: NAME OF TRANSLATORS\n"
+"Stéphan BELLEGY"
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr ""
+"_: EMAIL OF TRANSLATORS\n"
+"stephan@bellegy.org"
+
+#: kchmbookmarkwindow.cpp:44
+msgid "&Add"
+msgstr "&Ajouter"
+
+#: kchmbookmarkwindow.cpp:46
+msgid "&Del"
+msgstr "&Supprimer"
+
+#: kchmbookmarkwindow.cpp:88
+msgid "%1 - add a bookmark"
+msgstr "%1 - ajouter un marque-page"
+
+#: kchmbookmarkwindow.cpp:89 kchmbookmarkwindow.cpp:131
+msgid "Enter the name for this bookmark:"
+msgstr "Entrer le nom du marque-page :"
+
+#: kchmbookmarkwindow.cpp:130
+msgid "%1 - edit the bookmark name"
+msgstr "%1 - modifier le nom du marque-page"
+
+#: kchmbookmarkwindow.cpp:201
+msgid "&Add bookmark"
+msgstr "&Ajouter un marque-page"
+
+#: kchmdialogchooseurlfromlist.cpp:34
+msgid "Topics"
+msgstr "Thèmes"
+
+#: kchmdialogchooseurlfromlist.cpp:39
+msgid "Please select one of the topics below:"
+msgstr "Choisissez l'un des thèmes suivants :"
+
+#: kchmdialogchooseurlfromlist.cpp:43
+msgid "&Ok"
+msgstr "&Ok"
+
+#: kchmmainwindow.cpp:122
+#, fuzzy
+msgid ""
+"%1 version %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2004-2007\n"
+"http://www.kchmviewer.net\n"
+"\n"
+"Licensed under GNU GPL license.\n"
+"\n"
+"Please check my another project, http://www.transientmail.com - temporary e-"
+"mail address, which expires automatically."
+msgstr ""
+"%1 version %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2005-2006\n"
+"www.kchmviewer.net\n"
+"\n"
+"Ce programme est distribué selon les termes de la licence GNU GPL.\n"
+"\n"
+"Essayez notre autre projet, www.transientmail.com - un distributeur "
+"d'adresses électroniques temporaires qui expirent automatiquement."
+
+#: kchmmainwindow.cpp:139
+msgid "*.chm|Compressed Help Manual (*.chm)"
+msgstr "*.chm|Manuel d'aide compressé (*.chm)"
+
+#: kchmmainwindow.cpp:141
+msgid "Compressed Help Manual (*.chm)"
+msgstr "Manuel d'aide compressé (*.chm)"
+
+#: kchmmainwindow.cpp:151
+msgid "Loading aborted"
+msgstr "Chargement interrompu"
+
+#: kchmmainwindow.cpp:261
+msgid "%1 - failed to load the chm file"
+msgstr "%1 - Échec lors de la lecture du fichier chm %1"
+
+#: kchmmainwindow.cpp:262
+msgid "Unable to load the chm file %1"
+msgstr "Impossible de lire le fichier chm %1"
+
+#: kchmmainwindow.cpp:272
+msgid "Could not load file %1"
+msgstr "Impossible de lire le fichier chm %1 "
+
+#: kchmmainwindow.cpp:288
+msgid "About %1"
+msgstr "A propos de %1"
+
+#: kchmmainwindow.cpp:374
+msgid "%1 - remote link clicked - %2"
+msgstr "%1 - un lien externe a été cliqué - %2"
+
+#: kchmmainwindow.cpp:375
+msgid ""
+"A remote link %1 will start the external program to open it.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"Un clic sur un lien externe %1 lancera l'ouverture du navigateur externe.\n"
+"\n"
+"Voulez-vous continuer ?"
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&Yes"
+msgstr "&Oui"
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&No"
+msgstr "&Non"
+
+# Stéphan Bellegy : wrong spelling for JavaScript
+#: kchmmainwindow.cpp:400
+msgid "%1 - JavsScript link clicked"
+msgstr "%1 - un lien sur un JavaScript a été cliqué"
+
+#: kchmmainwindow.cpp:401
+msgid ""
+"You have clicked a JavaScript link.\n"
+"To prevent security-related issues JavaScript URLs are disabled in CHM files."
+msgstr ""
+"Vous avez cliqué sur un lien JavaScript.\n"
+"Pour des raisons de sécurité, les URL JavaScript sont désactivées dans les "
+"fichiers CHM."
+
+#: kchmmainwindow.cpp:409
+msgid "%1 - link to a new CHM file clicked"
+msgstr "%1 - un lien sur un nouveau fichier CHM a été cliqué"
+
+#: kchmmainwindow.cpp:410
+msgid ""
+"You have clicked a link, which leads to a new CHM file %1.\n"
+"The current file will be closed.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"Vous avez cliqué sur un lien pointant sur un nouveau fichier CHM %1.\n"
+"Le fichier actuel sera fermé.\n"
+"\n"
+"Voulez-vous continuer ?"
+
+#: kchmmainwindow.cpp:474
+msgid "File Operations"
+msgstr "Opérations sur les fichiers"
+
+#: kchmmainwindow.cpp:478
+msgid "Open File"
+msgstr "Ouvrir un fichier "
+
+#: kchmmainwindow.cpp:484
+msgid "Click this button to open an existing chm file."
+msgstr "Cliquer sur ce bouton pour ouvrir un fichier CHM existant."
+
+#: kchmmainwindow.cpp:489
+msgid "Print File"
+msgstr "Imprimer un fichier"
+
+#: kchmmainwindow.cpp:495
+msgid "Click this button to print the current page"
+msgstr "Cliquer sur ce bouton pour imprimer la page courante"
+
+#: kchmmainwindow.cpp:510
+msgid "E&xtract CHM content..."
+msgstr "E&xtraire le contenu du fichier CHM..."
+
+#: kchmmainwindow.cpp:511
+msgid ""
+"Click this button to extract the whole CHM file content into a specific "
+"directory"
+msgstr ""
+"Cliquer sur ce bouton pour extraire le contenu entier du fichier CHM dans un "
+"dossier"
+
+#: kchmmainwindow.cpp:517
+msgid "&Recent files"
+msgstr "Fichiers &récents"
+
+#: kchmmainwindow.cpp:526
+msgid "&Select all"
+msgstr "Tout &Sélectionner"
+
+#: kchmmainwindow.cpp:544
+msgid "&Change settings..."
+msgstr "&Modifier les paramètres..."
+
+#: kchmmainwindow.cpp:551
+msgid "About &Qt"
+msgstr "A propos de &Qt"
+
+#: kchmmainwindow.cpp:553
+msgid "What's &This"
+msgstr "Qu'es&t-ce que c'est"
+
+#: kchmmainwindow.cpp:836
+msgid ""
+"Changing browser view options or search engine used\n"
+"requires restarting the application to take effect."
+msgstr ""
+
+#: kchmmainwindow.cpp:954
+msgid "Index"
+msgstr "Index"
+
+#: kchmmainwindow.cpp:977 kchmsearchengine.cpp:246
+msgid "Search"
+msgstr "Chercher"
+
+#: kchmmainwindow.cpp:1044
+msgid "Could not locate opened topic in content window"
+msgstr ""
+"Impossible de trouver le sujet sélectionné dans le contenu de la fenêtre"
+
+#: kchmmainwindow.cpp:1056 kchmmainwindow.cpp:1062
+msgid "Choose a directory to store CHM content"
+msgstr "Choisir un dossier pour y sauvegarder le contenu du fichier CHM"
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting CHM content"
+msgstr "Extraction du contenu du fichier CHM"
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting files..."
+msgstr "Extraction des fichiers..."
+
+#: kchmmainwindow.cpp:1075
+msgid "Abort"
+msgstr "Annuler"
+
+#: kchmnavtoolbar.cpp:33
+msgid "Navigation"
+msgstr "Navigation"
+
+#: kchmnavtoolbar.cpp:37
+msgid "Move backward in history"
+msgstr "Revenir en arrière dans l'historique"
+
+#: kchmnavtoolbar.cpp:42
+msgid "Click this button to move backward in browser history"
+msgstr "Cliquer sur ce bouton pour revenir en arrière dans l'historique"
+
+#: kchmnavtoolbar.cpp:46
+msgid "Move forward in history"
+msgstr "Avancer dans l'historique"
+
+#: kchmnavtoolbar.cpp:51
+msgid "Click this button to move forward in browser history"
+msgstr "Cliquer sur ce bouton pour avancer dans l'historique"
+
+#: kchmnavtoolbar.cpp:55
+msgid "Go to the home page"
+msgstr "Aller à la page d'accueil"
+
+#: kchmnavtoolbar.cpp:60
+msgid "Click this button to move to the home page"
+msgstr "Cliquer sur ce bouton pour aller à la page d'accueil"
+
+#: kchmsearchengine.cpp:246
+msgid "A closing quote character is missing."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:50
+msgid "Find in page"
+msgstr "Chercher dans la page"
+
+#: kchmsearchtoolbar.cpp:67
+msgid "Enter here the text to search in the current page."
+msgstr "Saisir ici le texte à rechercher dans la page courante."
+
+#: kchmsearchtoolbar.cpp:74
+msgid "Previous search result"
+msgstr "Résultats de la recherche antérieure"
+
+#: kchmsearchtoolbar.cpp:79
+msgid "Click this button to find previous search result."
+msgstr ""
+"Cliquer sur ce bouton pour trouver les résultats de la recherche antérieure."
+
+#: kchmsearchtoolbar.cpp:83
+msgid "Next search result"
+msgstr "Résultats de la recherche suivante"
+
+#: kchmsearchtoolbar.cpp:88
+msgid "Click this button to find next search result."
+msgstr ""
+"Cliquer sur ce bouton pour trouver les résultats de la recherche suivante."
+
+#: kchmsearchtoolbar.cpp:92
+msgid "Locate this topic in content window"
+msgstr "Chercher ce sujet dans le contenu de la fenêtre"
+
+#: kchmsearchtoolbar.cpp:97
+msgid ""
+"Click this button to find current topic in the content window, and open it."
+msgstr ""
+"Cliquer sur ce bouton pour trouver le sujet actuel dans le contenu de la "
+"fenêtre et l'ouvrir."
+
+#: kchmsearchtoolbar.cpp:101
+msgid "Increase font size"
+msgstr "Augmenter la taille de la police de caractères"
+
+#: kchmsearchtoolbar.cpp:106
+msgid "Click this button to increase the font size."
+msgstr ""
+"Cliquer sur ce bouton pour augmenter la taille de la police de caractères."
+
+#: kchmsearchtoolbar.cpp:110
+msgid "Decrease font size"
+msgstr "Diminuer la taille de la police de caractères"
+
+#: kchmsearchtoolbar.cpp:115
+msgid "Click this button to decrease the font size."
+msgstr ""
+"Cliquer sur ce bouton pour diminuer la taille de la police de caractères."
+
+#: kchmsearchtoolbar.cpp:119
+msgid "View HTML source"
+msgstr "Visualiser le code source HTML"
+
+#: kchmsearchtoolbar.cpp:124
+msgid "Click this button to open a separate window with the page HTML source."
+msgstr ""
+"Cliquer sur ce bouton pour ouvrir une nouvelle fenêtre contenant le code "
+"source HTML de la page."
+
+#: kchmsearchtoolbar.cpp:128
+msgid "Add to bookmarks"
+msgstr "Ajouter aux marque-pages"
+
+#: kchmsearchtoolbar.cpp:133
+msgid "Click this button to add the current page to the bookmarks list."
+msgstr "Cliquer sur ce bouton pour ajouter un marque-page."
+
+#: kchmsearchtoolbar.cpp:136
+msgid "Prev page in TOC"
+msgstr "Page précédente de la TdM"
+
+#: kchmsearchtoolbar.cpp:141
+msgid "Click this button to go to previous page in Table Of Content."
+msgstr ""
+"Cliquer sur ce bouton pour aller à la page précédente de la Table des "
+"Matières."
+
+#: kchmsearchtoolbar.cpp:144
+msgid "Next page in TOC"
+msgstr "Page suivante de la TdM"
+
+#: kchmsearchtoolbar.cpp:149
+msgid "Click this button to go to next page in Table of Content."
+msgstr ""
+"Cliquer sur ce bouton pour aller à la page suivante de la Table des Matières."
+
+#: kchmsearchtoolbar.cpp:155
+msgid "&Increase font"
+msgstr "&Augmenter la taille de la police"
+
+#: kchmsearchtoolbar.cpp:156
+msgid "&Decrease font"
+msgstr "&Diminuer la taille de la police"
+
+#: kchmsearchtoolbar.cpp:157
+msgid "&View HTML source"
+msgstr "&Visionner le code source HTML"
+
+#: kchmsearchtoolbar.cpp:160
+msgid "&Bookmark this page"
+msgstr "Ajouter un Marque-&Page"
+
+#: kchmsearchtoolbar.cpp:163
+msgid "&Full screen"
+msgstr "Pl&ein Écran"
+
+#: kchmsearchtoolbar.cpp:165
+msgid "&Show contents window"
+msgstr "A&fficher la fenêtre des contenus"
+
+#: kchmsearchtoolbar.cpp:167
+msgid "&Locate in contents window"
+msgstr "&Chercher dans la fenêtre des contenus"
+
+#: kchmsearchtoolbar.cpp:220
+msgid "&Set language"
+msgstr "Définir le &Langage"
+
+#: kchmsearchtoolbar.cpp:243
+msgid "&Set codepage"
+msgstr "Définir le &Codepage"
+
+#: kchmsearchwindow.cpp:43
+msgid "Type in word(s) to search for:"
+msgstr "Entrer un/des mot(s) à rechercher :"
+
+#: kchmsearchwindow.cpp:46
+msgid "<a href=\"q\"><b>Help</b></a>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:58
+msgid "Go"
+msgstr ""
+
+#: kchmsearchwindow.cpp:66
+msgid "Title"
+msgstr "Titre"
+
+#: kchmsearchwindow.cpp:67
+msgid "Location"
+msgstr "Position"
+
+#: kchmsearchwindow.cpp:130
+msgid "Search returned %1 result(s)"
+msgstr "La recherche renvoie %1 occurrence(s)"
+
+#: kchmsearchwindow.cpp:133
+msgid "Search returned no results"
+msgstr "La recherche ne renvoie pas de résultat"
+
+#: kchmsearchwindow.cpp:136 kchmviewwindow_qtextbrowser.cpp:211
+msgid "Search failed"
+msgstr "La recherche a échoué"
+
+#: kchmsearchwindow.cpp:169 kchmsearchwindow.cpp:175
+msgid "How to use search"
+msgstr "Comment effectuer une recherche"
+
+#: kchmsearchwindow.cpp:170
+msgid ""
+"<html><p>The improved search engine allows you to search for a word, symbol "
+"or phrase, which is set of words and symbols included in quotes. Only the "
+"documents which include all the terms speficide in th search query are "
+"shown; no prefixes needed.<p>Unlike MS CHM internal search index, my "
+"improved search engine indexes everything, including special symbols. "
+"Therefore it is possible to search (and find!) for something like <i>$q = "
+"new ChmFile();</i>. This search also fully supports Unicode, which means "
+"that you can search in non-English documents.<p>If you want to search for a "
+"quote symbol, use quotation mark instead. The engine treats a quote and a "
+"quotation mark as the same symbol, which allows to use them in phrases.</"
+"html>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:176
+msgid ""
+"The search query can contain a few prefixes.\n"
+"A set of words inside the quote marks mean that you are searching for exact "
+"phrase.\n"
+"A word with minus sign means that it should be absent in the search result.\n"
+"A word with plus mark or without any mark means that it must be present in "
+"the search result.\n"
+"\n"
+"Note that only letters and digits are indexed.\n"
+"You cannot search for non-character symbols other than underscope, and those "
+"symbols will be removed from the search query.\n"
+"For example, search for 'C' will give the same result as searching for 'C++'."
+msgstr ""
+"L'interrogation peut contenir quelques préfixes.\n"
+"Un ensemble de mots entre côtes signifie que l'on recherche une phrase "
+"exacte.\n"
+"Un mot précédé du signe moins (-) indique que ce mot doit être absent du "
+"résultat.\n"
+"Un mot précédé du signe plus (+) ou précédé d'aucun signe indique qu'il doit "
+"être présent dans le résultat.\n"
+"\n"
+"Seuls les chiffres et les lettres sont indexés pour la recherche.\n"
+"Il est impossible de rechercher d'autres caractères que les chiffres, les "
+"lettres et le souligné (_). Les autres caractères seront exclus de la "
+"recherche.\n"
+"Par exemple, une recherche sur 'C' donnera les mêmes résultats qu'une "
+"recherche sur 'C++'."
+
+#: kchmsearchwindow.cpp:226
+#, fuzzy
+msgid "Search is not available"
+msgstr "La recherche a échoué"
+
+#: kchmsearchwindow.cpp:227
+msgid ""
+"<p>The search feature is not avaiable for this chm file.<p>The old search "
+"engine depends on indexes present in chm files itself. Not every chm file "
+"has an index; it is set up during chm file creation. Therefore if the search "
+"index was not created during chm file creation, this makes search impossible."
+"<p>Solution: use new search engine (menu Settings/Advanced), which generates "
+"its own index."
+msgstr ""
+
+#: kchmviewwindow_qtextbrowser.cpp:171
+msgid "Printing (page %1)..."
+msgstr "Impression (page %1)..."
+
+#: kchmviewwindow_qtextbrowser.cpp:179
+msgid "Printing completed"
+msgstr "Impression terminée"
+
+#: kchmviewwindow_qtextbrowser.cpp:183
+msgid "Printing aborted"
+msgstr "Impression interrompue"
+
+#: kchmviewwindow_qtextbrowser.cpp:189
+msgid "%1 - could not print"
+msgstr "%1 - impossible d'imprimer"
+
+#: kchmviewwindow_qtextbrowser.cpp:190
+msgid ""
+"Could not print.\n"
+"Your Qt library has been compiled without printing support"
+msgstr ""
+"Impossible d'imprimer.\n"
+"La librairie Qt de votre système a été compilée sans la capacité à imprimer"
+
+#: kchmviewwindowmgr.cpp:65
+msgid "&Window"
+msgstr "&Fenêtre"
+
+#: main.cpp:46
+msgid ""
+"'--search <query>' specifies the search query to search, and activate the "
+"first entry if found"
+msgstr ""
+
+#: main.cpp:47
+msgid ""
+"'--sindex <word>' specifies the word to find in index, and activate if found"
+msgstr ""
+
+#: main.cpp:54
+msgid "CHM file viewer"
+msgstr "Visionneur de fichiers CHM"
+
+#~ msgid "Match similar words"
+#~ msgstr "Ressemble aux mots "
+
+#~ msgid "Shift+Enter"
+#~ msgstr "Majuscule+Entrée"
+
+#~ msgid "Ctrl+Enter"
+#~ msgstr "Contrôle+Entrée"
diff --git a/po/hu.pot b/po/hu.pot
new file mode 100644
index 0000000..82e4476
--- /dev/null
+++ b/po/hu.pot
@@ -0,0 +1,723 @@
+# translation of hu1.po to
+# translation of hu.po to
+# translation of kchmviewer.po to
+# This file is put in the public domain.
+#
+# Csaba Zakarias <csaba.zakarias@gmail.hu>, 2006.
+msgid ""
+msgstr ""
+"Project-Id-Version: hu1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-02-04 02:25-0800\n"
+"PO-Revision-Date: 2006-04-11 13:44+0200\n"
+"Last-Translator: Csaba Zakarias <csaba.zakarias@gmail.hu>\n"
+"Language-Team: <hu@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.1\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. i18n: file kchmsetupdialog.ui line 24
+#: rc.cpp:3
+#, no-c-format
+msgid "KchmViewer settings"
+msgstr "KchmViewer beállítások"
+
+#. i18n: file kchmsetupdialog.ui line 54
+#: rc.cpp:6
+#, no-c-format
+msgid "General behavior"
+msgstr "Általános beállítások"
+
+#. i18n: file kchmsetupdialog.ui line 73
+#: rc.cpp:9
+#, no-c-format
+msgid "If no arguments given on load"
+msgstr "Ha nem ad meg jellemzőt a betöltéskor"
+
+#. i18n: file kchmsetupdialog.ui line 84
+#: rc.cpp:12
+#, no-c-format
+msgid "Open the 'open CHM file' dialog"
+msgstr "A 'CHM fájl megnyitása' dialógus ablak megnyitása"
+
+#. i18n: file kchmsetupdialog.ui line 92
+#: rc.cpp:15
+#, no-c-format
+msgid "Open the &last used CHM file, if exist"
+msgstr "&Legutóbbi CHM fájl megnyitása, ha létezik"
+
+#. i18n: file kchmsetupdialog.ui line 95
+#: rc.cpp:18
+#, no-c-format
+msgid "Alt+L"
+msgstr "Alt+L"
+
+#. i18n: file kchmsetupdialog.ui line 105
+#: rc.cpp:21
+#, no-c-format
+msgid "History"
+msgstr "Előzmények"
+
+#. i18n: file kchmsetupdialog.ui line 124
+#: rc.cpp:24
+#, no-c-format
+msgid "Store history information for"
+msgstr "Előzmény információ tárolása"
+
+#. i18n: file kchmsetupdialog.ui line 143
+#: rc.cpp:28
+#, no-c-format
+msgid "latest files"
+msgstr "legutóbbi fájlok"
+
+#. i18n: file kchmsetupdialog.ui line 153
+#: rc.cpp:31
+#, no-c-format
+msgid "R&emember extra information for history files"
+msgstr "&Emlékezzen az előzmények fájlok különleges információira"
+
+#. i18n: file kchmsetupdialog.ui line 156
+#: rc.cpp:34
+#, no-c-format
+msgid "Alt+E"
+msgstr "Alt+E"
+
+#. i18n: file kchmsetupdialog.ui line 159
+#: rc.cpp:37
+#, no-c-format
+msgid ""
+"Remembers the information about the files, which were opened. Remembers last "
+"opened page, search history, font size, bookmarks and so on."
+msgstr "Emlékezzen a megnyitott fájlok információira. Emlékezzen az utoljára megnyitott oldalra, keresési előzményekre, betűméretre, könyvjelzőkre és így tovább."
+
+#. i18n: file kchmsetupdialog.ui line 171
+#: rc.cpp:40
+#, no-c-format
+msgid "CHM security settings"
+msgstr "CHM biztonsági beállítások"
+
+#. i18n: file kchmsetupdialog.ui line 182
+#: rc.cpp:43
+#, no-c-format
+msgid "When external link clicked"
+msgstr "Külső kapcsolatra kattintáskor"
+
+#. i18n: file kchmsetupdialog.ui line 193
+#: rc.cpp:46
+#, no-c-format
+msgid "Alwa&ys open it in external browser"
+msgstr "&Mindig külső böngészőben nyissa meg"
+
+#. i18n: file kchmsetupdialog.ui line 196
+#: rc.cpp:49
+#, no-c-format
+msgid "Alt+Y"
+msgstr "Alt+Y"
+
+#. i18n: file kchmsetupdialog.ui line 204
+#. i18n: file kchmsetupdialog.ui line 244
+#: rc.cpp:52 rc.cpp:65
+#, no-c-format
+msgid "Ask for confirmation"
+msgstr "Megerősítés kérése"
+
+#. i18n: file kchmsetupdialog.ui line 212
+#: rc.cpp:55
+#, no-c-format
+msgid "Do not open the link"
+msgstr "Kapcsolatot ne nyissa meg"
+
+#. i18n: file kchmsetupdialog.ui line 225
+#: rc.cpp:59
+#, no-c-format
+msgid "When link pointed to a new CHM file clicked"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 236
+#: rc.cpp:62
+#, no-c-format
+msgid "Always open a new CHM file"
+msgstr "Mindig nyissa meg azúj CHM fájlt"
+
+#. i18n: file kchmsetupdialog.ui line 252
+#: rc.cpp:68
+#, no-c-format
+msgid "Do not open a new CHM file"
+msgstr "Ne nyissa meg az új CHM fájlt"
+
+#. i18n: file kchmsetupdialog.ui line 266
+#: rc.cpp:71
+#, no-c-format
+msgid "Version-specific settings"
+msgstr "Verzió függő beállítások"
+
+#. i18n: file kchmsetupdialog.ui line 277
+#: rc.cpp:74
+#, no-c-format
+msgid "Qt version settings"
+msgstr "Qt verzió beállítások"
+
+#. i18n: file kchmsetupdialog.ui line 299
+#: rc.cpp:77
+#, no-c-format
+msgid ""
+"Enter the path to the program, which will be used as a browser for external "
+"links. A <i>%s</i> symbol will be replaced by the URL clicked."
+msgstr "Adja meg a program elérési útját a belső linkek megnyitásához egy böngésző ablakban. <i>%s</i> szimbólumot lecseréljük az URL-re kattintáskor."
+
+#. i18n: file kchmsetupdialog.ui line 325
+#: rc.cpp:80
+#, no-c-format
+msgid "KDE version settings"
+msgstr "KDE verzió beállítások"
+
+#. i18n: file kchmsetupdialog.ui line 336
+#: rc.cpp:83
+#, no-c-format
+msgid "To show HTML content, use"
+msgstr "HTML tartalom megjelenítéséhez használja"
+
+#. i18n: file kchmsetupdialog.ui line 347
+#: rc.cpp:86
+#, no-c-format
+msgid "&QTextBrowser-based widget"
+msgstr "&QTextBrowser-alapú widget"
+
+#. i18n: file kchmsetupdialog.ui line 350
+#: rc.cpp:89
+#, no-c-format
+msgid "Alt+Q"
+msgstr "Alt+Q"
+
+#. i18n: file kchmsetupdialog.ui line 358
+#: rc.cpp:92
+#, no-c-format
+msgid "&KHTMLPart-based widget"
+msgstr "&KHTMLPart-alapú widget"
+
+#. i18n: file kchmsetupdialog.ui line 361
+#: rc.cpp:95
+#, no-c-format
+msgid "Alt+K"
+msgstr "Alt+K"
+
+#. i18n: file kchmsetupdialog.ui line 371
+#: rc.cpp:98
+#, no-c-format
+msgid "KHTMLPart security"
+msgstr "KHTMLPart biztonság"
+
+#. i18n: file kchmsetupdialog.ui line 382
+#: rc.cpp:101
+#, no-c-format
+msgid "Enable Java&Script"
+msgstr "Java&Szkript engedélyezése"
+
+#. i18n: file kchmsetupdialog.ui line 385
+#: rc.cpp:104
+#, no-c-format
+msgid "Alt+S"
+msgstr "Alt+S"
+
+#. i18n: file kchmsetupdialog.ui line 393
+#: rc.cpp:107
+#, no-c-format
+msgid "Enable &plugins"
+msgstr "&Beépülő modulok engedélyezése"
+
+#. i18n: file kchmsetupdialog.ui line 396
+#: rc.cpp:110
+#, no-c-format
+msgid "Alt+P"
+msgstr "Alt+P"
+
+#. i18n: file kchmsetupdialog.ui line 404
+#: rc.cpp:113
+#, no-c-format
+msgid "Enable &Java"
+msgstr "&Java engedélyezése"
+
+#. i18n: file kchmsetupdialog.ui line 407
+#: rc.cpp:116
+#, no-c-format
+msgid "Alt+J"
+msgstr "Alt+J"
+
+#. i18n: file kchmsetupdialog.ui line 415
+#: rc.cpp:119
+#, no-c-format
+msgid "Enable &refresh"
+msgstr "&Frissítés engedélyezése"
+
+#. i18n: file kchmsetupdialog.ui line 418
+#: rc.cpp:122
+#, no-c-format
+msgid "Alt+R"
+msgstr "Alt+R"
+
+#. i18n: file kchmsetupdialog.ui line 432
+#: rc.cpp:125
+#, no-c-format
+msgid "Advanced"
+msgstr "További"
+
+#. i18n: file kchmsetupdialog.ui line 443
+#: rc.cpp:128
+#, no-c-format
+msgid "View HTML source command uses"
+msgstr "HTML forrás parancsok megtekintése"
+
+#. i18n: file kchmsetupdialog.ui line 454
+#: rc.cpp:131
+#, no-c-format
+msgid "Built-in HTML source viewer"
+msgstr "Beépített HTML forrás megjelenítő"
+
+#. i18n: file kchmsetupdialog.ui line 465
+#: rc.cpp:135
+#, no-c-format
+msgid "E&xternal program, specified below"
+msgstr "&Külső program, alább adaj meg"
+
+#. i18n: file kchmsetupdialog.ui line 468
+#: rc.cpp:138
+#, no-c-format
+msgid "Alt+X"
+msgstr "Alt+X"
+
+#. i18n: file kchmsetupdialog.ui line 484
+#: rc.cpp:141
+#, no-c-format
+msgid "External program:"
+msgstr "Külső program:"
+
+#. i18n: file kchmsetupdialog.ui line 521
+#: rc.cpp:147
+#, no-c-format
+msgid "F1"
+msgstr "F1"
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Zakariás Csaba"
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "csaba.zakarias@gmail.com"
+
+#: kchmbookmarkwindow.cpp:39
+msgid "&Add"
+msgstr "&Hozzáadás"
+
+#: kchmbookmarkwindow.cpp:41
+msgid "&Del"
+msgstr "&Törlés"
+
+#: kchmbookmarkwindow.cpp:64
+msgid "%1 - add a bookmark"
+msgstr "%1 - hozzáadás a könyvjelzőhöz"
+
+#: kchmbookmarkwindow.cpp:65 kchmbookmarkwindow.cpp:101
+msgid "Enter the name for this bookmark:"
+msgstr "Adja meg a könyvjelző nevét:"
+
+#: kchmbookmarkwindow.cpp:100
+msgid "%1 - edit the bookmark name"
+msgstr "%1 - könyvjelző név szerkesztése"
+
+#: kchmdialogchooseurlfromlist.cpp:34
+msgid "Topics"
+msgstr "Témák"
+
+#: kchmdialogchooseurlfromlist.cpp:39
+msgid "Please select one of the topics below:"
+msgstr "Jelölje ki az egyik alábbi témát:"
+
+#: kchmdialogchooseurlfromlist.cpp:43
+msgid "&Ok"
+msgstr "&OK"
+
+#: kchmmainwindow.cpp:122
+msgid "*.chm|Compressed Help Manual (*.chm)"
+msgstr "Tömörített Súgó Kézikönyv (*.chm)"
+
+#: kchmmainwindow.cpp:124
+msgid "Compressed Help Manual (*.chm)"
+msgstr "Tömörített Súgó Kézikönyv (*.chm)"
+
+#: kchmmainwindow.cpp:134
+msgid "Loading aborted"
+msgstr "Betöltés sikertelen"
+
+#: kchmmainwindow.cpp:231
+msgid "%1 - failed to load the chm file"
+msgstr "%1 - hiba a chm fájl betöltésekor"
+
+#: kchmmainwindow.cpp:232
+msgid "Unable to load the chm file %1"
+msgstr "%1 chm fájl nem tölthető be"
+
+#: kchmmainwindow.cpp:242
+msgid "Could not load file %1"
+msgstr "%1 fájl nem tölthető be"
+
+#: kchmmainwindow.cpp:258
+msgid "About %1"
+msgstr "%1 névjegye"
+
+#: kchmmainwindow.cpp:259
+msgid ""
+"%1 version %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2005-2006\n"
+"www.kchmviewer.net\n"
+"\n"
+"Licensed under GNU GPL license.\n"
+"\n"
+"Please try our another project, www.transientmail.com - temporary e-mail "
+"address, which expires automatically."
+msgstr ""
+"%1 verzió %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2005-2006\n"
+"www.kchmviewer.net\n"
+"\n"
+"GNU GPL licensz.\n"
+"\n"
+"Kérem, próbálja ki más projektünket is, ww.transientmail.com."
+
+#: kchmmainwindow.cpp:330
+msgid "%1 - remote link clicked - %2"
+msgstr "%1 - távoli kapcsolatra kattintás - %2"
+
+#: kchmmainwindow.cpp:331
+msgid ""
+"A remote link %1 will start the external program to open it.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"%1 távoli kapcsolat megnyitásához külső programot indít.\n"
+"\n"
+"Akarja folytatni?"
+
+#: kchmmainwindow.cpp:332 kchmmainwindow.cpp:368
+msgid "&Yes"
+msgstr "&Igen"
+
+#: kchmmainwindow.cpp:332 kchmmainwindow.cpp:368
+msgid "&No"
+msgstr "&Nem"
+
+#: kchmmainwindow.cpp:356
+msgid "%1 - JavsScript link clicked"
+msgstr "%1 - JavaSzkriptre kattintás"
+
+#: kchmmainwindow.cpp:357
+msgid ""
+"You have clicked a JavaScript link.\n"
+"To prevent security-related issues JavaScript URLs are disabled in CHM files."
+msgstr ""
+"JavaSzkriptet akart elindítani.\n"
+"Biztonsági okoból a JavaSzkript le van tiltva a CHM fájlokban."
+
+#: kchmmainwindow.cpp:366
+msgid "%1 - link to a new CHM file clicked"
+msgstr "%1 - új CHM fájlra mutató kapcsolatra kattintás"
+
+#: kchmmainwindow.cpp:367
+msgid ""
+"You have clicked a link, which leads to a new CHM file %1.\n"
+"The current file will be closed.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"A %1 új CHM fájlra mutató kapcsolatra kattintott.\n"
+"A jelenlegi fájl bezárul.\n"
+"\n"
+"Akarja folytatni?"
+
+#: kchmmainwindow.cpp:428
+msgid "File Operations"
+msgstr "Fájl műveletek"
+
+#: kchmmainwindow.cpp:432
+msgid "Open File"
+msgstr "Fájl megnyitása"
+
+#: kchmmainwindow.cpp:438
+msgid "Click this button to open an existing chm file."
+msgstr "Létező chm fájl megnyitásához kattintson erre a gombra."
+
+#: kchmmainwindow.cpp:443
+msgid "Print File"
+msgstr "Fájl nyomtatása"
+
+#: kchmmainwindow.cpp:449
+msgid "Click this button to print the current page"
+msgstr "Az aktuális oldal kinyomtatásához kattintson erre a gombra."
+
+#: kchmmainwindow.cpp:453
+msgid "Navigation"
+msgstr "Navigáció"
+
+#: kchmmainwindow.cpp:457
+msgid "Move backward in history"
+msgstr "Az előzményekben hátrébb mozgatása"
+
+#: kchmmainwindow.cpp:462
+msgid "Click this button to move backward in browser history"
+msgstr "A böngésző előzmények közötti visszafelé mozgáshoz kattintson erre a gombra."
+
+#: kchmmainwindow.cpp:466
+msgid "Move forward in history"
+msgstr "Az előzményekben előrébb mozgatása"
+
+#: kchmmainwindow.cpp:471
+msgid "Click this button to move forward in browser history"
+msgstr "A böngésző előzmények közötti előrefelé mozgáshoz kattintson erre a gombra."
+
+#: kchmmainwindow.cpp:475
+msgid "Go to the home page"
+msgstr "Alapoldalra ugrás"
+
+#: kchmmainwindow.cpp:480
+msgid "Click this button to move to the home page"
+msgstr "Az alapoldalra ugráshoz kattintson erre a gombra."
+
+#: kchmmainwindow.cpp:498
+msgid "&Recent files"
+msgstr "&Legutóbbi fájlok"
+
+#: kchmmainwindow.cpp:507 kchmviewwindow_khtmlpart.cpp:163
+msgid "&Select all"
+msgstr "&Minden kijelölése"
+
+#: kchmmainwindow.cpp:515
+msgid "&Setup"
+msgstr "&Beállítás"
+
+#: kchmmainwindow.cpp:516
+msgid "&Change settings..."
+msgstr "&Beállítások megváltoztatása"
+
+#: kchmmainwindow.cpp:522
+msgid "About &Qt"
+msgstr "&Qt névjegye"
+
+#: kchmmainwindow.cpp:524
+msgid "What's &This"
+msgstr "&Mi ez?"
+
+#: kchmmainwindow.cpp:893
+msgid "Index"
+msgstr "Index"
+
+#: kchmmainwindow.cpp:916
+msgid "Search"
+msgstr "Keresés"
+
+#: kchmmainwindow.cpp:972
+msgid "Could not locate opened topic in content window"
+msgstr "Nem található a megnyitott téma a tartalom albakban"
+
+#: kchmsearchtoolbar.cpp:45
+msgid "Find in page"
+msgstr "Keresés az oldalon"
+
+#: kchmsearchtoolbar.cpp:62
+msgid "Enter here the text to search in the current page."
+msgstr "Adja meg az aktuális oldalon keresendő szöveget."
+
+#: kchmsearchtoolbar.cpp:69
+msgid "Previous search result"
+msgstr "Előző keresési eredmény"
+
+#: kchmsearchtoolbar.cpp:74
+msgid "Click this button to find previous search result."
+msgstr "Az előző keresési eredmény megjelenítéséhez kattintson erre a gombra."
+
+#: kchmsearchtoolbar.cpp:78
+msgid "Next search result"
+msgstr "Következő keresési eredmény"
+
+#: kchmsearchtoolbar.cpp:83
+msgid "Click this button to find next search result."
+msgstr "A következő keresési eredmény megjelenítéséhez kattintson erre a gombra."
+
+#: kchmsearchtoolbar.cpp:87
+msgid "Locate this topic in content window"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:92
+msgid "Click this button to find current topic in the content window, and open it."
+msgstr "Kattintson a gombra a jelenlegi témának a tartalom ablakban történő megkereséséhez és megnyitásához."
+
+#: kchmsearchtoolbar.cpp:96
+msgid "Increase font size"
+msgstr "Betűméret növelése"
+
+#: kchmsearchtoolbar.cpp:101
+msgid "Click this button to increase the font size."
+msgstr "A betűméret növeléséhez kattinson erre a gombra."
+
+#: kchmsearchtoolbar.cpp:105
+msgid "Decrease font size"
+msgstr "Betűméret csökkentése"
+
+#: kchmsearchtoolbar.cpp:110
+msgid "Click this button to decrease the font size."
+msgstr "A betűméret csökkentéséhez kattinson erre a gombra."
+
+#: kchmsearchtoolbar.cpp:114
+msgid "View HTML source"
+msgstr "HTML forrás megtekintése"
+
+#: kchmsearchtoolbar.cpp:119
+msgid "Click this button to open a separate window with the page HTML source."
+msgstr "Az oldal HTML forrásának külön ablakban történő megnyitásához kattintson erre a gombra."
+
+#: kchmsearchtoolbar.cpp:123
+msgid "Add to bookmarks"
+msgstr "Hozzáadás a könyvjelzőhöz"
+
+#: kchmsearchtoolbar.cpp:128
+msgid "Click this button to add the current page to the bookmarks list."
+msgstr "Kattintson a gomba az aktuális oldal könyvjelző listához való hozzáadására."
+
+#: kchmsearchtoolbar.cpp:131
+msgid "Prev page in TOC"
+msgstr "Előző oldal a tartalomjegyzékben"
+
+#: kchmsearchtoolbar.cpp:136
+msgid "Click this button to go to previous page in Table Of Content."
+msgstr "A tartalomjegyzékben az előző oldalra ugráshoz kattintson erre a gombra."
+
+#: kchmsearchtoolbar.cpp:139
+msgid "Next page in TOC"
+msgstr "Következő oldal a tartalomjegyzékben"
+
+#: kchmsearchtoolbar.cpp:144
+msgid "Click this button to go to next page in Table of Content."
+msgstr "A tartalomjegyzékben a következő oldalra ugráshoz kattintson erre a gombra."
+
+#: kchmsearchtoolbar.cpp:150
+msgid "&Increase font"
+msgstr "&Betűméret növelése"
+
+#: kchmsearchtoolbar.cpp:151
+msgid "&Decrease font"
+msgstr "&Betűméret csökkentése"
+
+#: kchmsearchtoolbar.cpp:152
+msgid "&View HTML source"
+msgstr "&HTML forrás megtekintése"
+
+#: kchmsearchtoolbar.cpp:155
+msgid "&Bookmark this page"
+msgstr "&Oldal berakása a könyvjelzőbe"
+
+#: kchmsearchtoolbar.cpp:158
+msgid "&Full screen"
+msgstr "&Teljes képernyő"
+
+#: kchmsearchtoolbar.cpp:160
+msgid "&Show contents window"
+msgstr "&Tartalom ablak mutatása"
+
+#: kchmsearchtoolbar.cpp:162
+msgid "&Locate in contents window"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:215
+msgid "&Set language"
+msgstr "&Nyelv beállítása"
+
+#: kchmsearchtoolbar.cpp:238
+msgid "&Set codepage"
+msgstr "&Kódlap beállítása"
+
+#: kchmsearchwindow.cpp:36
+msgid "Type in word(s) to search for:"
+msgstr "Adja meg a keresendő szavakat:"
+
+#: kchmsearchwindow.cpp:51
+msgid "Title"
+msgstr "Cím"
+
+#: kchmsearchwindow.cpp:52
+msgid "Location"
+msgstr "Hely"
+
+#: kchmsearchwindow.cpp:60
+msgid "Match similar words"
+msgstr "Hasonló szavak keresése"
+
+#: kchmsearchwindow.cpp:93
+msgid "Search returned %1 result(s)"
+msgstr "Keresés %1 eredményt adott"
+
+#: kchmsearchwindow.cpp:96
+msgid "Search returned no results"
+msgstr "Keresés nem adott vissza eredményt"
+
+#: kchmsearchwindow.cpp:99 kchmviewwindow_qtextbrowser.cpp:216
+msgid "Search failed"
+msgstr "Keresés érvénytelen"
+
+#: kchmsearchwindow.cpp:395
+msgid "How to use search"
+msgstr "Hogyan használja a keresőt"
+
+#: kchmsearchwindow.cpp:396
+msgid ""
+"The search query can contain a few prefixes.\n"
+"A set of words inside the quote marks mean that you are searching for exact "
+"phrase.\n"
+"A word with minus sign means that it should be absent in the search result.\n"
+"A word with plus mark or without any mark means that it must be present in "
+"the search result.\n"
+"\n"
+"Note that only letters and digits are indexed.\n"
+"You cannot search for symbols other than underscope, and these symbols will "
+"be removed from the search query.\n"
+"For example, search for 'C' will give the same result as searching for 'C++'."
+msgstr ""
+
+#: kchmviewwindow_khtmlpart.cpp:161
+msgid "Editor"
+msgstr "Szerkesztő"
+
+#: kchmviewwindow_qtextbrowser.cpp:176
+msgid "Printing (page %1)..."
+msgstr "Nyomtatás (%1 oldal)..."
+
+#: kchmviewwindow_qtextbrowser.cpp:184
+msgid "Printing completed"
+msgstr "Nyomtatás kész"
+
+#: kchmviewwindow_qtextbrowser.cpp:188
+msgid "Printing aborted"
+msgstr "Nyomtatás megszakítva"
+
+#: kchmviewwindow_qtextbrowser.cpp:194
+msgid "%1 - could not print"
+msgstr "%1 - nem nyomtatható"
+
+#: kchmviewwindow_qtextbrowser.cpp:195
+msgid ""
+"Could not print.\n"
+"Your Qt library has been compiled without printing support"
+msgstr ""
+"Nem nyomtatható.\n"
+"A Qt könyvtár nyomtatás támogatás nélkül lett lefordítva."
+
+#: main.cpp:50
+msgid "CHM file viewer"
+msgstr "CHM fájl megjelenítő"
+
diff --git a/po/kchmviewer.pot b/po/kchmviewer.pot
new file mode 100644
index 0000000..a20341e
--- /dev/null
+++ b/po/kchmviewer.pot
@@ -0,0 +1,806 @@
+# SOME DESCRIPTIVE TITLE.
+# This file is put in the public domain.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-03-13 20:31-0700\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. i18n: file kchmsetupdialog.ui line 24
+#: rc.cpp:3
+#, no-c-format
+msgid "KchmViewer settings"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 54
+#: rc.cpp:6
+#, no-c-format
+msgid "General behavior"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 73
+#: rc.cpp:9
+#, no-c-format
+msgid "If no arguments given on load"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 84
+#: rc.cpp:12
+#, no-c-format
+msgid "Open the 'open CHM file' dialog"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 92
+#: rc.cpp:15
+#, no-c-format
+msgid "Open the &last used CHM file, if exist"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 95
+#: rc.cpp:18
+#, no-c-format
+msgid "Alt+L"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 105
+#: rc.cpp:21
+#, no-c-format
+msgid "History"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 124
+#: rc.cpp:24
+#, no-c-format
+msgid "Store history information for"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 143
+#: rc.cpp:28
+#, no-c-format
+msgid "latest files"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 153
+#: rc.cpp:31
+#, no-c-format
+msgid "R&emember extra information for history files"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 156
+#: rc.cpp:34
+#, no-c-format
+msgid "Alt+E"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 159
+#: rc.cpp:37
+#, no-c-format
+msgid ""
+"Remembers the information about the files, which were opened. Remembers last "
+"opened page, search history, font size, bookmarks and so on."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 171
+#: rc.cpp:40
+#, no-c-format
+msgid "CHM security settings"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 182
+#: rc.cpp:43
+#, no-c-format
+msgid "When external link clicked"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 193
+#: rc.cpp:46
+#, no-c-format
+msgid "Alwa&ys open it in external browser"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 196
+#: rc.cpp:49
+#, no-c-format
+msgid "Alt+Y"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 204
+#. i18n: file kchmsetupdialog.ui line 244
+#: rc.cpp:52 rc.cpp:65
+#, no-c-format
+msgid "Ask for confirmation"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 212
+#: rc.cpp:55
+#, no-c-format
+msgid "Do not open the link"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 225
+#: rc.cpp:59
+#, no-c-format
+msgid "When link pointed to a new CHM file clicked"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 236
+#: rc.cpp:62
+#, no-c-format
+msgid "Always open a new CHM file"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 252
+#: rc.cpp:68
+#, no-c-format
+msgid "Do not open a new CHM file"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 266
+#: rc.cpp:71
+#, no-c-format
+msgid "Version-specific settings"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 277
+#: rc.cpp:74
+#, no-c-format
+msgid "Qt version settings"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 299
+#: rc.cpp:77
+#, no-c-format
+msgid ""
+"Enter the path to the program, which will be used as a browser for external "
+"links. A <i>%s</i> symbol will be replaced by the URL clicked."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 325
+#: rc.cpp:80
+#, no-c-format
+msgid "KDE version settings"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 336
+#: rc.cpp:83
+#, no-c-format
+msgid "To show HTML content, use"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 347
+#: rc.cpp:86
+#, no-c-format
+msgid "&QTextBrowser-based widget"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 350
+#: rc.cpp:89
+#, no-c-format
+msgid "Alt+Q"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 358
+#: rc.cpp:92
+#, no-c-format
+msgid "&KHTMLPart-based widget"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 361
+#: rc.cpp:95
+#, no-c-format
+msgid "Alt+K"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 371
+#: rc.cpp:98
+#, no-c-format
+msgid "KHTMLPart security"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 382
+#: rc.cpp:101
+#, no-c-format
+msgid "Enable Java&Script"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 385
+#: rc.cpp:104
+#, no-c-format
+msgid "Alt+S"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 393
+#: rc.cpp:107
+#, no-c-format
+msgid "Enable &plugins"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 396
+#: rc.cpp:110
+#, no-c-format
+msgid "Alt+P"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 404
+#: rc.cpp:113
+#, no-c-format
+msgid "Enable &Java"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 407
+#: rc.cpp:116
+#, no-c-format
+msgid "Alt+J"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 415
+#: rc.cpp:119
+#, no-c-format
+msgid "Enable &refresh"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 418
+#: rc.cpp:122
+#, no-c-format
+msgid "Alt+R"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 432
+#: rc.cpp:125
+#, no-c-format
+msgid "Advanced"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 443
+#: rc.cpp:128
+#, no-c-format
+msgid "View HTML source command uses"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 454
+#: rc.cpp:131
+#, no-c-format
+msgid "Built-in HTML source viewer"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 465
+#: rc.cpp:135
+#, no-c-format
+msgid "E&xternal program, specified below"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 468
+#: rc.cpp:138
+#, no-c-format
+msgid "Alt+X"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 484
+#: rc.cpp:141
+#, no-c-format
+msgid "External program:"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 501
+#: rc.cpp:144
+#, no-c-format
+msgid "Search engine to use"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 528
+#: rc.cpp:148
+#, no-c-format
+msgid ""
+"Use the search based on internal CHM index. This engine cannot search for "
+"any symbols except underscode, does not support multibyte languages, and is "
+"not always available."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 555
+#: rc.cpp:152
+#, no-c-format
+msgid ""
+"Use new kchmviewer internal search engine (recommended). This engine "
+"indexes symbols, so it is possible to search for special symbols (like \"C++"
+"\"). All languages are supported. The index will be generated before the "
+"first search."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 588
+#: rc.cpp:158
+#, no-c-format
+msgid "F1"
+msgstr ""
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr ""
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr ""
+
+#: kchmbookmarkwindow.cpp:44
+msgid "&Add"
+msgstr ""
+
+#: kchmbookmarkwindow.cpp:46
+msgid "&Del"
+msgstr ""
+
+#: kchmbookmarkwindow.cpp:88
+msgid "%1 - add a bookmark"
+msgstr ""
+
+#: kchmbookmarkwindow.cpp:89 kchmbookmarkwindow.cpp:131
+msgid "Enter the name for this bookmark:"
+msgstr ""
+
+#: kchmbookmarkwindow.cpp:130
+msgid "%1 - edit the bookmark name"
+msgstr ""
+
+#: kchmbookmarkwindow.cpp:201
+msgid "&Add bookmark"
+msgstr ""
+
+#: kchmdialogchooseurlfromlist.cpp:34
+msgid "Topics"
+msgstr ""
+
+#: kchmdialogchooseurlfromlist.cpp:39
+msgid "Please select one of the topics below:"
+msgstr ""
+
+#: kchmdialogchooseurlfromlist.cpp:43
+msgid "&Ok"
+msgstr ""
+
+#: kchmmainwindow.cpp:122
+msgid ""
+"%1 version %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2004-2007\n"
+"http://www.kchmviewer.net\n"
+"\n"
+"Licensed under GNU GPL license.\n"
+"\n"
+"Please check my another project, http://www.transientmail.com - temporary e-"
+"mail address, which expires automatically."
+msgstr ""
+
+#: kchmmainwindow.cpp:139
+msgid "*.chm|Compressed Help Manual (*.chm)"
+msgstr ""
+
+#: kchmmainwindow.cpp:141
+msgid "Compressed Help Manual (*.chm)"
+msgstr ""
+
+#: kchmmainwindow.cpp:151
+msgid "Loading aborted"
+msgstr ""
+
+#: kchmmainwindow.cpp:261
+msgid "%1 - failed to load the chm file"
+msgstr ""
+
+#: kchmmainwindow.cpp:262
+msgid "Unable to load the chm file %1"
+msgstr ""
+
+#: kchmmainwindow.cpp:272
+msgid "Could not load file %1"
+msgstr ""
+
+#: kchmmainwindow.cpp:288
+msgid "About %1"
+msgstr ""
+
+#: kchmmainwindow.cpp:374
+msgid "%1 - remote link clicked - %2"
+msgstr ""
+
+#: kchmmainwindow.cpp:375
+msgid ""
+"A remote link %1 will start the external program to open it.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&Yes"
+msgstr ""
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&No"
+msgstr ""
+
+#: kchmmainwindow.cpp:400
+msgid "%1 - JavsScript link clicked"
+msgstr ""
+
+#: kchmmainwindow.cpp:401
+msgid ""
+"You have clicked a JavaScript link.\n"
+"To prevent security-related issues JavaScript URLs are disabled in CHM files."
+msgstr ""
+
+#: kchmmainwindow.cpp:409
+msgid "%1 - link to a new CHM file clicked"
+msgstr ""
+
+#: kchmmainwindow.cpp:410
+msgid ""
+"You have clicked a link, which leads to a new CHM file %1.\n"
+"The current file will be closed.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+
+#: kchmmainwindow.cpp:474
+msgid "File Operations"
+msgstr ""
+
+#: kchmmainwindow.cpp:478
+msgid "Open File"
+msgstr ""
+
+#: kchmmainwindow.cpp:484
+msgid "Click this button to open an existing chm file."
+msgstr ""
+
+#: kchmmainwindow.cpp:489
+msgid "Print File"
+msgstr ""
+
+#: kchmmainwindow.cpp:495
+msgid "Click this button to print the current page"
+msgstr ""
+
+#: kchmmainwindow.cpp:510
+msgid "E&xtract CHM content..."
+msgstr ""
+
+#: kchmmainwindow.cpp:511
+msgid ""
+"Click this button to extract the whole CHM file content into a specific "
+"directory"
+msgstr ""
+
+#: kchmmainwindow.cpp:517
+msgid "&Recent files"
+msgstr ""
+
+#: kchmmainwindow.cpp:526
+msgid "&Select all"
+msgstr ""
+
+#: kchmmainwindow.cpp:544
+msgid "&Change settings..."
+msgstr ""
+
+#: kchmmainwindow.cpp:551
+msgid "About &Qt"
+msgstr ""
+
+#: kchmmainwindow.cpp:553
+msgid "What's &This"
+msgstr ""
+
+#: kchmmainwindow.cpp:836
+msgid ""
+"Changing browser view options or search engine used\n"
+"requires restarting the application to take effect."
+msgstr ""
+
+#: kchmmainwindow.cpp:954
+msgid "Index"
+msgstr ""
+
+#: kchmmainwindow.cpp:977 kchmsearchengine.cpp:246
+msgid "Search"
+msgstr ""
+
+#: kchmmainwindow.cpp:1044
+msgid "Could not locate opened topic in content window"
+msgstr ""
+
+#: kchmmainwindow.cpp:1056 kchmmainwindow.cpp:1062
+msgid "Choose a directory to store CHM content"
+msgstr ""
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting CHM content"
+msgstr ""
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting files..."
+msgstr ""
+
+#: kchmmainwindow.cpp:1075
+msgid "Abort"
+msgstr ""
+
+#: kchmnavtoolbar.cpp:33
+msgid "Navigation"
+msgstr ""
+
+#: kchmnavtoolbar.cpp:37
+msgid "Move backward in history"
+msgstr ""
+
+#: kchmnavtoolbar.cpp:42
+msgid "Click this button to move backward in browser history"
+msgstr ""
+
+#: kchmnavtoolbar.cpp:46
+msgid "Move forward in history"
+msgstr ""
+
+#: kchmnavtoolbar.cpp:51
+msgid "Click this button to move forward in browser history"
+msgstr ""
+
+#: kchmnavtoolbar.cpp:55
+msgid "Go to the home page"
+msgstr ""
+
+#: kchmnavtoolbar.cpp:60
+msgid "Click this button to move to the home page"
+msgstr ""
+
+#: kchmsearchengine.cpp:246
+msgid "A closing quote character is missing."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:50
+msgid "Find in page"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:67
+msgid "Enter here the text to search in the current page."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:74
+msgid "Previous search result"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:79
+msgid "Click this button to find previous search result."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:83
+msgid "Next search result"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:88
+msgid "Click this button to find next search result."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:92
+msgid "Locate this topic in content window"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:97
+msgid ""
+"Click this button to find current topic in the content window, and open it."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:101
+msgid "Increase font size"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:106
+msgid "Click this button to increase the font size."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:110
+msgid "Decrease font size"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:115
+msgid "Click this button to decrease the font size."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:119
+msgid "View HTML source"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:124
+msgid "Click this button to open a separate window with the page HTML source."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:128
+msgid "Add to bookmarks"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:133
+msgid "Click this button to add the current page to the bookmarks list."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:136
+msgid "Prev page in TOC"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:141
+msgid "Click this button to go to previous page in Table Of Content."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:144
+msgid "Next page in TOC"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:149
+msgid "Click this button to go to next page in Table of Content."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:155
+msgid "&Increase font"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:156
+msgid "&Decrease font"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:157
+msgid "&View HTML source"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:160
+msgid "&Bookmark this page"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:163
+msgid "&Full screen"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:165
+msgid "&Show contents window"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:167
+msgid "&Locate in contents window"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:220
+msgid "&Set language"
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:243
+msgid "&Set codepage"
+msgstr ""
+
+#: kchmsearchwindow.cpp:43
+msgid "Type in word(s) to search for:"
+msgstr ""
+
+#: kchmsearchwindow.cpp:46
+msgid "<a href=\"q\"><b>Help</b></a>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:58
+msgid "Go"
+msgstr ""
+
+#: kchmsearchwindow.cpp:66
+msgid "Title"
+msgstr ""
+
+#: kchmsearchwindow.cpp:67
+msgid "Location"
+msgstr ""
+
+#: kchmsearchwindow.cpp:130
+msgid "Search returned %1 result(s)"
+msgstr ""
+
+#: kchmsearchwindow.cpp:133
+msgid "Search returned no results"
+msgstr ""
+
+#: kchmsearchwindow.cpp:136 kchmviewwindow_qtextbrowser.cpp:211
+msgid "Search failed"
+msgstr ""
+
+#: kchmsearchwindow.cpp:169 kchmsearchwindow.cpp:175
+msgid "How to use search"
+msgstr ""
+
+#: kchmsearchwindow.cpp:170
+msgid ""
+"<html><p>The improved search engine allows you to search for a word, symbol "
+"or phrase, which is set of words and symbols included in quotes. Only the "
+"documents which include all the terms speficide in th search query are "
+"shown; no prefixes needed.<p>Unlike MS CHM internal search index, my "
+"improved search engine indexes everything, including special symbols. "
+"Therefore it is possible to search (and find!) for something like <i>$q = "
+"new ChmFile();</i>. This search also fully supports Unicode, which means "
+"that you can search in non-English documents.<p>If you want to search for a "
+"quote symbol, use quotation mark instead. The engine treats a quote and a "
+"quotation mark as the same symbol, which allows to use them in phrases.</"
+"html>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:176
+msgid ""
+"The search query can contain a few prefixes.\n"
+"A set of words inside the quote marks mean that you are searching for exact "
+"phrase.\n"
+"A word with minus sign means that it should be absent in the search result.\n"
+"A word with plus mark or without any mark means that it must be present in "
+"the search result.\n"
+"\n"
+"Note that only letters and digits are indexed.\n"
+"You cannot search for non-character symbols other than underscope, and those "
+"symbols will be removed from the search query.\n"
+"For example, search for 'C' will give the same result as searching for 'C++'."
+msgstr ""
+
+#: kchmsearchwindow.cpp:226
+msgid "Search is not available"
+msgstr ""
+
+#: kchmsearchwindow.cpp:227
+msgid ""
+"<p>The search feature is not avaiable for this chm file.<p>The old search "
+"engine depends on indexes present in chm files itself. Not every chm file "
+"has an index; it is set up during chm file creation. Therefore if the search "
+"index was not created during chm file creation, this makes search impossible."
+"<p>Solution: use new search engine (menu Settings/Advanced), which generates "
+"its own index."
+msgstr ""
+
+#: kchmviewwindow_qtextbrowser.cpp:171
+msgid "Printing (page %1)..."
+msgstr ""
+
+#: kchmviewwindow_qtextbrowser.cpp:179
+msgid "Printing completed"
+msgstr ""
+
+#: kchmviewwindow_qtextbrowser.cpp:183
+msgid "Printing aborted"
+msgstr ""
+
+#: kchmviewwindow_qtextbrowser.cpp:189
+msgid "%1 - could not print"
+msgstr ""
+
+#: kchmviewwindow_qtextbrowser.cpp:190
+msgid ""
+"Could not print.\n"
+"Your Qt library has been compiled without printing support"
+msgstr ""
+
+#: kchmviewwindowmgr.cpp:65
+msgid "&Window"
+msgstr ""
+
+#: main.cpp:46
+msgid ""
+"'--search <query>' specifies the search query to search, and activate the "
+"first entry if found"
+msgstr ""
+
+#: main.cpp:47
+msgid ""
+"'--sindex <word>' specifies the word to find in index, and activate if found"
+msgstr ""
+
+#: main.cpp:54
+msgid "CHM file viewer"
+msgstr ""
diff --git a/po/ru.po b/po/ru.po
new file mode 100644
index 0000000..3edf720
--- /dev/null
+++ b/po/ru.po
@@ -0,0 +1,865 @@
+# translation of rus.po to
+# translation of rus.po_[kVB7nc].po to
+# This file is put in the public domain.
+#
+# Ivan Bobrov <ibobrik@gmail.com>, 2006.
+# George Yunaev <gyunaev@ulduzsoft.com>, 2006.
+msgid ""
+msgstr ""
+"Project-Id-Version: rus\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-03-13 20:31-0700\n"
+"PO-Revision-Date: 2006-02-04 15:29-0800\n"
+"Last-Translator: George Yunaev <gyunaev@ulduzsoft.com>\n"
+"Language-Team: <en@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.1\n"
+
+#. i18n: file kchmsetupdialog.ui line 24
+#: rc.cpp:3
+#, no-c-format
+msgid "KchmViewer settings"
+msgstr "Настройки программы"
+
+#. i18n: file kchmsetupdialog.ui line 54
+#: rc.cpp:6
+#, no-c-format
+msgid "General behavior"
+msgstr "Общие"
+
+#. i18n: file kchmsetupdialog.ui line 73
+#: rc.cpp:9
+#, no-c-format
+msgid "If no arguments given on load"
+msgstr "Если программа запущена без аргументов"
+
+#. i18n: file kchmsetupdialog.ui line 84
+#: rc.cpp:12
+#, no-c-format
+msgid "Open the 'open CHM file' dialog"
+msgstr "Показать диалог открытия файла"
+
+#. i18n: file kchmsetupdialog.ui line 92
+#: rc.cpp:15
+#, no-c-format
+msgid "Open the &last used CHM file, if exist"
+msgstr "Открыть последний использовавшийся файл"
+
+#. i18n: file kchmsetupdialog.ui line 95
+#: rc.cpp:18
+#, no-c-format
+msgid "Alt+L"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 105
+#: rc.cpp:21
+#, no-c-format
+msgid "History"
+msgstr "История"
+
+#. i18n: file kchmsetupdialog.ui line 124
+#: rc.cpp:24
+#, no-c-format
+msgid "Store history information for"
+msgstr "Сохранять историю"
+
+#. i18n: file kchmsetupdialog.ui line 143
+#: rc.cpp:28
+#, no-c-format
+msgid "latest files"
+msgstr "Просмотренные файлы"
+
+#. i18n: file kchmsetupdialog.ui line 153
+#: rc.cpp:31
+#, no-c-format
+msgid "R&emember extra information for history files"
+msgstr "Сохранять дополнительную информацию в файлах истории"
+
+#. i18n: file kchmsetupdialog.ui line 156
+#: rc.cpp:34
+#, no-c-format
+msgid "Alt+E"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 159
+#: rc.cpp:37
+#, no-c-format
+msgid ""
+"Remembers the information about the files, which were opened. Remembers last "
+"opened page, search history, font size, bookmarks and so on."
+msgstr ""
+"Запомнить информацию о файлах, которые были открыты. запоминать последнюю "
+"открытую страницу, историю поиска, размер шрифта, закладки..."
+
+#. i18n: file kchmsetupdialog.ui line 171
+#: rc.cpp:40
+#, no-c-format
+msgid "CHM security settings"
+msgstr "Настройка безопасности CHM"
+
+#. i18n: file kchmsetupdialog.ui line 182
+#: rc.cpp:43
+#, no-c-format
+msgid "When external link clicked"
+msgstr "При нажатии на внешнюю ссылку"
+
+#. i18n: file kchmsetupdialog.ui line 193
+#: rc.cpp:46
+#, no-c-format
+msgid "Alwa&ys open it in external browser"
+msgstr "Всегда открывать во внешнем браузере"
+
+#. i18n: file kchmsetupdialog.ui line 196
+#: rc.cpp:49
+#, no-c-format
+msgid "Alt+Y"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 204
+#. i18n: file kchmsetupdialog.ui line 244
+#: rc.cpp:52 rc.cpp:65
+#, no-c-format
+msgid "Ask for confirmation"
+msgstr "Спрашивать подтверждение"
+
+#. i18n: file kchmsetupdialog.ui line 212
+#: rc.cpp:55
+#, no-c-format
+msgid "Do not open the link"
+msgstr "Не открывать ссылку"
+
+#. i18n: file kchmsetupdialog.ui line 225
+#: rc.cpp:59
+#, no-c-format
+msgid "When link pointed to a new CHM file clicked"
+msgstr "Когда ссылка ведет на новый CHM файл"
+
+#. i18n: file kchmsetupdialog.ui line 236
+#: rc.cpp:62
+#, no-c-format
+msgid "Always open a new CHM file"
+msgstr "Всегда открывать файл"
+
+#. i18n: file kchmsetupdialog.ui line 252
+#: rc.cpp:68
+#, no-c-format
+msgid "Do not open a new CHM file"
+msgstr "Не открывать файл"
+
+#. i18n: file kchmsetupdialog.ui line 266
+#: rc.cpp:71
+#, no-c-format
+msgid "Version-specific settings"
+msgstr "Зависимые от версии настройки"
+
+#. i18n: file kchmsetupdialog.ui line 277
+#: rc.cpp:74
+#, no-c-format
+msgid "Qt version settings"
+msgstr "Настройки QT"
+
+#. i18n: file kchmsetupdialog.ui line 299
+#: rc.cpp:77
+#, no-c-format
+msgid ""
+"Enter the path to the program, which will be used as a browser for external "
+"links. A <i>%s</i> symbol will be replaced by the URL clicked."
+msgstr ""
+"Ввести путь к программе, которая будет использована как браузер для внешних "
+"ссылок. <i>%s</i> будет замененен ссылкой"
+
+#. i18n: file kchmsetupdialog.ui line 325
+#: rc.cpp:80
+#, no-c-format
+msgid "KDE version settings"
+msgstr "Настройки KDE"
+
+#. i18n: file kchmsetupdialog.ui line 336
+#: rc.cpp:83
+#, no-c-format
+msgid "To show HTML content, use"
+msgstr "Для отображения HTML использовать просмотрщик"
+
+#. i18n: file kchmsetupdialog.ui line 347
+#: rc.cpp:86
+#, no-c-format
+msgid "&QTextBrowser-based widget"
+msgstr "основанный на QTextBrowser"
+
+#. i18n: file kchmsetupdialog.ui line 350
+#: rc.cpp:89
+#, no-c-format
+msgid "Alt+Q"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 358
+#: rc.cpp:92
+#, no-c-format
+msgid "&KHTMLPart-based widget"
+msgstr "основанный на KHTML"
+
+#. i18n: file kchmsetupdialog.ui line 361
+#: rc.cpp:95
+#, no-c-format
+msgid "Alt+K"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 371
+#: rc.cpp:98
+#, no-c-format
+msgid "KHTMLPart security"
+msgstr "Настройки безопасности KHTML"
+
+#. i18n: file kchmsetupdialog.ui line 382
+#: rc.cpp:101
+#, no-c-format
+msgid "Enable Java&Script"
+msgstr "Разрешить JavaScript"
+
+#. i18n: file kchmsetupdialog.ui line 385
+#: rc.cpp:104
+#, no-c-format
+msgid "Alt+S"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 393
+#: rc.cpp:107
+#, no-c-format
+msgid "Enable &plugins"
+msgstr "Разрешить плагины"
+
+#. i18n: file kchmsetupdialog.ui line 396
+#: rc.cpp:110
+#, no-c-format
+msgid "Alt+P"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 404
+#: rc.cpp:113
+#, no-c-format
+msgid "Enable &Java"
+msgstr "Разрешить Java"
+
+#. i18n: file kchmsetupdialog.ui line 407
+#: rc.cpp:116
+#, no-c-format
+msgid "Alt+J"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 415
+#: rc.cpp:119
+#, no-c-format
+msgid "Enable &refresh"
+msgstr "Разрешить meta refresh"
+
+#. i18n: file kchmsetupdialog.ui line 418
+#: rc.cpp:122
+#, no-c-format
+msgid "Alt+R"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 432
+#: rc.cpp:125
+#, no-c-format
+msgid "Advanced"
+msgstr "Дополнительно"
+
+#. i18n: file kchmsetupdialog.ui line 443
+#: rc.cpp:128
+#, no-c-format
+msgid "View HTML source command uses"
+msgstr "Для отображения исходного кода HTML использовать"
+
+#. i18n: file kchmsetupdialog.ui line 454
+#: rc.cpp:131
+#, no-c-format
+msgid "Built-in HTML source viewer"
+msgstr "Встроенный просмотрщик кода"
+
+#. i18n: file kchmsetupdialog.ui line 465
+#: rc.cpp:135
+#, no-c-format
+msgid "E&xternal program, specified below"
+msgstr "Внешнюю программу, указанную ниже"
+
+#. i18n: file kchmsetupdialog.ui line 468
+#: rc.cpp:138
+#, no-c-format
+msgid "Alt+X"
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 484
+#: rc.cpp:141
+#, no-c-format
+msgid "External program:"
+msgstr "Внешняя программа"
+
+#. i18n: file kchmsetupdialog.ui line 501
+#: rc.cpp:144
+#, fuzzy, no-c-format
+msgid "Search engine to use"
+msgstr "Поиск не нашел ничего"
+
+#. i18n: file kchmsetupdialog.ui line 528
+#: rc.cpp:148
+#, no-c-format
+msgid ""
+"Use the search based on internal CHM index. This engine cannot search for "
+"any symbols except underscode, does not support multibyte languages, and is "
+"not always available."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 555
+#: rc.cpp:152
+#, no-c-format
+msgid ""
+"Use new kchmviewer internal search engine (recommended). This engine "
+"indexes symbols, so it is possible to search for special symbols (like \"C++"
+"\"). All languages are supported. The index will be generated before the "
+"first search."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 588
+#: rc.cpp:158
+#, no-c-format
+msgid "F1"
+msgstr ""
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr ""
+"_: NAME OF TRANSLATORS\n"
+"Иван Бобров"
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr ""
+"_: EMAIL OF TRANSLATORS\n"
+"ibobrik@gmail.com"
+
+#: kchmbookmarkwindow.cpp:44
+msgid "&Add"
+msgstr "Добавить"
+
+#: kchmbookmarkwindow.cpp:46
+msgid "&Del"
+msgstr "Удалить"
+
+#: kchmbookmarkwindow.cpp:88
+msgid "%1 - add a bookmark"
+msgstr "%1 - добавить закладку"
+
+#: kchmbookmarkwindow.cpp:89 kchmbookmarkwindow.cpp:131
+msgid "Enter the name for this bookmark:"
+msgstr "Введите имя для этой закладки"
+
+#: kchmbookmarkwindow.cpp:130
+msgid "%1 - edit the bookmark name"
+msgstr "%1 - редактировать имя закладки"
+
+#: kchmbookmarkwindow.cpp:201
+#, fuzzy
+msgid "&Add bookmark"
+msgstr "Добавить в избранное"
+
+#: kchmdialogchooseurlfromlist.cpp:34
+msgid "Topics"
+msgstr "Темы"
+
+#: kchmdialogchooseurlfromlist.cpp:39
+msgid "Please select one of the topics below:"
+msgstr "Выберите одну из тем из списка ниже"
+
+#: kchmdialogchooseurlfromlist.cpp:43
+msgid "&Ok"
+msgstr "Ок"
+
+#: kchmmainwindow.cpp:122
+#, fuzzy
+msgid ""
+"%1 version %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2004-2007\n"
+"http://www.kchmviewer.net\n"
+"\n"
+"Licensed under GNU GPL license.\n"
+"\n"
+"Please check my another project, http://www.transientmail.com - temporary e-"
+"mail address, which expires automatically."
+msgstr ""
+"%1 Версия %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2005-2006\n"
+"www.kchmviewer.net\n"
+"\n"
+"Лицензировано в соответствии с GNU GPL\n"
+"\n"
+"Попробуйте наш другой проект, www.transientmail.com - e-mail адрес, который "
+"уничтожается самостоятельно."
+
+#: kchmmainwindow.cpp:139
+msgid "*.chm|Compressed Help Manual (*.chm)"
+msgstr ""
+
+#: kchmmainwindow.cpp:141
+msgid "Compressed Help Manual (*.chm)"
+msgstr ""
+
+#: kchmmainwindow.cpp:151
+msgid "Loading aborted"
+msgstr "Загрузка отменена"
+
+#: kchmmainwindow.cpp:261
+msgid "%1 - failed to load the chm file"
+msgstr "%1 - невозможно открыть CHM файл"
+
+#: kchmmainwindow.cpp:262
+msgid "Unable to load the chm file %1"
+msgstr "Невозможно загрузить CHM файл %1"
+
+#: kchmmainwindow.cpp:272
+msgid "Could not load file %1"
+msgstr "Нельзя открыть CHM файл %1"
+
+#: kchmmainwindow.cpp:288
+msgid "About %1"
+msgstr "О программе %1"
+
+#: kchmmainwindow.cpp:374
+msgid "%1 - remote link clicked - %2"
+msgstr "%1 - нажата внешняя ссылка - %2"
+
+#: kchmmainwindow.cpp:375
+msgid ""
+"A remote link %1 will start the external program to open it.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"Для обработки ссылки %1 будет запущена внешняя программа.\n"
+"\n"
+"Продолжить?"
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&Yes"
+msgstr "Да"
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&No"
+msgstr "Нет"
+
+#: kchmmainwindow.cpp:400
+msgid "%1 - JavsScript link clicked"
+msgstr "%1 - нажата ссылка на JavaScript"
+
+#: kchmmainwindow.cpp:401
+msgid ""
+"You have clicked a JavaScript link.\n"
+"To prevent security-related issues JavaScript URLs are disabled in CHM files."
+msgstr ""
+"Вы нажали ссылку на код JavaScript.\n"
+"Для обеспечения безопасности все ссылки на JavaScript отключены."
+
+#: kchmmainwindow.cpp:409
+msgid "%1 - link to a new CHM file clicked"
+msgstr "%1 - нажата ссылка на новый CHM файл"
+
+#: kchmmainwindow.cpp:410
+msgid ""
+"You have clicked a link, which leads to a new CHM file %1.\n"
+"The current file will be closed.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"Вы нажали на ссылку, которая ведет в другой CHM файл %1.\n"
+"Он будет открыт, а текущий файл будет закрыт.\n"
+"\n"
+"Продолжить??"
+
+#: kchmmainwindow.cpp:474
+msgid "File Operations"
+msgstr "Файловые операции"
+
+#: kchmmainwindow.cpp:478
+msgid "Open File"
+msgstr "Открыть файл"
+
+#: kchmmainwindow.cpp:484
+msgid "Click this button to open an existing chm file."
+msgstr "Нажмите на эту кнопку для открытия существующего CHM файла"
+
+#: kchmmainwindow.cpp:489
+msgid "Print File"
+msgstr "Печать"
+
+#: kchmmainwindow.cpp:495
+msgid "Click this button to print the current page"
+msgstr "Нажмите на эту кнопку для печати текущей страницы"
+
+#: kchmmainwindow.cpp:510
+msgid "E&xtract CHM content..."
+msgstr ""
+
+#: kchmmainwindow.cpp:511
+#, fuzzy
+msgid ""
+"Click this button to extract the whole CHM file content into a specific "
+"directory"
+msgstr "Нажмите на эту кнопку для поиска данной темы в окне содержания"
+
+#: kchmmainwindow.cpp:517
+msgid "&Recent files"
+msgstr "Последние файлы"
+
+#: kchmmainwindow.cpp:526
+msgid "&Select all"
+msgstr "Выбрать все"
+
+#: kchmmainwindow.cpp:544
+msgid "&Change settings..."
+msgstr "Изменить настройки"
+
+#: kchmmainwindow.cpp:551
+msgid "About &Qt"
+msgstr "О библиотеке Qt..."
+
+#: kchmmainwindow.cpp:553
+msgid "What's &This"
+msgstr "Что это"
+
+#: kchmmainwindow.cpp:836
+msgid ""
+"Changing browser view options or search engine used\n"
+"requires restarting the application to take effect."
+msgstr ""
+
+#: kchmmainwindow.cpp:954
+msgid "Index"
+msgstr "Индекс"
+
+#: kchmmainwindow.cpp:977 kchmsearchengine.cpp:246
+msgid "Search"
+msgstr "Поиск"
+
+#: kchmmainwindow.cpp:1044
+msgid "Could not locate opened topic in content window"
+msgstr "Невозможно найти открытую тему в окне контента"
+
+#: kchmmainwindow.cpp:1056 kchmmainwindow.cpp:1062
+msgid "Choose a directory to store CHM content"
+msgstr ""
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting CHM content"
+msgstr ""
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting files..."
+msgstr ""
+
+#: kchmmainwindow.cpp:1075
+#, fuzzy
+msgid "Abort"
+msgstr "О программе %1"
+
+#: kchmnavtoolbar.cpp:33
+msgid "Navigation"
+msgstr "Навигация"
+
+#: kchmnavtoolbar.cpp:37
+msgid "Move backward in history"
+msgstr "Вернуться назад в историю"
+
+#: kchmnavtoolbar.cpp:42
+msgid "Click this button to move backward in browser history"
+msgstr ""
+"Нажмите на эту кнопку для возвращения назад в истории сохраненных страниц"
+
+#: kchmnavtoolbar.cpp:46
+msgid "Move forward in history"
+msgstr "Переместится вперед в историю"
+
+#: kchmnavtoolbar.cpp:51
+msgid "Click this button to move forward in browser history"
+msgstr ""
+"Нажмите на эту кнопку для перемещения вперед в истории сохраненных страниц"
+
+#: kchmnavtoolbar.cpp:55
+msgid "Go to the home page"
+msgstr "Перейти на домашнюю страницу"
+
+#: kchmnavtoolbar.cpp:60
+msgid "Click this button to move to the home page"
+msgstr "Нажмите на эту кнопку для перемещения на домашнюю страницу"
+
+#: kchmsearchengine.cpp:246
+msgid "A closing quote character is missing."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:50
+msgid "Find in page"
+msgstr "Найти на странице"
+
+#: kchmsearchtoolbar.cpp:67
+msgid "Enter here the text to search in the current page."
+msgstr "Введите здесь текст для поиска в данной странице"
+
+#: kchmsearchtoolbar.cpp:74
+msgid "Previous search result"
+msgstr "Предыдущие результат поиска"
+
+#: kchmsearchtoolbar.cpp:79
+msgid "Click this button to find previous search result."
+msgstr "Нажмите на эту кнопку для отображения предыдущего результата поиска"
+
+#: kchmsearchtoolbar.cpp:83
+msgid "Next search result"
+msgstr "Следующий результат поиска"
+
+#: kchmsearchtoolbar.cpp:88
+msgid "Click this button to find next search result."
+msgstr "Нажмите на эту кнопку для отображения следующего результата поиска"
+
+#: kchmsearchtoolbar.cpp:92
+msgid "Locate this topic in content window"
+msgstr "Найти тему в данном окне"
+
+#: kchmsearchtoolbar.cpp:97
+msgid ""
+"Click this button to find current topic in the content window, and open it."
+msgstr "Нажмите на эту кнопку для поиска данной темы в окне содержания"
+
+#: kchmsearchtoolbar.cpp:101
+msgid "Increase font size"
+msgstr "Увеличить размер шрифта"
+
+#: kchmsearchtoolbar.cpp:106
+msgid "Click this button to increase the font size."
+msgstr "Нажмите на эту кнопку для увеличения размера шрифта"
+
+#: kchmsearchtoolbar.cpp:110
+msgid "Decrease font size"
+msgstr "Уменьшить размер шрифта"
+
+#: kchmsearchtoolbar.cpp:115
+msgid "Click this button to decrease the font size."
+msgstr "Нажмите на эту кнопку для уменьшения размера шрифта"
+
+#: kchmsearchtoolbar.cpp:119
+msgid "View HTML source"
+msgstr "Просмотреть исходный код HTML"
+
+#: kchmsearchtoolbar.cpp:124
+msgid "Click this button to open a separate window with the page HTML source."
+msgstr ""
+"Нажмите на эту кнопку для открытия отдельного окна с исходным кодом HTML"
+
+#: kchmsearchtoolbar.cpp:128
+msgid "Add to bookmarks"
+msgstr "Добавить в избранное"
+
+#: kchmsearchtoolbar.cpp:133
+msgid "Click this button to add the current page to the bookmarks list."
+msgstr "Нажмите на эту кнопку для добавления текущей страницы в закладки"
+
+#: kchmsearchtoolbar.cpp:136
+msgid "Prev page in TOC"
+msgstr "Предыдущая страница в содержании"
+
+#: kchmsearchtoolbar.cpp:141
+msgid "Click this button to go to previous page in Table Of Content."
+msgstr "Нажмите на эту кнопку для перехода к предыдущей странице в содержании"
+
+#: kchmsearchtoolbar.cpp:144
+msgid "Next page in TOC"
+msgstr "Следующая страница содержания"
+
+#: kchmsearchtoolbar.cpp:149
+msgid "Click this button to go to next page in Table of Content."
+msgstr "Нажмите на эту кнопку для перехода к следующей странице в содержании"
+
+#: kchmsearchtoolbar.cpp:155
+msgid "&Increase font"
+msgstr "Увеличить размер шрифта"
+
+#: kchmsearchtoolbar.cpp:156
+msgid "&Decrease font"
+msgstr "Уменьшить размер шрифта"
+
+#: kchmsearchtoolbar.cpp:157
+msgid "&View HTML source"
+msgstr "Просмотреть исходный код HTML"
+
+#: kchmsearchtoolbar.cpp:160
+msgid "&Bookmark this page"
+msgstr "Добавить страницу в закладки"
+
+#: kchmsearchtoolbar.cpp:163
+msgid "&Full screen"
+msgstr "Во весь экран"
+
+#: kchmsearchtoolbar.cpp:165
+msgid "&Show contents window"
+msgstr "Показать окно содержания"
+
+#: kchmsearchtoolbar.cpp:167
+msgid "&Locate in contents window"
+msgstr "Найти в окне содержания"
+
+#: kchmsearchtoolbar.cpp:220
+msgid "&Set language"
+msgstr "Установить язык"
+
+#: kchmsearchtoolbar.cpp:243
+msgid "&Set codepage"
+msgstr "Установить кодировку"
+
+#: kchmsearchwindow.cpp:43
+msgid "Type in word(s) to search for:"
+msgstr "Введите слова для поиска:"
+
+#: kchmsearchwindow.cpp:46
+msgid "<a href=\"q\"><b>Help</b></a>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:58
+msgid "Go"
+msgstr ""
+
+#: kchmsearchwindow.cpp:66
+msgid "Title"
+msgstr "Заголовок"
+
+#: kchmsearchwindow.cpp:67
+msgid "Location"
+msgstr "Местонахождение"
+
+#: kchmsearchwindow.cpp:130
+msgid "Search returned %1 result(s)"
+msgstr "Поиск вернул %1 результат(ов)"
+
+#: kchmsearchwindow.cpp:133
+msgid "Search returned no results"
+msgstr "Поиск не нашел ничего"
+
+#: kchmsearchwindow.cpp:136 kchmviewwindow_qtextbrowser.cpp:211
+msgid "Search failed"
+msgstr "Поиск не удался"
+
+#: kchmsearchwindow.cpp:169 kchmsearchwindow.cpp:175
+msgid "How to use search"
+msgstr "Как использовать поиск"
+
+#: kchmsearchwindow.cpp:170
+msgid ""
+"<html><p>The improved search engine allows you to search for a word, symbol "
+"or phrase, which is set of words and symbols included in quotes. Only the "
+"documents which include all the terms speficide in th search query are "
+"shown; no prefixes needed.<p>Unlike MS CHM internal search index, my "
+"improved search engine indexes everything, including special symbols. "
+"Therefore it is possible to search (and find!) for something like <i>$q = "
+"new ChmFile();</i>. This search also fully supports Unicode, which means "
+"that you can search in non-English documents.<p>If you want to search for a "
+"quote symbol, use quotation mark instead. The engine treats a quote and a "
+"quotation mark as the same symbol, which allows to use them in phrases.</"
+"html>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:176
+#, fuzzy
+msgid ""
+"The search query can contain a few prefixes.\n"
+"A set of words inside the quote marks mean that you are searching for exact "
+"phrase.\n"
+"A word with minus sign means that it should be absent in the search result.\n"
+"A word with plus mark or without any mark means that it must be present in "
+"the search result.\n"
+"\n"
+"Note that only letters and digits are indexed.\n"
+"You cannot search for non-character symbols other than underscope, and those "
+"symbols will be removed from the search query.\n"
+"For example, search for 'C' will give the same result as searching for 'C++'."
+msgstr ""
+"Запрос поиска может содержать несколько префиксов.\n"
+"Набор слов в кавычках обозначает точное совпадение фразы.\n"
+"Слово с минусом спереди должно отсутствовать в результатах поиска.\n"
+"Слово с плюсом, или без какого-либо префикса обозначает, что слово должно "
+"присутствовать в результатах поиска.\n"
+"\n"
+"Имейте ввиду, что в CHM файле индексированы для поиска только буквы и цифры. "
+"Вы не можете делать поиск по другим символам, кроме подчеркивания - они "
+"будут удалены из запроса\n"
+"К примеру, запрос 'C' вернет тот же результат поиска, что и запрос, "
+"содержащий 'C++'"
+
+#: kchmsearchwindow.cpp:226
+#, fuzzy
+msgid "Search is not available"
+msgstr "Поиск не удался"
+
+#: kchmsearchwindow.cpp:227
+msgid ""
+"<p>The search feature is not avaiable for this chm file.<p>The old search "
+"engine depends on indexes present in chm files itself. Not every chm file "
+"has an index; it is set up during chm file creation. Therefore if the search "
+"index was not created during chm file creation, this makes search impossible."
+"<p>Solution: use new search engine (menu Settings/Advanced), which generates "
+"its own index."
+msgstr ""
+
+#: kchmviewwindow_qtextbrowser.cpp:171
+msgid "Printing (page %1)..."
+msgstr "Печать страницы № %1..."
+
+#: kchmviewwindow_qtextbrowser.cpp:179
+msgid "Printing completed"
+msgstr "Печать завершена"
+
+#: kchmviewwindow_qtextbrowser.cpp:183
+msgid "Printing aborted"
+msgstr "Печать отменена"
+
+#: kchmviewwindow_qtextbrowser.cpp:189
+msgid "%1 - could not print"
+msgstr "%1 - печать невозможна"
+
+#: kchmviewwindow_qtextbrowser.cpp:190
+msgid ""
+"Could not print.\n"
+"Your Qt library has been compiled without printing support"
+msgstr ""
+"Печать невозможна.\n"
+"Ваша библиотека QT была собрана без поддержки печати."
+
+#: kchmviewwindowmgr.cpp:65
+msgid "&Window"
+msgstr ""
+
+#: main.cpp:46
+msgid ""
+"'--search <query>' specifies the search query to search, and activate the "
+"first entry if found"
+msgstr ""
+
+#: main.cpp:47
+msgid ""
+"'--sindex <word>' specifies the word to find in index, and activate if found"
+msgstr ""
+
+#: main.cpp:54
+msgid "CHM file viewer"
+msgstr "Просмотрщик CHM файлов"
+
+#~ msgid "Match similar words"
+#~ msgstr "Искать похожие слова"
+
+#~ msgid "&Setup"
+#~ msgstr "Настройка"
+
+#~ msgid "Editor"
+#~ msgstr "Редактор"
diff --git a/po/tr.po b/po/tr.po
new file mode 100644
index 0000000..98217bf
--- /dev/null
+++ b/po/tr.po
@@ -0,0 +1,862 @@
+# translation of kchmview.pot to Turkish
+# This file is put in the public domain.
+#
+# Furkan Duman <coderlord@gmail.com>, 2006.
+msgid ""
+msgstr ""
+"Project-Id-Version: tr\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-03-13 20:31-0700\n"
+"PO-Revision-Date: 2006-02-07 17:03+0200\n"
+"Last-Translator: Furkan Duman <coderlord@gmail.com>\n"
+"Language-Team: Turkish <tr@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11\n"
+
+#. i18n: file kchmsetupdialog.ui line 24
+#: rc.cpp:3
+#, no-c-format
+msgid "KchmViewer settings"
+msgstr "KchmViewer ayarları"
+
+#. i18n: file kchmsetupdialog.ui line 54
+#: rc.cpp:6
+#, no-c-format
+msgid "General behavior"
+msgstr "Genel davranış"
+
+#. i18n: file kchmsetupdialog.ui line 73
+#: rc.cpp:9
+#, no-c-format
+msgid "If no arguments given on load"
+msgstr "Yüklemede hiçbir argüman verilmemişse"
+
+#. i18n: file kchmsetupdialog.ui line 84
+#: rc.cpp:12
+#, no-c-format
+msgid "Open the 'open CHM file' dialog"
+msgstr "'CHM dosyası aç' penceresini aç"
+
+#. i18n: file kchmsetupdialog.ui line 92
+#: rc.cpp:15
+#, no-c-format
+msgid "Open the &last used CHM file, if exist"
+msgstr "&Son kullanılan CHM dosyasını, dosya varsa aç"
+
+#. i18n: file kchmsetupdialog.ui line 95
+#: rc.cpp:18
+#, no-c-format
+msgid "Alt+L"
+msgstr "Alt+L"
+
+#. i18n: file kchmsetupdialog.ui line 105
+#: rc.cpp:21
+#, no-c-format
+msgid "History"
+msgstr "Geçmiş"
+
+#. i18n: file kchmsetupdialog.ui line 124
+#: rc.cpp:24
+#, no-c-format
+msgid "Store history information for"
+msgstr "Geçmiş bilgisini"
+
+#. i18n: file kchmsetupdialog.ui line 143
+#: rc.cpp:28
+#, no-c-format
+msgid "latest files"
+msgstr "dosya için sakla"
+
+#. i18n: file kchmsetupdialog.ui line 153
+#: rc.cpp:31
+#, no-c-format
+msgid "R&emember extra information for history files"
+msgstr "Geçmiş dosyaları için fazladan bilgiyi &hatırla"
+
+#. i18n: file kchmsetupdialog.ui line 156
+#: rc.cpp:34
+#, no-c-format
+msgid "Alt+E"
+msgstr "Alt+E"
+
+#. i18n: file kchmsetupdialog.ui line 159
+#: rc.cpp:37
+#, no-c-format
+msgid ""
+"Remembers the information about the files, which were opened. Remembers last "
+"opened page, search history, font size, bookmarks and so on."
+msgstr ""
+"Açılmış olan dosyalar hakkındaki bilgileri hatırlar. son açılan sayfa, arama "
+"geçmişi, yazı tipi büyüklüğü, yer imleri gibi bilgileri hatırlar."
+
+#. i18n: file kchmsetupdialog.ui line 171
+#: rc.cpp:40
+#, no-c-format
+msgid "CHM security settings"
+msgstr "CHM güvenlik seçenekleri"
+
+#. i18n: file kchmsetupdialog.ui line 182
+#: rc.cpp:43
+#, no-c-format
+msgid "When external link clicked"
+msgstr "Harici bağlantı tıklandığında"
+
+#. i18n: file kchmsetupdialog.ui line 193
+#: rc.cpp:46
+#, no-c-format
+msgid "Alwa&ys open it in external browser"
+msgstr "&Herzaman harici tarayıcıda aç"
+
+#. i18n: file kchmsetupdialog.ui line 196
+#: rc.cpp:49
+#, no-c-format
+msgid "Alt+Y"
+msgstr "Alt+Y"
+
+#. i18n: file kchmsetupdialog.ui line 204
+#. i18n: file kchmsetupdialog.ui line 244
+#: rc.cpp:52 rc.cpp:65
+#, no-c-format
+msgid "Ask for confirmation"
+msgstr "Onay bekle"
+
+#. i18n: file kchmsetupdialog.ui line 212
+#: rc.cpp:55
+#, no-c-format
+msgid "Do not open the link"
+msgstr "Bağlantıyı açma"
+
+#. i18n: file kchmsetupdialog.ui line 225
+#: rc.cpp:59
+#, no-c-format
+msgid "When link pointed to a new CHM file clicked"
+msgstr "Bağlantı, yeni tıklanan CHM dosyasını gösterdiğinde"
+
+#. i18n: file kchmsetupdialog.ui line 236
+#: rc.cpp:62
+#, no-c-format
+msgid "Always open a new CHM file"
+msgstr "Herzaman yeni bir CHM dosyası aç"
+
+#. i18n: file kchmsetupdialog.ui line 252
+#: rc.cpp:68
+#, no-c-format
+msgid "Do not open a new CHM file"
+msgstr "Yeni bir CHM dosyası açma"
+
+#. i18n: file kchmsetupdialog.ui line 266
+#: rc.cpp:71
+#, no-c-format
+msgid "Version-specific settings"
+msgstr "Sürüme özel seçenekler"
+
+#. i18n: file kchmsetupdialog.ui line 277
+#: rc.cpp:74
+#, no-c-format
+msgid "Qt version settings"
+msgstr "Qt sürüm seçenekleri"
+
+#. i18n: file kchmsetupdialog.ui line 299
+#: rc.cpp:77
+#, no-c-format
+msgid ""
+"Enter the path to the program, which will be used as a browser for external "
+"links. A <i>%s</i> symbol will be replaced by the URL clicked."
+msgstr ""
+"Harici bağlantılarda tarayıcı olarak kullanılacak olan programın yolunu "
+"girin. Bir <i>%s</i> sembolü, tıklanan URL yerine geçecektir."
+
+#. i18n: file kchmsetupdialog.ui line 325
+#: rc.cpp:80
+#, no-c-format
+msgid "KDE version settings"
+msgstr "KDE sürüm seçenekleri"
+
+#. i18n: file kchmsetupdialog.ui line 336
+#: rc.cpp:83
+#, no-c-format
+msgid "To show HTML content, use"
+msgstr "HTML içeriği göstermek için kullanılan"
+
+#. i18n: file kchmsetupdialog.ui line 347
+#: rc.cpp:86
+#, no-c-format
+msgid "&QTextBrowser-based widget"
+msgstr "&QTextBrowser-tabanlı bileşen"
+
+#. i18n: file kchmsetupdialog.ui line 350
+#: rc.cpp:89
+#, no-c-format
+msgid "Alt+Q"
+msgstr "Alt+Q"
+
+#. i18n: file kchmsetupdialog.ui line 358
+#: rc.cpp:92
+#, no-c-format
+msgid "&KHTMLPart-based widget"
+msgstr "&KHTMLPart-tabanlı bileşen"
+
+#. i18n: file kchmsetupdialog.ui line 361
+#: rc.cpp:95
+#, no-c-format
+msgid "Alt+K"
+msgstr "Alt+K"
+
+#. i18n: file kchmsetupdialog.ui line 371
+#: rc.cpp:98
+#, no-c-format
+msgid "KHTMLPart security"
+msgstr "KHTMLPart güvenliği"
+
+#. i18n: file kchmsetupdialog.ui line 382
+#: rc.cpp:101
+#, no-c-format
+msgid "Enable Java&Script"
+msgstr "Java&Script'i etkinleştir"
+
+#. i18n: file kchmsetupdialog.ui line 385
+#: rc.cpp:104
+#, no-c-format
+msgid "Alt+S"
+msgstr "Alt+S"
+
+#. i18n: file kchmsetupdialog.ui line 393
+#: rc.cpp:107
+#, no-c-format
+msgid "Enable &plugins"
+msgstr "&Eklentileri etkinleştir"
+
+#. i18n: file kchmsetupdialog.ui line 396
+#: rc.cpp:110
+#, no-c-format
+msgid "Alt+P"
+msgstr "Alt+P"
+
+#. i18n: file kchmsetupdialog.ui line 404
+#: rc.cpp:113
+#, no-c-format
+msgid "Enable &Java"
+msgstr "&Java'yı etkinleştir"
+
+#. i18n: file kchmsetupdialog.ui line 407
+#: rc.cpp:116
+#, no-c-format
+msgid "Alt+J"
+msgstr "Alt+J"
+
+#. i18n: file kchmsetupdialog.ui line 415
+#: rc.cpp:119
+#, no-c-format
+msgid "Enable &refresh"
+msgstr "&Tazelemeyi etkinleştir"
+
+#. i18n: file kchmsetupdialog.ui line 418
+#: rc.cpp:122
+#, no-c-format
+msgid "Alt+R"
+msgstr "Alt+R"
+
+#. i18n: file kchmsetupdialog.ui line 432
+#: rc.cpp:125
+#, no-c-format
+msgid "Advanced"
+msgstr "Gelişmiş"
+
+#. i18n: file kchmsetupdialog.ui line 443
+#: rc.cpp:128
+#, no-c-format
+msgid "View HTML source command uses"
+msgstr "HTML kaynağını görüntüle komutu için kullanılan"
+
+#. i18n: file kchmsetupdialog.ui line 454
+#: rc.cpp:131
+#, no-c-format
+msgid "Built-in HTML source viewer"
+msgstr "İçsel HTML kaynak görüntüleyici"
+
+#. i18n: file kchmsetupdialog.ui line 465
+#: rc.cpp:135
+#, no-c-format
+msgid "E&xternal program, specified below"
+msgstr "Aşağıda tanımlanan, &harici program"
+
+#. i18n: file kchmsetupdialog.ui line 468
+#: rc.cpp:138
+#, no-c-format
+msgid "Alt+X"
+msgstr "Alt+X"
+
+#. i18n: file kchmsetupdialog.ui line 484
+#: rc.cpp:141
+#, no-c-format
+msgid "External program:"
+msgstr "Harici program:"
+
+#. i18n: file kchmsetupdialog.ui line 501
+#: rc.cpp:144
+#, fuzzy, no-c-format
+msgid "Search engine to use"
+msgstr "Arama sonuç döndürmedi"
+
+#. i18n: file kchmsetupdialog.ui line 528
+#: rc.cpp:148
+#, no-c-format
+msgid ""
+"Use the search based on internal CHM index. This engine cannot search for "
+"any symbols except underscode, does not support multibyte languages, and is "
+"not always available."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 555
+#: rc.cpp:152
+#, no-c-format
+msgid ""
+"Use new kchmviewer internal search engine (recommended). This engine "
+"indexes symbols, so it is possible to search for special symbols (like \"C++"
+"\"). All languages are supported. The index will be generated before the "
+"first search."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 588
+#: rc.cpp:158
+#, no-c-format
+msgid "F1"
+msgstr "F1"
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Furkan Duman"
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "coderlord@gmail.com"
+
+#: kchmbookmarkwindow.cpp:44
+msgid "&Add"
+msgstr "&Ekle"
+
+#: kchmbookmarkwindow.cpp:46
+msgid "&Del"
+msgstr "&Sil"
+
+#: kchmbookmarkwindow.cpp:88
+msgid "%1 - add a bookmark"
+msgstr "%1 - bir yer imi ekle"
+
+#: kchmbookmarkwindow.cpp:89 kchmbookmarkwindow.cpp:131
+msgid "Enter the name for this bookmark:"
+msgstr "Bu yer imi için isim girin:"
+
+#: kchmbookmarkwindow.cpp:130
+msgid "%1 - edit the bookmark name"
+msgstr "%1 - yer imi adını düzenle"
+
+#: kchmbookmarkwindow.cpp:201
+#, fuzzy
+msgid "&Add bookmark"
+msgstr "Yer imlerine ekle"
+
+#: kchmdialogchooseurlfromlist.cpp:34
+msgid "Topics"
+msgstr "Başlıklar"
+
+#: kchmdialogchooseurlfromlist.cpp:39
+msgid "Please select one of the topics below:"
+msgstr "Lütfen aşağıdaki başlıklardan birini seçin:"
+
+#: kchmdialogchooseurlfromlist.cpp:43
+msgid "&Ok"
+msgstr "&Tamam"
+
+#: kchmmainwindow.cpp:122
+#, fuzzy
+msgid ""
+"%1 version %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2004-2007\n"
+"http://www.kchmviewer.net\n"
+"\n"
+"Licensed under GNU GPL license.\n"
+"\n"
+"Please check my another project, http://www.transientmail.com - temporary e-"
+"mail address, which expires automatically."
+msgstr ""
+"%1 version %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2005-2006\n"
+"www.kchmviewer.net\n"
+"\n"
+"GNU GPL lisansı ile lisanslanmıştır.\n"
+"\n"
+"Lütfen, www.transientmail.com da, otomatik olarak kullanımı biten, geçici e-"
+"posta projemizi de deneyin."
+
+#: kchmmainwindow.cpp:139
+msgid "*.chm|Compressed Help Manual (*.chm)"
+msgstr "*.chm|Sıkıştırılmış Yardım El Kitabı (*.chm)"
+
+#: kchmmainwindow.cpp:141
+msgid "Compressed Help Manual (*.chm)"
+msgstr "Sıkıştırılmış Yardım El Kitabı (*.chm)"
+
+#: kchmmainwindow.cpp:151
+msgid "Loading aborted"
+msgstr "Yükleme iptal edildi"
+
+#: kchmmainwindow.cpp:261
+msgid "%1 - failed to load the chm file"
+msgstr "%1 - chm dosyası yüklemesi başarısız"
+
+#: kchmmainwindow.cpp:262
+msgid "Unable to load the chm file %1"
+msgstr "%1 chm dosyası yüklenemiyor"
+
+#: kchmmainwindow.cpp:272
+msgid "Could not load file %1"
+msgstr "%1 dosyası yüklenemedi"
+
+#: kchmmainwindow.cpp:288
+msgid "About %1"
+msgstr "%1 hakkında"
+
+#: kchmmainwindow.cpp:374
+msgid "%1 - remote link clicked - %2"
+msgstr "%1 - uzak bağlantı tıklandı - %2"
+
+#: kchmmainwindow.cpp:375
+msgid ""
+"A remote link %1 will start the external program to open it.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"%1 uzak bağlantısı açmak için harici programı başlatacak.\n"
+"\n"
+"Devam etmek istiyor musunuz?"
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&Yes"
+msgstr "&Evet"
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&No"
+msgstr "&Hayır"
+
+#: kchmmainwindow.cpp:400
+msgid "%1 - JavsScript link clicked"
+msgstr "%1 - JavaScript bağlantısı tıklandı"
+
+#: kchmmainwindow.cpp:401
+msgid ""
+"You have clicked a JavaScript link.\n"
+"To prevent security-related issues JavaScript URLs are disabled in CHM files."
+msgstr ""
+"Bir JavaScript bağlantısına tıkladınız.\n"
+"Güvenlik sorunlarını önlemek için CHM dosyalarındaki JavaScript URL'leri "
+"etkisizleştirilmiştir."
+
+#: kchmmainwindow.cpp:409
+msgid "%1 - link to a new CHM file clicked"
+msgstr "%1 - tıklanan yeni bir CHM dosyasına bağlantı"
+
+#: kchmmainwindow.cpp:410
+msgid ""
+"You have clicked a link, which leads to a new CHM file %1.\n"
+"The current file will be closed.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"Yeni bir %1 CHM dosyasını gösteren bir bağlantıya tıkladınız.\n"
+"Şimdiki dosya kapatılacaktır.\n"
+"\n"
+"Devam etmek istiyor musunuz?"
+
+#: kchmmainwindow.cpp:474
+msgid "File Operations"
+msgstr "Dosya İşlemleri"
+
+#: kchmmainwindow.cpp:478
+msgid "Open File"
+msgstr "Dosya Aç"
+
+#: kchmmainwindow.cpp:484
+msgid "Click this button to open an existing chm file."
+msgstr "Varolan bir chm dosyasını açmak için bu düğmeye tıklayın."
+
+#: kchmmainwindow.cpp:489
+msgid "Print File"
+msgstr "Dosyayı Yazdır"
+
+#: kchmmainwindow.cpp:495
+msgid "Click this button to print the current page"
+msgstr "Şimdiki sayfayı yazdırmak için bu düğmeyi tıklayın"
+
+#: kchmmainwindow.cpp:510
+msgid "E&xtract CHM content..."
+msgstr ""
+
+#: kchmmainwindow.cpp:511
+#, fuzzy
+msgid ""
+"Click this button to extract the whole CHM file content into a specific "
+"directory"
+msgstr ""
+"İçerik penceresindeki şimdiki başlığı bulmak ve açmak için bu düğmeye "
+"tıklayın."
+
+#: kchmmainwindow.cpp:517
+msgid "&Recent files"
+msgstr "&Sık kullanılan dosyalar"
+
+#: kchmmainwindow.cpp:526
+msgid "&Select all"
+msgstr "&Hepsini seç"
+
+#: kchmmainwindow.cpp:544
+msgid "&Change settings..."
+msgstr "Ayarları &değiştir..."
+
+#: kchmmainwindow.cpp:551
+msgid "About &Qt"
+msgstr "Q&t hakkında"
+
+#: kchmmainwindow.cpp:553
+msgid "What's &This"
+msgstr "Bu &Nedir?"
+
+#: kchmmainwindow.cpp:836
+msgid ""
+"Changing browser view options or search engine used\n"
+"requires restarting the application to take effect."
+msgstr ""
+
+#: kchmmainwindow.cpp:954
+msgid "Index"
+msgstr "Fihrist"
+
+#: kchmmainwindow.cpp:977 kchmsearchengine.cpp:246
+msgid "Search"
+msgstr "Arama"
+
+#: kchmmainwindow.cpp:1044
+msgid "Could not locate opened topic in content window"
+msgstr "İçerik penceresinde açılan başlığa konumlanamadı"
+
+#: kchmmainwindow.cpp:1056 kchmmainwindow.cpp:1062
+msgid "Choose a directory to store CHM content"
+msgstr ""
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting CHM content"
+msgstr ""
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting files..."
+msgstr ""
+
+#: kchmmainwindow.cpp:1075
+#, fuzzy
+msgid "Abort"
+msgstr "%1 hakkında"
+
+#: kchmnavtoolbar.cpp:33
+msgid "Navigation"
+msgstr "Dolaşma"
+
+#: kchmnavtoolbar.cpp:37
+msgid "Move backward in history"
+msgstr "Geçmişte geriye git"
+
+#: kchmnavtoolbar.cpp:42
+msgid "Click this button to move backward in browser history"
+msgstr "Tarayıcı geçmişinde geriye gitmek için bu düğmeye tıklayın"
+
+#: kchmnavtoolbar.cpp:46
+msgid "Move forward in history"
+msgstr "Geçmişte ileriye git"
+
+#: kchmnavtoolbar.cpp:51
+msgid "Click this button to move forward in browser history"
+msgstr "Tarayıcı geçmişinde ileriye gitmek için bu düğmeye tıklayın"
+
+#: kchmnavtoolbar.cpp:55
+msgid "Go to the home page"
+msgstr "Ana sayfaya git"
+
+#: kchmnavtoolbar.cpp:60
+msgid "Click this button to move to the home page"
+msgstr "Ana sayfaya gitmek için bu düğmeye tıklayın"
+
+#: kchmsearchengine.cpp:246
+msgid "A closing quote character is missing."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:50
+msgid "Find in page"
+msgstr "Sayfada bul"
+
+#: kchmsearchtoolbar.cpp:67
+msgid "Enter here the text to search in the current page."
+msgstr "Şimdiki sayfada aranacak metni buraya girin."
+
+#: kchmsearchtoolbar.cpp:74
+msgid "Previous search result"
+msgstr "Önceki arama sonucu"
+
+#: kchmsearchtoolbar.cpp:79
+msgid "Click this button to find previous search result."
+msgstr "Önceki arama sonucunu bulmak için buraya tıklayın."
+
+#: kchmsearchtoolbar.cpp:83
+msgid "Next search result"
+msgstr "Sonraki arama sonucu"
+
+#: kchmsearchtoolbar.cpp:88
+msgid "Click this button to find next search result."
+msgstr "Sonraki arama sonucunu bulmak için buraya tıklayın."
+
+#: kchmsearchtoolbar.cpp:92
+msgid "Locate this topic in content window"
+msgstr "İçerik penceresinde bu başlığa konumlan"
+
+#: kchmsearchtoolbar.cpp:97
+msgid ""
+"Click this button to find current topic in the content window, and open it."
+msgstr ""
+"İçerik penceresindeki şimdiki başlığı bulmak ve açmak için bu düğmeye "
+"tıklayın."
+
+#: kchmsearchtoolbar.cpp:101
+msgid "Increase font size"
+msgstr "Yazı tipi boyutunu artır"
+
+#: kchmsearchtoolbar.cpp:106
+msgid "Click this button to increase the font size."
+msgstr "Yazi tipi boyutunu artır için bu düğmeye tıklayın."
+
+#: kchmsearchtoolbar.cpp:110
+msgid "Decrease font size"
+msgstr "Yazı tipi boyutunu azalt"
+
+#: kchmsearchtoolbar.cpp:115
+msgid "Click this button to decrease the font size."
+msgstr "Yazı tipi boyutunu azaltmak için bu düğmeye tıklayın."
+
+#: kchmsearchtoolbar.cpp:119
+msgid "View HTML source"
+msgstr "HTML kaynağını görüntüle"
+
+#: kchmsearchtoolbar.cpp:124
+msgid "Click this button to open a separate window with the page HTML source."
+msgstr ""
+"Ayrı bir pencerede sayfanın HTML kaynağını açmak için bu düğmeye tıklayın."
+
+#: kchmsearchtoolbar.cpp:128
+msgid "Add to bookmarks"
+msgstr "Yer imlerine ekle"
+
+#: kchmsearchtoolbar.cpp:133
+msgid "Click this button to add the current page to the bookmarks list."
+msgstr "Şimdiki sayfayı yer imleri listesine eklemek için bu düğmeye tıklayın."
+
+#: kchmsearchtoolbar.cpp:136
+msgid "Prev page in TOC"
+msgstr "İçerik tablosunda önceki sayfa"
+
+#: kchmsearchtoolbar.cpp:141
+msgid "Click this button to go to previous page in Table Of Content."
+msgstr "İçerik tablosunda önceki sayfaya gitmek için bu düğmeye tıklayın."
+
+#: kchmsearchtoolbar.cpp:144
+msgid "Next page in TOC"
+msgstr "İçerik tablosunda sonraki sayfa"
+
+#: kchmsearchtoolbar.cpp:149
+msgid "Click this button to go to next page in Table of Content."
+msgstr "İçerik tablosunda sonraki sayfaya gitmek için bu düğmeye tıklayın."
+
+#: kchmsearchtoolbar.cpp:155
+msgid "&Increase font"
+msgstr "Yazı tipini &büyüt"
+
+#: kchmsearchtoolbar.cpp:156
+msgid "&Decrease font"
+msgstr "Yazı tipini &küçült"
+
+#: kchmsearchtoolbar.cpp:157
+msgid "&View HTML source"
+msgstr "HTML kaynağını &görüntüle"
+
+#: kchmsearchtoolbar.cpp:160
+msgid "&Bookmark this page"
+msgstr "Bu sayfayı &yer imlerine ekle"
+
+#: kchmsearchtoolbar.cpp:163
+msgid "&Full screen"
+msgstr "&Tam ekran"
+
+#: kchmsearchtoolbar.cpp:165
+msgid "&Show contents window"
+msgstr "İçerik penceresini &göster"
+
+#: kchmsearchtoolbar.cpp:167
+msgid "&Locate in contents window"
+msgstr "İçerik penceresinde &konumlan"
+
+#: kchmsearchtoolbar.cpp:220
+msgid "&Set language"
+msgstr "Dili &ayarla"
+
+#: kchmsearchtoolbar.cpp:243
+msgid "&Set codepage"
+msgstr "Kod sayfasını &ayarla"
+
+#: kchmsearchwindow.cpp:43
+msgid "Type in word(s) to search for:"
+msgstr "Arama yapılacak kelimeleri yazın:"
+
+#: kchmsearchwindow.cpp:46
+msgid "<a href=\"q\"><b>Help</b></a>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:58
+msgid "Go"
+msgstr ""
+
+#: kchmsearchwindow.cpp:66
+msgid "Title"
+msgstr "Başlık"
+
+#: kchmsearchwindow.cpp:67
+msgid "Location"
+msgstr "Konum"
+
+#: kchmsearchwindow.cpp:130
+msgid "Search returned %1 result(s)"
+msgstr "Arama %1 sonuç döndürdü"
+
+#: kchmsearchwindow.cpp:133
+msgid "Search returned no results"
+msgstr "Arama sonuç döndürmedi"
+
+#: kchmsearchwindow.cpp:136 kchmviewwindow_qtextbrowser.cpp:211
+msgid "Search failed"
+msgstr "Arama başarısız"
+
+#: kchmsearchwindow.cpp:169 kchmsearchwindow.cpp:175
+msgid "How to use search"
+msgstr "Arama nasıl kullanılır?"
+
+#: kchmsearchwindow.cpp:170
+msgid ""
+"<html><p>The improved search engine allows you to search for a word, symbol "
+"or phrase, which is set of words and symbols included in quotes. Only the "
+"documents which include all the terms speficide in th search query are "
+"shown; no prefixes needed.<p>Unlike MS CHM internal search index, my "
+"improved search engine indexes everything, including special symbols. "
+"Therefore it is possible to search (and find!) for something like <i>$q = "
+"new ChmFile();</i>. This search also fully supports Unicode, which means "
+"that you can search in non-English documents.<p>If you want to search for a "
+"quote symbol, use quotation mark instead. The engine treats a quote and a "
+"quotation mark as the same symbol, which allows to use them in phrases.</"
+"html>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:176
+#, fuzzy
+msgid ""
+"The search query can contain a few prefixes.\n"
+"A set of words inside the quote marks mean that you are searching for exact "
+"phrase.\n"
+"A word with minus sign means that it should be absent in the search result.\n"
+"A word with plus mark or without any mark means that it must be present in "
+"the search result.\n"
+"\n"
+"Note that only letters and digits are indexed.\n"
+"You cannot search for non-character symbols other than underscope, and those "
+"symbols will be removed from the search query.\n"
+"For example, search for 'C' will give the same result as searching for 'C++'."
+msgstr ""
+"Arama sorgusu bir kaç ön ek içerebilir.\n"
+"Alıntı işaretlerinin içindeki kelime grubu, tam olarak yazdığınız şeyi "
+"aradığınız anlamındadır.\n"
+"Önünde eksi işareti olan bir kelime, arama sonuçları içinde bu kelimenin "
+"olmamasını istediğiniz anlamındadır.\n"
+"\n"
+"Sadece harfler ve sayılar indekslenir.\n"
+"Bunların dışındaki sembolleri arayamazsınız ve bu gibi semboller arama "
+"sonucundan çıkarılacaktır.\n"
+"Örnek olarak, 'C' için yapılan bir arama 'C++' için yapılan bir arama ile "
+"aynı sonucu verecektir."
+
+#: kchmsearchwindow.cpp:226
+#, fuzzy
+msgid "Search is not available"
+msgstr "Arama başarısız"
+
+#: kchmsearchwindow.cpp:227
+msgid ""
+"<p>The search feature is not avaiable for this chm file.<p>The old search "
+"engine depends on indexes present in chm files itself. Not every chm file "
+"has an index; it is set up during chm file creation. Therefore if the search "
+"index was not created during chm file creation, this makes search impossible."
+"<p>Solution: use new search engine (menu Settings/Advanced), which generates "
+"its own index."
+msgstr ""
+
+#: kchmviewwindow_qtextbrowser.cpp:171
+msgid "Printing (page %1)..."
+msgstr "Yazdırılıyor (%1. sayfa)..."
+
+#: kchmviewwindow_qtextbrowser.cpp:179
+msgid "Printing completed"
+msgstr "Yazdırma tamamlandı"
+
+#: kchmviewwindow_qtextbrowser.cpp:183
+msgid "Printing aborted"
+msgstr "Yazdırma iptal edildi"
+
+#: kchmviewwindow_qtextbrowser.cpp:189
+msgid "%1 - could not print"
+msgstr "%1 - yazdırılamadı"
+
+#: kchmviewwindow_qtextbrowser.cpp:190
+msgid ""
+"Could not print.\n"
+"Your Qt library has been compiled without printing support"
+msgstr ""
+"Yazdırılamadı.\n"
+"Qt kütüphaneniz yazdırma desteği ile derlenmemiş"
+
+#: kchmviewwindowmgr.cpp:65
+msgid "&Window"
+msgstr ""
+
+#: main.cpp:46
+msgid ""
+"'--search <query>' specifies the search query to search, and activate the "
+"first entry if found"
+msgstr ""
+
+#: main.cpp:47
+msgid ""
+"'--sindex <word>' specifies the word to find in index, and activate if found"
+msgstr ""
+
+#: main.cpp:54
+msgid "CHM file viewer"
+msgstr "CHM dosya görüntüleyici"
+
+#~ msgid "Match similar words"
+#~ msgstr "Benzer kelimeleri eşleştir"
+
+#~ msgid "&Setup"
+#~ msgstr "&Ayarlar"
+
+#~ msgid "Editor"
+#~ msgstr "Düzen"
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644
index 0000000..3640b53
--- /dev/null
+++ b/po/zh_CN.po
@@ -0,0 +1,848 @@
+# translation of zh_CN.po to
+# translation of kchmviewer.po to
+# This file is put in the public domain.
+#
+# 林俊 <demonlinjun@163.com>, 2006.
+msgid ""
+msgstr ""
+"Project-Id-Version: zh_CN\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-03-13 20:31-0700\n"
+"PO-Revision-Date: 2006-05-07 20:30-0400\n"
+"Last-Translator: 林俊 <demonlinjun@163.com>\n"
+"Language-Team: <zh@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.2\n"
+
+#. i18n: file kchmsetupdialog.ui line 24
+#: rc.cpp:3
+#, no-c-format
+msgid "KchmViewer settings"
+msgstr "KchmViewer设置"
+
+#. i18n: file kchmsetupdialog.ui line 54
+#: rc.cpp:6
+#, no-c-format
+msgid "General behavior"
+msgstr "通用行为"
+
+#. i18n: file kchmsetupdialog.ui line 73
+#: rc.cpp:9
+#, no-c-format
+msgid "If no arguments given on load"
+msgstr "如果载入时没有参数"
+
+#. i18n: file kchmsetupdialog.ui line 84
+#: rc.cpp:12
+#, no-c-format
+msgid "Open the 'open CHM file' dialog"
+msgstr "打开'打开CHM文件'对话框"
+
+#. i18n: file kchmsetupdialog.ui line 92
+#: rc.cpp:15
+#, no-c-format
+msgid "Open the &last used CHM file, if exist"
+msgstr "如果存在,打开最后使用的CHM文件(&L)"
+
+#. i18n: file kchmsetupdialog.ui line 95
+#: rc.cpp:18
+#, no-c-format
+msgid "Alt+L"
+msgstr "Alt+L"
+
+#. i18n: file kchmsetupdialog.ui line 105
+#: rc.cpp:21
+#, no-c-format
+msgid "History"
+msgstr "历史"
+
+#. i18n: file kchmsetupdialog.ui line 124
+#: rc.cpp:24
+#, no-c-format
+msgid "Store history information for"
+msgstr "保存历史信息"
+
+#. i18n: file kchmsetupdialog.ui line 143
+#: rc.cpp:28
+#, no-c-format
+msgid "latest files"
+msgstr "最近使用的文件"
+
+#. i18n: file kchmsetupdialog.ui line 153
+#: rc.cpp:31
+#, no-c-format
+msgid "R&emember extra information for history files"
+msgstr "记录历史文件额外信息(&E)"
+
+#. i18n: file kchmsetupdialog.ui line 156
+#: rc.cpp:34
+#, no-c-format
+msgid "Alt+E"
+msgstr "Alt+E"
+
+#. i18n: file kchmsetupdialog.ui line 159
+#: rc.cpp:37
+#, no-c-format
+msgid ""
+"Remembers the information about the files, which were opened. Remembers last "
+"opened page, search history, font size, bookmarks and so on."
+msgstr ""
+"记录已经打开的文件的相关信息。 记录最后打开的页面,搜索记录,字体大小,书签等"
+"信息。"
+
+#. i18n: file kchmsetupdialog.ui line 171
+#: rc.cpp:40
+#, no-c-format
+msgid "CHM security settings"
+msgstr "CHM 安全设置"
+
+#. i18n: file kchmsetupdialog.ui line 182
+#: rc.cpp:43
+#, no-c-format
+msgid "When external link clicked"
+msgstr "当点击外部链接时"
+
+#. i18n: file kchmsetupdialog.ui line 193
+#: rc.cpp:46
+#, no-c-format
+msgid "Alwa&ys open it in external browser"
+msgstr "总在外部浏览器中打开(&Y)"
+
+#. i18n: file kchmsetupdialog.ui line 196
+#: rc.cpp:49
+#, no-c-format
+msgid "Alt+Y"
+msgstr "Alt+Y"
+
+#. i18n: file kchmsetupdialog.ui line 204
+#. i18n: file kchmsetupdialog.ui line 244
+#: rc.cpp:52 rc.cpp:65
+#, no-c-format
+msgid "Ask for confirmation"
+msgstr "请求确认"
+
+#. i18n: file kchmsetupdialog.ui line 212
+#: rc.cpp:55
+#, no-c-format
+msgid "Do not open the link"
+msgstr "不打开链接"
+
+#. i18n: file kchmsetupdialog.ui line 225
+#: rc.cpp:59
+#, no-c-format
+msgid "When link pointed to a new CHM file clicked"
+msgstr "当点击指向新的CHM文件的链接时"
+
+#. i18n: file kchmsetupdialog.ui line 236
+#: rc.cpp:62
+#, no-c-format
+msgid "Always open a new CHM file"
+msgstr "总打开新的CHM文件"
+
+#. i18n: file kchmsetupdialog.ui line 252
+#: rc.cpp:68
+#, no-c-format
+msgid "Do not open a new CHM file"
+msgstr "不打开新的CHM文件"
+
+#. i18n: file kchmsetupdialog.ui line 266
+#: rc.cpp:71
+#, no-c-format
+msgid "Version-specific settings"
+msgstr "版本指定设置"
+
+#. i18n: file kchmsetupdialog.ui line 277
+#: rc.cpp:74
+#, no-c-format
+msgid "Qt version settings"
+msgstr "QT 版本设置"
+
+#. i18n: file kchmsetupdialog.ui line 299
+#: rc.cpp:77
+#, no-c-format
+msgid ""
+"Enter the path to the program, which will be used as a browser for external "
+"links. A <i>%s</i> symbol will be replaced by the URL clicked."
+msgstr "输入打开外部链接的浏览器程序的路径。<i>%s</i> 符号将被点击的URL替换。"
+
+#. i18n: file kchmsetupdialog.ui line 325
+#: rc.cpp:80
+#, no-c-format
+msgid "KDE version settings"
+msgstr "KDE 版本设置"
+
+#. i18n: file kchmsetupdialog.ui line 336
+#: rc.cpp:83
+#, no-c-format
+msgid "To show HTML content, use"
+msgstr "要显示HTML目录,使用"
+
+#. i18n: file kchmsetupdialog.ui line 347
+#: rc.cpp:86
+#, no-c-format
+msgid "&QTextBrowser-based widget"
+msgstr "基于QTextBrowser的组件(&Q)"
+
+#. i18n: file kchmsetupdialog.ui line 350
+#: rc.cpp:89
+#, no-c-format
+msgid "Alt+Q"
+msgstr "Alt+Q"
+
+#. i18n: file kchmsetupdialog.ui line 358
+#: rc.cpp:92
+#, no-c-format
+msgid "&KHTMLPart-based widget"
+msgstr "基于KHTMLPart的组件(&K)"
+
+#. i18n: file kchmsetupdialog.ui line 361
+#: rc.cpp:95
+#, no-c-format
+msgid "Alt+K"
+msgstr "Alt+K"
+
+#. i18n: file kchmsetupdialog.ui line 371
+#: rc.cpp:98
+#, no-c-format
+msgid "KHTMLPart security"
+msgstr "KHTMLPart 安全性"
+
+#. i18n: file kchmsetupdialog.ui line 382
+#: rc.cpp:101
+#, no-c-format
+msgid "Enable Java&Script"
+msgstr "启用JavaScript(&S)"
+
+#. i18n: file kchmsetupdialog.ui line 385
+#: rc.cpp:104
+#, no-c-format
+msgid "Alt+S"
+msgstr "Alt+S"
+
+#. i18n: file kchmsetupdialog.ui line 393
+#: rc.cpp:107
+#, no-c-format
+msgid "Enable &plugins"
+msgstr "启用插件(&P)"
+
+#. i18n: file kchmsetupdialog.ui line 396
+#: rc.cpp:110
+#, no-c-format
+msgid "Alt+P"
+msgstr "Alt+P"
+
+#. i18n: file kchmsetupdialog.ui line 404
+#: rc.cpp:113
+#, no-c-format
+msgid "Enable &Java"
+msgstr "启用Java(&J)"
+
+#. i18n: file kchmsetupdialog.ui line 407
+#: rc.cpp:116
+#, no-c-format
+msgid "Alt+J"
+msgstr "Alt+J"
+
+#. i18n: file kchmsetupdialog.ui line 415
+#: rc.cpp:119
+#, no-c-format
+msgid "Enable &refresh"
+msgstr "启用刷新(&R)"
+
+#. i18n: file kchmsetupdialog.ui line 418
+#: rc.cpp:122
+#, no-c-format
+msgid "Alt+R"
+msgstr "Alt+R"
+
+#. i18n: file kchmsetupdialog.ui line 432
+#: rc.cpp:125
+#, no-c-format
+msgid "Advanced"
+msgstr "高级"
+
+#. i18n: file kchmsetupdialog.ui line 443
+#: rc.cpp:128
+#, no-c-format
+msgid "View HTML source command uses"
+msgstr "查看HTML源码使用"
+
+#. i18n: file kchmsetupdialog.ui line 454
+#: rc.cpp:131
+#, no-c-format
+msgid "Built-in HTML source viewer"
+msgstr "内建HTML源码查看器"
+
+#. i18n: file kchmsetupdialog.ui line 465
+#: rc.cpp:135
+#, no-c-format
+msgid "E&xternal program, specified below"
+msgstr "外部程序,在下面特别指定(&X)"
+
+#. i18n: file kchmsetupdialog.ui line 468
+#: rc.cpp:138
+#, no-c-format
+msgid "Alt+X"
+msgstr "Alt+x"
+
+#. i18n: file kchmsetupdialog.ui line 484
+#: rc.cpp:141
+#, no-c-format
+msgid "External program:"
+msgstr "外部程序"
+
+#. i18n: file kchmsetupdialog.ui line 501
+#: rc.cpp:144
+#, fuzzy, no-c-format
+msgid "Search engine to use"
+msgstr "搜索没有返回结果"
+
+#. i18n: file kchmsetupdialog.ui line 528
+#: rc.cpp:148
+#, no-c-format
+msgid ""
+"Use the search based on internal CHM index. This engine cannot search for "
+"any symbols except underscode, does not support multibyte languages, and is "
+"not always available."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 555
+#: rc.cpp:152
+#, no-c-format
+msgid ""
+"Use new kchmviewer internal search engine (recommended). This engine "
+"indexes symbols, so it is possible to search for special symbols (like \"C++"
+"\"). All languages are supported. The index will be generated before the "
+"first search."
+msgstr ""
+
+#. i18n: file kchmsetupdialog.ui line 588
+#: rc.cpp:158
+#, no-c-format
+msgid "F1"
+msgstr "F1"
+
+#: _translatorinfo.cpp:1
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "林俊"
+
+#: _translatorinfo.cpp:3
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "demonlinjun@163.com"
+
+#: kchmbookmarkwindow.cpp:44
+msgid "&Add"
+msgstr "添加(&A)"
+
+#: kchmbookmarkwindow.cpp:46
+msgid "&Del"
+msgstr "删除(&D)"
+
+#: kchmbookmarkwindow.cpp:88
+msgid "%1 - add a bookmark"
+msgstr "%1 - 添加书签"
+
+#: kchmbookmarkwindow.cpp:89 kchmbookmarkwindow.cpp:131
+msgid "Enter the name for this bookmark:"
+msgstr "输入书签的名称"
+
+#: kchmbookmarkwindow.cpp:130
+msgid "%1 - edit the bookmark name"
+msgstr "%1 - 编辑书签名称"
+
+#: kchmbookmarkwindow.cpp:201
+msgid "&Add bookmark"
+msgstr "添加书签(&A)"
+
+#: kchmdialogchooseurlfromlist.cpp:34
+msgid "Topics"
+msgstr "主题"
+
+#: kchmdialogchooseurlfromlist.cpp:39
+msgid "Please select one of the topics below:"
+msgstr "请在下面选取一个主题"
+
+#: kchmdialogchooseurlfromlist.cpp:43
+msgid "&Ok"
+msgstr "确定(&O)"
+
+#: kchmmainwindow.cpp:122
+#, fuzzy
+msgid ""
+"%1 version %2\n"
+"\n"
+"Copyright (C) George Yunaev,gyunaev@ulduzsoft.com, 2004-2007\n"
+"http://www.kchmviewer.net\n"
+"\n"
+"Licensed under GNU GPL license.\n"
+"\n"
+"Please check my another project, http://www.transientmail.com - temporary e-"
+"mail address, which expires automatically."
+msgstr ""
+"%1 版本 %2\n"
+"\n"
+"版权所有 (C) George Yunaev,gyunaev@ulduzsoft.com, 2005-2006\n"
+"www.kchmviewer.net\n"
+"\n"
+"在GNU GPL授权方式下发行。\n"
+"\n"
+"请尝试我们的另一个项目,www.transientmail.com - 临时 E-Mail地址。"
+
+#: kchmmainwindow.cpp:139
+msgid "*.chm|Compressed Help Manual (*.chm)"
+msgstr "*.chm|压缩的帮助手册 (*.chm)"
+
+#: kchmmainwindow.cpp:141
+msgid "Compressed Help Manual (*.chm)"
+msgstr "压缩的帮助手册 (*.chm)"
+
+#: kchmmainwindow.cpp:151
+msgid "Loading aborted"
+msgstr "取消载入"
+
+#: kchmmainwindow.cpp:261
+msgid "%1 - failed to load the chm file"
+msgstr "%1 - 载入CHM文件失败"
+
+#: kchmmainwindow.cpp:262
+msgid "Unable to load the chm file %1"
+msgstr "无法载入CHM文件%1"
+
+#: kchmmainwindow.cpp:272
+msgid "Could not load file %1"
+msgstr "无法载入文件%1"
+
+#: kchmmainwindow.cpp:288
+msgid "About %1"
+msgstr "关于%1"
+
+#: kchmmainwindow.cpp:374
+msgid "%1 - remote link clicked - %2"
+msgstr "%1 - 点击远程链接 - %2"
+
+#: kchmmainwindow.cpp:375
+msgid ""
+"A remote link %1 will start the external program to open it.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"%1将使用外部程序来打开远程链接。 \n"
+"\n"
+"你要继续吗?"
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&Yes"
+msgstr "是(&Y)"
+
+#: kchmmainwindow.cpp:376 kchmmainwindow.cpp:411
+msgid "&No"
+msgstr "否(&N)"
+
+#: kchmmainwindow.cpp:400
+msgid "%1 - JavsScript link clicked"
+msgstr "%1 - 点击JavaScript链接"
+
+#: kchmmainwindow.cpp:401
+msgid ""
+"You have clicked a JavaScript link.\n"
+"To prevent security-related issues JavaScript URLs are disabled in CHM files."
+msgstr ""
+"你点击了JavaScript链接。\n"
+"为了避免安全问题,在CHM文件中不启用JavaScript URLs支持。"
+
+#: kchmmainwindow.cpp:409
+msgid "%1 - link to a new CHM file clicked"
+msgstr "%1 - 点击指向新的CHM文件的链接。"
+
+#: kchmmainwindow.cpp:410
+msgid ""
+"You have clicked a link, which leads to a new CHM file %1.\n"
+"The current file will be closed.\n"
+"\n"
+"Do you want to continue?"
+msgstr ""
+"你点击了指向新的CHM文件的链接%1。\n"
+"现在打开的文件将被关闭。\n"
+"\n"
+"你要继续吗?"
+
+#: kchmmainwindow.cpp:474
+msgid "File Operations"
+msgstr "文件操作"
+
+#: kchmmainwindow.cpp:478
+msgid "Open File"
+msgstr "打开文件"
+
+#: kchmmainwindow.cpp:484
+msgid "Click this button to open an existing chm file."
+msgstr "点击此按钮打开存在的CHM文件"
+
+#: kchmmainwindow.cpp:489
+msgid "Print File"
+msgstr "打印文件"
+
+#: kchmmainwindow.cpp:495
+msgid "Click this button to print the current page"
+msgstr "点击此按钮打印当前页面"
+
+#: kchmmainwindow.cpp:510
+msgid "E&xtract CHM content..."
+msgstr "提取CHM目录(&X)"
+
+#: kchmmainwindow.cpp:511
+msgid ""
+"Click this button to extract the whole CHM file content into a specific "
+"directory"
+msgstr "点击此按钮提取整个CHM文件的目录到指定的目录。"
+
+#: kchmmainwindow.cpp:517
+msgid "&Recent files"
+msgstr "最近打开的文件(&R)"
+
+#: kchmmainwindow.cpp:526
+msgid "&Select all"
+msgstr "选择全部(&S)"
+
+#: kchmmainwindow.cpp:544
+msgid "&Change settings..."
+msgstr "更改设置(&C)"
+
+#: kchmmainwindow.cpp:551
+msgid "About &Qt"
+msgstr "关于QT(&Q)"
+
+#: kchmmainwindow.cpp:553
+msgid "What's &This"
+msgstr "这是什么(&T)"
+
+#: kchmmainwindow.cpp:836
+msgid ""
+"Changing browser view options or search engine used\n"
+"requires restarting the application to take effect."
+msgstr ""
+
+#: kchmmainwindow.cpp:954
+msgid "Index"
+msgstr "索引"
+
+#: kchmmainwindow.cpp:977 kchmsearchengine.cpp:246
+msgid "Search"
+msgstr "搜索"
+
+#: kchmmainwindow.cpp:1044
+msgid "Could not locate opened topic in content window"
+msgstr "无法在目录窗口定位打开的主题"
+
+#: kchmmainwindow.cpp:1056 kchmmainwindow.cpp:1062
+msgid "Choose a directory to store CHM content"
+msgstr "选择目录来保存CHM目录"
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting CHM content"
+msgstr "提取CHM目录"
+
+#: kchmmainwindow.cpp:1075
+msgid "Extracting files..."
+msgstr "提取文件..."
+
+#: kchmmainwindow.cpp:1075
+msgid "Abort"
+msgstr "取消"
+
+#: kchmnavtoolbar.cpp:33
+msgid "Navigation"
+msgstr "导航"
+
+#: kchmnavtoolbar.cpp:37
+msgid "Move backward in history"
+msgstr "在历史中后退"
+
+#: kchmnavtoolbar.cpp:42
+msgid "Click this button to move backward in browser history"
+msgstr "点击此按钮在浏览历史中后退"
+
+#: kchmnavtoolbar.cpp:46
+msgid "Move forward in history"
+msgstr "在历史中前进"
+
+#: kchmnavtoolbar.cpp:51
+msgid "Click this button to move forward in browser history"
+msgstr "点击此按钮在浏览历史中前进"
+
+#: kchmnavtoolbar.cpp:55
+msgid "Go to the home page"
+msgstr "回到首页"
+
+#: kchmnavtoolbar.cpp:60
+msgid "Click this button to move to the home page"
+msgstr "点击此按钮回到主页"
+
+#: kchmsearchengine.cpp:246
+msgid "A closing quote character is missing."
+msgstr ""
+
+#: kchmsearchtoolbar.cpp:50
+msgid "Find in page"
+msgstr "在页面中搜索"
+
+#: kchmsearchtoolbar.cpp:67
+msgid "Enter here the text to search in the current page."
+msgstr "输入要在当前页面搜索的内容"
+
+#: kchmsearchtoolbar.cpp:74
+msgid "Previous search result"
+msgstr "前一个搜索的结果"
+
+#: kchmsearchtoolbar.cpp:79
+msgid "Click this button to find previous search result."
+msgstr "点击此按钮查看前一个搜索的结果"
+
+#: kchmsearchtoolbar.cpp:83
+msgid "Next search result"
+msgstr "下一个搜索的结果"
+
+#: kchmsearchtoolbar.cpp:88
+msgid "Click this button to find next search result."
+msgstr "点击此按钮查看下一个搜索的结果"
+
+#: kchmsearchtoolbar.cpp:92
+msgid "Locate this topic in content window"
+msgstr "在目录窗口定位主题"
+
+#: kchmsearchtoolbar.cpp:97
+msgid ""
+"Click this button to find current topic in the content window, and open it."
+msgstr "点击此按钮在目录窗口定位当前主题"
+
+#: kchmsearchtoolbar.cpp:101
+msgid "Increase font size"
+msgstr "增大字体大小"
+
+#: kchmsearchtoolbar.cpp:106
+msgid "Click this button to increase the font size."
+msgstr "点击此按钮增加字体大小"
+
+#: kchmsearchtoolbar.cpp:110
+msgid "Decrease font size"
+msgstr "缩小字体大小"
+
+#: kchmsearchtoolbar.cpp:115
+msgid "Click this button to decrease the font size."
+msgstr "点击此按钮缩小字体大小"
+
+#: kchmsearchtoolbar.cpp:119
+msgid "View HTML source"
+msgstr "查看HTML源码"
+
+#: kchmsearchtoolbar.cpp:124
+msgid "Click this button to open a separate window with the page HTML source."
+msgstr "点击此按钮在独立窗口查看当前页面的HTML源码"
+
+#: kchmsearchtoolbar.cpp:128
+msgid "Add to bookmarks"
+msgstr "添加到书签"
+
+#: kchmsearchtoolbar.cpp:133
+msgid "Click this button to add the current page to the bookmarks list."
+msgstr "点击此按钮添加当前页面到书签列表"
+
+#: kchmsearchtoolbar.cpp:136
+msgid "Prev page in TOC"
+msgstr "目录表格的前一页"
+
+#: kchmsearchtoolbar.cpp:141
+msgid "Click this button to go to previous page in Table Of Content."
+msgstr "点击此按钮前往目录表格中的前一页"
+
+#: kchmsearchtoolbar.cpp:144
+msgid "Next page in TOC"
+msgstr "目录表格的后一页"
+
+#: kchmsearchtoolbar.cpp:149
+msgid "Click this button to go to next page in Table of Content."
+msgstr "点击此按钮前往目录表格的后一页"
+
+#: kchmsearchtoolbar.cpp:155
+msgid "&Increase font"
+msgstr "增大字体(&I)"
+
+#: kchmsearchtoolbar.cpp:156
+msgid "&Decrease font"
+msgstr "缩小字体(&D)"
+
+#: kchmsearchtoolbar.cpp:157
+msgid "&View HTML source"
+msgstr "查看HTML源码(&V)"
+
+#: kchmsearchtoolbar.cpp:160
+msgid "&Bookmark this page"
+msgstr "添加当前页面为书签(&B)"
+
+#: kchmsearchtoolbar.cpp:163
+msgid "&Full screen"
+msgstr "全屏(&F)"
+
+#: kchmsearchtoolbar.cpp:165
+msgid "&Show contents window"
+msgstr "显示目录窗口(&S)"
+
+#: kchmsearchtoolbar.cpp:167
+msgid "&Locate in contents window"
+msgstr "目录窗口&定位(&L)"
+
+#: kchmsearchtoolbar.cpp:220
+msgid "&Set language"
+msgstr "设置语言(&S)"
+
+#: kchmsearchtoolbar.cpp:243
+msgid "&Set codepage"
+msgstr "设置编码(&S)"
+
+#: kchmsearchwindow.cpp:43
+msgid "Type in word(s) to search for:"
+msgstr "输入要搜索的词"
+
+#: kchmsearchwindow.cpp:46
+msgid "<a href=\"q\"><b>Help</b></a>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:58
+msgid "Go"
+msgstr ""
+
+#: kchmsearchwindow.cpp:66
+msgid "Title"
+msgstr "标题"
+
+#: kchmsearchwindow.cpp:67
+msgid "Location"
+msgstr "位置"
+
+#: kchmsearchwindow.cpp:130
+msgid "Search returned %1 result(s)"
+msgstr "搜索返回 %1 个结果"
+
+#: kchmsearchwindow.cpp:133
+msgid "Search returned no results"
+msgstr "搜索没有返回结果"
+
+#: kchmsearchwindow.cpp:136 kchmviewwindow_qtextbrowser.cpp:211
+msgid "Search failed"
+msgstr "搜索失败"
+
+#: kchmsearchwindow.cpp:169 kchmsearchwindow.cpp:175
+msgid "How to use search"
+msgstr "如何使用搜索"
+
+#: kchmsearchwindow.cpp:170
+msgid ""
+"<html><p>The improved search engine allows you to search for a word, symbol "
+"or phrase, which is set of words and symbols included in quotes. Only the "
+"documents which include all the terms speficide in th search query are "
+"shown; no prefixes needed.<p>Unlike MS CHM internal search index, my "
+"improved search engine indexes everything, including special symbols. "
+"Therefore it is possible to search (and find!) for something like <i>$q = "
+"new ChmFile();</i>. This search also fully supports Unicode, which means "
+"that you can search in non-English documents.<p>If you want to search for a "
+"quote symbol, use quotation mark instead. The engine treats a quote and a "
+"quotation mark as the same symbol, which allows to use them in phrases.</"
+"html>"
+msgstr ""
+
+#: kchmsearchwindow.cpp:176
+#, fuzzy
+msgid ""
+"The search query can contain a few prefixes.\n"
+"A set of words inside the quote marks mean that you are searching for exact "
+"phrase.\n"
+"A word with minus sign means that it should be absent in the search result.\n"
+"A word with plus mark or without any mark means that it must be present in "
+"the search result.\n"
+"\n"
+"Note that only letters and digits are indexed.\n"
+"You cannot search for non-character symbols other than underscope, and those "
+"symbols will be removed from the search query.\n"
+"For example, search for 'C' will give the same result as searching for 'C++'."
+msgstr ""
+"搜索查询可以包含一些技巧。\n"
+"在引号中包含的内容意味着你要精确的搜索。\n"
+"带有减号的字表示在搜索结果中不应包含这个内容。\n"
+"带有加号或什么也不带表示在搜索结果中应当包含这个内容。\n"
+"\n"
+"注意只有字母和数字被索引。\n"
+"你不能搜索符号,这些符号将在搜索查询中被移除。\n"
+"例如,搜索 'C' 和搜索 'C++' ,将返回同样的结果."
+
+#: kchmsearchwindow.cpp:226
+#, fuzzy
+msgid "Search is not available"
+msgstr "搜索失败"
+
+#: kchmsearchwindow.cpp:227
+msgid ""
+"<p>The search feature is not avaiable for this chm file.<p>The old search "
+"engine depends on indexes present in chm files itself. Not every chm file "
+"has an index; it is set up during chm file creation. Therefore if the search "
+"index was not created during chm file creation, this makes search impossible."
+"<p>Solution: use new search engine (menu Settings/Advanced), which generates "
+"its own index."
+msgstr ""
+
+#: kchmviewwindow_qtextbrowser.cpp:171
+msgid "Printing (page %1)..."
+msgstr "正在打印 (第 %1 页)"
+
+#: kchmviewwindow_qtextbrowser.cpp:179
+msgid "Printing completed"
+msgstr "打印成功"
+
+#: kchmviewwindow_qtextbrowser.cpp:183
+msgid "Printing aborted"
+msgstr "打印被取消"
+
+#: kchmviewwindow_qtextbrowser.cpp:189
+msgid "%1 - could not print"
+msgstr "%1 - 不能打印"
+
+#: kchmviewwindow_qtextbrowser.cpp:190
+msgid ""
+"Could not print.\n"
+"Your Qt library has been compiled without printing support"
+msgstr ""
+"不能打印。\n"
+"你编译QT没有加入打印支持"
+
+#: kchmviewwindowmgr.cpp:65
+msgid "&Window"
+msgstr "窗口(&W)"
+
+#: main.cpp:46
+msgid ""
+"'--search <query>' specifies the search query to search, and activate the "
+"first entry if found"
+msgstr ""
+
+#: main.cpp:47
+msgid ""
+"'--sindex <word>' specifies the word to find in index, and activate if found"
+msgstr ""
+
+#: main.cpp:54
+msgid "CHM file viewer"
+msgstr "CHM文件查看器"
+
+#~ msgid "Match similar words"
+#~ msgstr "匹配相似词"
+
+#~ msgid "&Open this link in a new tab"
+#~ msgstr "在新的标签页打开此链接(&O)"
+
+#~ msgid "&Open this link in a new background tab"
+#~ msgstr "在后台标签也打开此链接(&O)"
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..6540292
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,39 @@
+if AMC_USE_KDE
+LIB_KDEEXTRADIR = kde
+LIB_KDEEXTRA = kde/libkdeextra.a
+endif
+
+bin_PROGRAMS = kchmviewer
+kchmviewer_SOURCES = iconstorage.cpp kchmbookmarkwindow.cpp kchmconfig.cpp \
+ kchmindexwindow.cpp kchmmainwindow.cpp kchmsearchtoolbar.cpp kchmsearchwindow.cpp \
+ kchmsettings.cpp kchmsourcefactory.cpp kchmtreeviewitem.cpp kchmviewwindow.cpp main.cpp \
+ kchmdialogchooseurlfromlist.cpp kde-qt.cpp kchmviewwindow_qtextbrowser.cpp \
+ kchmsetupdialog.ui kqtempfile.cpp kchmnavtoolbar.cpp kchmviewwindowmgr.cpp \
+ kchmkeyeventfilter.cpp kchmcontentswindow.cpp kchmsearchengine_impl.cpp \
+ kchmsearchengine.cpp
+
+# set the include path found by configure
+INCLUDES = $(QT_INCLUDES) $(CHM_INCLUDES) $(KDE_INCLUDES) $(LIBCHMFILE_INCLUDES)
+
+SUBDIRS = $(LIB_KDEEXTRADIR) . pics
+
+# the library search path.
+kchmviewer_LDADD = $(top_builddir)/lib/libchmfile/libchmfile.a $(LIB_KDEEXTRA) \
+ $(CHM_LIBS) $(LIB_QT) $(LIB_KDEUI) $(LIB_KHTML)
+kchmviewer_LDFLAGS = $(QT_LDFLAGS) $(KDE_LDFLAGS) -L../lib/chmlib/
+
+METASOURCES = AUTO
+KDE_OPTIONS = qtonly
+KDE_ICON = AUTO
+noinst_HEADERS = kchmsettings.h forwarddeclarations.h kchmsourcefactory.h \
+ iconstorage.h kchmbookmarkwindow.h kchmconfig.h kchmtreeviewitem.h \
+ kchmdialogchooseurlfromlist.h kchmviewwindow.h kchmindexwindow.h \
+ kchmmainwindow.h kchmviewwindow_qtextbrowser.h kchmsearchtoolbar.h kde-qt.h \
+ kchmsearchwindow.h kqtempfile.h kqrunprocess.h kchmnavtoolbar.h kchmviewwindowmgr.h \
+ kchmkeyeventfilter.h kchmcontentswindow.h kchmlistitemtooltip.h kchmsearchengine_impl.h \
+ kchmsearchengine.h
+
+messages: rc.cpp
+ $(EXTRACTRC) *.rc > rc.cpp
+ $(EXTRACTRC) *.ui >> rc.cpp
+ $(XGETTEXT) rc.cpp *.h *.cpp -o $(podir)/kchmviewer.pot
diff --git a/src/config.h.in b/src/config.h.in
new file mode 100644
index 0000000..f0c2ac9
--- /dev/null
+++ b/src/config.h.in
@@ -0,0 +1,255 @@
+/* src/config.h.in. Generated from configure.in by autoheader. */
+
+/* Application version as integer */
+#undef APP_INT_VERSION
+
+/* Application name */
+#undef APP_NAME
+
+/* Application version as text */
+#undef APP_VERSION
+
+/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
+#undef HAVE_CARBON_CARBON_H
+
+/* Define if you have the CoreAudio API */
+#undef HAVE_COREAUDIO
+
+/* Define to 1 if you have the <crt_externs.h> header file. */
+#undef HAVE_CRT_EXTERNS_H
+
+/* Defines if your system has the crypt function */
+#undef HAVE_CRYPT
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if you have libjpeg */
+#undef HAVE_LIBJPEG
+
+/* Define if you have libpng */
+#undef HAVE_LIBPNG
+
+/* Define if you have a working libpthread (will enable threaded code) */
+#undef HAVE_LIBPTHREAD
+
+/* Define if you have libz */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define if your system needs _NSGetEnviron to set up the environment */
+#undef HAVE_NSGETENVIRON
+
+/* Define if you have res_init */
+#undef HAVE_RES_INIT
+
+/* Define if you have the res_init prototype */
+#undef HAVE_RES_INIT_PROTO
+
+/* Define if you have a STL implementation by SGI */
+#undef HAVE_SGI_STL
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have strlcat */
+#undef HAVE_STRLCAT
+
+/* Define if you have the strlcat prototype */
+#undef HAVE_STRLCAT_PROTO
+
+/* Define if you have strlcpy */
+#undef HAVE_STRLCPY
+
+/* Define if you have the strlcpy prototype */
+#undef HAVE_STRLCPY_PROTO
+
+/* Define to 1 if you have the <sys/bitypes.h> header file. */
+#undef HAVE_SYS_BITYPES_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF
+
+/* Suffix for lib directories */
+#undef KDELIBSUFF
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* The size of `char *', as computed by sizeof. */
+#undef SIZEOF_CHAR_P
+
+/* The size of `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* The size of `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* The size of `short', as computed by sizeof. */
+#undef SIZEOF_SHORT
+
+/* The size of `size_t', as computed by sizeof. */
+#undef SIZEOF_SIZE_T
+
+/* The size of `unsigned long', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* use builtin chmlib */
+#undef USE_BUILTIN_CHMLIB
+
+/* use KDE support */
+#undef USE_KDE
+
+/* Version number of package */
+#undef VERSION
+
+/* Defined if compiling without arts */
+#undef WITHOUT_ARTS
+
+/* Define to 1 if the X Window System is missing or not being used. */
+#undef X_DISPLAY_MISSING
+
+/*
+ * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
+ * headers and I'm too lazy to write a configure test as long as only
+ * unixware is related
+ */
+#ifdef _UNIXWARE
+#define HAVE_BOOLEAN
+#endif
+
+
+
+/*
+ * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
+ * that defines bzero.
+ */
+
+#if defined(_AIX)
+#include <strings.h>
+#endif
+
+
+
+#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
+# include <sys/time.h>
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
+#endif
+
+
+
+#if !defined(HAVE_RES_INIT_PROTO)
+#ifdef __cplusplus
+extern "C" {
+#endif
+int res_init(void);
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+
+
+#if !defined(HAVE_STRLCAT_PROTO)
+#ifdef __cplusplus
+extern "C" {
+#endif
+unsigned long strlcat(char*, const char*, unsigned long);
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+
+
+#if !defined(HAVE_STRLCPY_PROTO)
+#ifdef __cplusplus
+extern "C" {
+#endif
+unsigned long strlcpy(char*, const char*, unsigned long);
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+
+
+/*
+ * On HP-UX, the declaration of vsnprintf() is needed every time !
+ */
+
+#if !defined(HAVE_VSNPRINTF) || defined(hpux)
+#if __STDC__
+#include <stdarg.h>
+#include <stdlib.h>
+#else
+#include <varargs.h>
+#endif
+#ifdef __cplusplus
+extern "C"
+#endif
+int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
+#ifdef __cplusplus
+extern "C"
+#endif
+int snprintf(char *str, size_t n, char const *fmt, ...);
+#endif
+
+
+
+#if defined(__SVR4) && !defined(__svr4__)
+#define __svr4__ 1
+#endif
+
+
+/* type to use in place of socklen_t if not defined */
+#undef kde_socklen_t
+
+/* type to use in place of socklen_t if not defined (deprecated, use
+ kde_socklen_t) */
+#undef ksize_t
diff --git a/src/forwarddeclarations.h b/src/forwarddeclarations.h
new file mode 100644
index 0000000..ea8d8ee
--- /dev/null
+++ b/src/forwarddeclarations.h
@@ -0,0 +1,48 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef FORWARD_DECLARATIONS_H
+#define FORWARD_DECLARATIONS_H
+
+class QComboBox;
+class QListView;
+class QListBox;
+class QListViewItem;
+class QListViewItemIterator;
+class QLineEdit;
+class QTabWidget;
+class QToolButton;
+
+class KCHMMainWindow;
+class KCHMViewWindow;
+class KCHMIndexWindow;
+class KCHMSearchWindow;
+class KCHMBookmarkWindow;
+class KCHMSettings;
+class KCHMSearchAndViewToolbar;
+class KCHMNavToolbar;
+class KCHMViewWindow;
+class KCHMViewWindowMgr;
+class KCHMContentsWindow;
+
+#include "config.h"
+
+#endif /* FORWARD_DECLARATIONS_H */
diff --git a/src/iconstorage.cpp b/src/iconstorage.cpp
new file mode 100644
index 0000000..c4bbb25
--- /dev/null
+++ b/src/iconstorage.cpp
@@ -0,0 +1,1295 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+
+#include "iconstorage.h"
+
+
+static const KCHMIconStorage::png_memory_image_t png_image_toolbakicons[] =
+{
+{
+ 1625,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x06\x62\x4B\x47\x44\x00\xFF\x00\xFF\x00\xFF\xA0\xBD\xA7"
+ "\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0B\x0D\x00\x00\x0B\x0D\x01\xED\x07\xC0\x2C\x00\x00\x00"
+ "\x07\x74\x49\x4D\x45\x07\xD3\x09\x09\x13\x12\x2A\x95\x49\x4D\xF6\x00\x00\x05\xE6\x49\x44\x41\x54\x78"
+ "\xDA\xC5\x97\x5D\x8C\x5B\x47\x15\xC7\x7F\x77\xEE\xBD\xFE\xDA\xAC\xF7\x23\x2E\x49\x76\x13\x36\x81\x50"
+ "\x25\xA4\x91\x36\x7B\xA1\x0F\x44\x09\x09\x10\x22\xA2\x88\x96\x0A\x29\x2F\x2D\x6D\x0A\x2B\xC8\x43\xDF"
+ "\xAA\xBE\x54\x42\x4A\x05\x02\x89\x87\x22\xF5\xA5\xC8\x22\x25\xB4\x12\x2A\x0F\x14\x10\x0A\x12\x55\x1A"
+ "\xD4\x88\x0D\x91\xBA\xDE\xEE\x2E\x5D\xAA\xB6\x86\x6C\x83\xE3\x4D\xF6\xC3\x5E\xC7\xF6\xBD\xBE\x1F\x33"
+ "\x3C\xF8\xEE\xDA\x8E\xED\x6C\x8A\x0A\x8C\xF4\x7F\xF0\x9D\x33\xF3\xFF\x9F\xE3\x99\x33\xE7\xC0\xFF\x79"
+ "\x68\x1F\xC5\x78\xEC\xCC\xF4\x2E\x50\x47\x41\x8E\x02\xA3\x28\xD9\xB4\x87\x9A\x41\xC9\x19\xA4\x77\xC9"
+ "\xE2\x7C\x16\x90\xE9\x74\x5A\x7D\x2C\x02\xC6\xCE\x4C\x9F\x06\x9E\x00\x0E\x83\x02\x24\x88\x08\x88\x58"
+ "\xDD\x40\x3A\x10\x38\xCD\x4B\x26\x90\xFE\x2B\x96\xFA\xF9\x39\xC0\x4B\xA7\xD3\xF2\x3F\x12\x30\x76\x66"
+ "\xFA\x00\x9A\x78\x1E\x25\xBF\x88\xD0\x21\xD2\x0F\x91\x41\x22\xD1\x38\x3B\x92\x25\x3E\xBF\xBD\x00\x40"
+ "\xD9\x81\x8B\xD7\x46\xB0\x1D\x17\x6A\x8B\xE0\x2C\x83\xF2\x00\x65\x13\x38\x4F\x5B\xFC\xF2\x17\x80\xD3"
+ "\x49\x88\xB6\x81\xD7\xE7\x00\x88\x6F\x25\xB2\xE9\x13\x7C\xFB\xC1\x1C\xFB\x3F\xB5\x89\xFB\xB7\x27\x88"
+ "\x45\x44\xDB\x9A\xDC\x52\x8D\xBF\xFE\x7D\x95\xCB\xEF\xC2\x5B\xD7\x4C\xA8\xCC\xD7\x27\x02\xF7\x35\x8B"
+ "\x97\xBE\x03\x94\xD2\xE9\xB4\xBF\xA1\x80\x75\x72\x3D\x0A\xC9\xFB\x79\xF4\xC0\xBF\x78\xE8\x60\x8A\x81"
+ "\x4D\x46\xD7\x68\xA9\x3B\xB6\xBA\x3C\x5B\xE4\x67\x97\x4C\x6E\x2E\x2C\x80\x5F\x06\xE9\xCD\x58\xEA\xDC"
+ "\x57\x81\xC5\xE6\x48\xE8\x5D\xC9\x8D\x04\x3B\x76\x6C\xE3\xE9\xE3\x65\x8E\x7D\x6E\x10\xD3\x10\xF8\x92"
+ "\x16\xBC\xF1\x76\x89\x6C\xBE\xC6\xF0\x7D\x51\x02\xA9\x5A\x30\x9C\x8A\x72\x68\x0F\x14\xCA\x3E\xD7\x16"
+ "\x35\x50\xC1\x96\xBC\xDA\xF7\xD9\x21\xA6\x7F\x67\x59\x96\x9F\xC9\x64\x54\x9B\x80\xB1\x33\x6F\x1F\x00"
+ "\xED\x02\xBA\xC9\xF0\xF0\x30\xCF\x9C\x54\xEC\xDC\x12\xC3\xF3\x55\x1B\xAE\xCC\x95\x39\x75\x24\xC5\x03"
+ "\x3B\x13\x5C\xB8\x5A\xE0\xBE\x3E\xA3\xCD\xC6\xD0\x35\xF6\xEF\x8C\x73\xAB\x24\xB9\xBE\x0C\xA0\x3E\x93"
+ "\xF7\x76\x5D\x19\x12\x73\xD7\x43\x11\xDC\x19\xD3\x97\x20\x80\xE4\x7E\x9E\x3C\xB4\x4C\x32\x91\xA0\x5A"
+ "\x6B\xBF\x49\x73\xF3\x55\x4E\x1D\x49\xAD\xFF\x3E\x75\x24\xC5\xEC\x3F\xAB\x5D\xFF\x9E\x6F\x1D\x4D\x72"
+ "\xF3\xB6\xC9\x07\xFF\x28\x43\xA4\xFF\x2C\x92\x29\xC0\x03\x3C\xBD\xE1\x7D\xE6\x34\xA8\xEF\x12\x1F\xE2"
+ "\xB1\x07\x0B\xEC\x1D\xD9\x84\x17\xA8\x36\xBC\x9F\x73\x5A\xC8\xD7\xC6\xB5\x9B\x4E\x47\x7B\x2F\x50\x28"
+ "\x60\x67\x4A\xF2\x66\xB6\x1F\xBC\xD2\xB6\xBC\xDC\x5B\x1C\xD2\x66\xA6\x2C\xCB\x72\x1B\x11\x50\xF2\x09"
+ "\x34\x93\x2D\xA9\x5E\xF6\x8C\x38\x54\x9C\xF6\xAB\xBB\x58\xF4\x3A\x92\x03\x1D\xED\x9B\x47\xB2\xC7\xE4"
+ "\x1B\xA3\x4B\xBC\x36\x61\x82\x1E\x7B\x04\xC9\xCB\x80\x6D\x00\x8C\x7D\xEF\xAD\x5D\xC0\x61\x62\x9B\xF9"
+ "\xD2\xEE\x65\xFC\xA0\x07\x3F\x08\x5A\x09\x6C\xD9\x95\xFC\x0F\x57\x57\xEE\x4A\xEE\xF9\x8A\xE5\x92\x8B"
+ "\x42\x87\xD8\x66\xB0\x17\x46\x27\x6B\x27\xF6\x5A\xD1\x0B\x85\xB5\x08\x1C\x05\x20\x32\x48\x2A\x59\xA2"
+ "\x62\xB7\x7B\xD3\x8D\xFC\xD5\x3F\x2F\x75\x25\x5E\x58\x71\xF8\x70\x45\xE3\x6A\x6E\xB8\xF1\x31\x62\x83"
+ "\xBD\x00\x66\xDF\x41\x60\x6A\x4D\xC0\x28\xC0\xD6\x3E\x89\x02\xAA\xB5\x56\xEF\x4F\x1F\xDF\x72\xCF\xE4"
+ "\xCD\x6B\x57\xCA\x01\x57\x73\x23\x2D\xF3\x91\x68\x1C\x17\x40\x44\xF6\x00\xF1\x86\x00\x3D\xC6\x40\xDC"
+ "\xA5\x7C\x87\xF7\x4F\x3D\xBC\xAD\xAB\x87\xDD\xA2\xD2\x3C\xCE\x02\x87\x9E\x03\x15\x5E\x26\x5D\x00\x9A"
+ "\x09\x22\xD8\x8D\x24\xD6\xC8\xA7\x22\x46\x32\xEA\x52\xA9\xC9\x75\xDC\x8D\xFC\xA3\x8C\xCB\xDF\x07\xAD"
+ "\x39\x51\x1A\x3D\xA0\x94\x06\x98\x46\x73\x4A\xAE\x78\x11\x6E\xDB\xFE\xFF\xB2\x1C\x10\x8D\x6B\x28\x1D"
+ "\x0A\x76\x0C\x43\xA8\xFF\x1A\xDB\x7A\x14\xFC\x4A\x43\xC1\x7A\x31\x11\x38\x14\x6B\x51\xF2\xE5\xDE\x75"
+ "\x9C\xF8\xB1\xF7\xB1\x10\x1F\x7A\x2E\x8C\xBC\x08\xCF\x82\xF2\x40\x79\x59\x40\x1A\x61\x12\x9A\x41\xD3"
+ "\xA9\xD8\x3E\xA6\xDE\x9A\x9D\xBF\xFC\x43\xC9\xC5\x67\xC5\x5D\x37\xDE\x68\x98\x4D\x2F\x8E\xED\xB8\xE1"
+ "\x13\x5D\xCB\xA2\xE3\xD5\x77\x96\xDE\x25\x00\xDC\x65\x84\x10\x6D\x38\xF6\xA3\xEE\x87\xEB\x5E\x86\x2E"
+ "\x1A\xC0\x5D\xAE\x7F\x74\x0B\x19\xC0\x11\x00\x61\x0D\x37\x81\xBD\x88\xA9\x79\xC4\x8D\x76\x7C\xFD\x27"
+ "\xDE\x3D\x8B\x18\x88\x7B\x2D\x58\xDB\xC3\xD4\x3C\xB0\x17\x41\xFA\xB3\x56\xFC\x4F\xF3\xEB\xA9\x18\x90"
+ "\x48\xFF\x15\x04\x5F\x28\x15\x97\xF8\xF4\x70\x4F\x47\xB2\xC7\x5F\xB0\x39\xFF\x54\xB2\xA3\x88\xC7\x5F"
+ "\x28\x6D\x18\x89\x6C\xAE\x52\xFF\xFF\xFD\xF2\xEB\xE8\x54\x00\x5B\x07\xC8\x64\x32\x9C\x1C\xD3\x66\xF3"
+ "\xC2\xFA\x8A\x5F\x2B\x6F\x4F\x0D\x24\xE9\x8F\x07\xC4\x8C\x76\xFC\x71\xB2\xCA\xD7\xAC\x44\xDB\xE6\x97"
+ "\xA6\x6F\x77\xB4\x5F\x83\x5D\x93\xE4\x6F\x5C\xAF\x7B\xAF\xBD\xFC\x53\xE0\x26\x50\x6C\x3E\x5D\x1E\x81"
+ "\xF3\x0C\x40\x76\x3E\x47\xCC\xF0\xE8\x8D\xBA\x1D\xF1\xEC\xF9\x1B\x6D\x02\xBA\xD9\xF6\x46\x5D\x62\x86"
+ "\x47\x76\x3E\x57\x37\x74\xF2\x2F\x02\xC5\x10\x8D\x7A\x20\x93\xC9\xA8\x93\x96\x91\xCF\xAB\x07\x0A\x81"
+ "\x14\xC7\x97\x8A\x35\x76\x0F\x45\x88\x98\x3A\xA6\xAE\xB5\xE1\xCD\xBF\x95\x39\xBC\xBF\x17\x80\x1F\xFC"
+ "\x2A\xDF\xD1\xC6\xD4\x35\x04\x3E\x7F\x99\x29\x50\x75\x3C\x70\x0B\xCF\x5B\xE6\x6F\x2F\x02\x79\xA0\x98"
+ "\x4E\xA7\x83\x96\x92\xCC\xB2\x2C\x35\xC4\xF4\x74\x5E\xED\x5B\x75\x03\x71\xEC\xFA\xA2\xCB\x48\x4A\x90"
+ "\x88\x47\x31\x74\xAD\x0D\x13\x73\x15\x26\xE6\x2A\x1D\xE7\x0C\x5D\xC3\xB1\xAB\x5C\x9C\x5A\xA5\x62\x87"
+ "\xE4\xFA\xAF\x7F\x03\x2C\x00\x4B\x80\x9B\xC9\x64\x5A\x6B\xC2\x4C\x26\x83\x65\x59\xC1\x9A\x08\x4F\xEA"
+ "\xC7\xDE\xCB\x39\x78\x52\xB0\x63\xB3\xC0\x34\x04\x86\x60\x43\x68\xCA\x67\xF2\x83\x2A\x57\xDE\x29\xE2"
+ "\xF9\xB2\x99\x3C\x0F\xDC\x02\xEC\xB5\xAE\xA9\x63\x59\x3E\x3E\x3E\x2E\x80\xC4\xA4\xFF\xCD\x23\x44\xFA"
+ "\xCF\xA2\xE9\x63\x51\x53\xF0\xC9\xAD\x09\xF6\x0D\x49\x06\x07\xFB\xD0\x75\xB3\x65\x4D\x10\x78\xAC\xAC"
+ "\xAC\xF2\xCE\x0D\xC1\x87\x0B\x55\x6A\x9E\x04\xE9\xCF\xE2\xE4\x5F\xB4\xA2\x17\xA6\xC2\x43\x77\x0B\xA8"
+ "\x36\x97\xE5\x5D\x1B\x93\x50\x44\x0C\x18\x98\x54\x8F\x3E\x89\x1E\x7B\x04\x4D\x1F\x5D\x9B\x8F\x47\x20"
+ "\xD5\x57\xBF\xC5\x4B\xAB\x3E\xB6\xDB\xB4\x58\xFA\xB3\xF8\xE5\xD7\x2D\xFD\xD5\xDF\x87\x87\x6D\x09\x28"
+ "\x74\xEA\x8E\xEE\xDA\x9A\x8D\x8F\x8F\x6B\x80\x01\xF4\x00\xFD\x93\xB5\x13\x7B\x31\xFB\x0E\x22\x22\x7B"
+ "\x10\xE6\xEE\xF0\x49\x0D\x9F\x13\x2F\x4B\x50\xCB\xE2\x16\x32\x61\x92\xA9\x00\xAB\xA1\x80\x0A\xE0\x77"
+ "\x6A\x56\xEF\xA9\x39\x0D\xA3\x61\x86\x11\x89\x87\x88\x85\xDF\xC4\x7A\x32\xAB\x97\xDA\x0E\x60\x87\x70"
+ "\x36\x6A\x4E\xFF\x0D\xCD\x4A\x06\xF6\x87\x57\xDE\x02\x00\x00\x00\x00\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1793,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x04\x67\x41\x4D\x41\x00\x00\xAF\xC8\x37\x05\x8A\xE9\x00"
+ "\x00\x00\x19\x74\x45\x58\x74\x53\x6F\x66\x74\x77\x61\x72\x65\x00\x41\x64\x6F\x62\x65\x20\x49\x6D\x61"
+ "\x67\x65\x52\x65\x61\x64\x79\x71\xC9\x65\x3C\x00\x00\x06\x93\x49\x44\x41\x54\x78\xDA\x62\x60\x20\x13"
+ "\xFC\xE8\x66\x38\xF0\xAD\x83\xE1\x22\x90\xC9\x0D\xC4\x2C\xE4\x9A\x03\x10\x40\x4C\xFF\xFF\xFF\x67\x20"
+ "\x15\x7F\xEC\x60\x50\x64\xFC\xCF\x60\x0F\xC4\x7A\xAB\x63\x18\x02\xA1\x8E\x60\x24\xC7\x2C\x80\x00\x62"
+ "\x22\xC7\xD5\xAC\x0C\x0C\x0D\x0C\x3C\x0C\x0C\x4C\xD2\xA2\x0C\x06\x52\x0C\x69\x40\x21\x7E\x72\x43\x01"
+ "\x20\x80\x48\x76\xC0\xCF\x2E\x46\x01\x26\x46\x86\x38\x36\xBB\x74\x06\x56\xC3\x20\x06\x71\x6E\x06\xDB"
+ "\x5C\x4B\x06\x4D\xA0\x14\x27\x23\x10\x90\x6A\x1E\x40\x00\x91\xEC\x80\x7F\xFF\x19\x0A\x41\x41\xC0\xA0"
+ "\x1D\xC0\xC0\xA8\x03\xC4\xBC\x0C\x0C\x69\x26\x0C\x79\x40\x11\x60\x98\x30\x30\x93\x6A\x1E\x40\x00\x91"
+ "\xE4\x80\x9F\x9D\x8C\x02\x0C\xFF\x18\xF2\x59\x4D\xBD\x81\xBC\xDD\x60\xCC\x69\x19\xC9\x20\xC6\xCD\x60"
+ "\xE7\xA2\xCC\x20\x0B\x14\x60\x27\xD5\x01\x00\x01\x44\x92\x03\xFE\xFC\x65\x08\x04\x26\x3C\x7E\x26\xAB"
+ "\x54\x20\x0F\x94\x01\x6E\x32\x30\x9B\x86\x33\xB0\x70\x32\xF0\xD4\xDA\x31\x80\x04\x79\x80\xB1\x40\x52"
+ "\x28\x00\x04\x10\x13\x69\x59\x86\xA1\x9E\x45\x57\x0F\xC8\xB8\x0C\xCB\x8C\xC0\x40\xBF\xCC\xC0\x6D\xED"
+ "\xCD\xA0\xC0\xC7\x00\x0A\x16\x3E\x20\x66\x23\xC5\x4C\x80\x00\x22\xDA\x01\x5F\x5B\x18\x41\xD9\x4D\x9E"
+ "\xC5\xB1\x10\x48\x9D\x40\x92\xB9\xC0\xC0\x6E\x16\xCB\xC0\xC6\xC4\x20\xB1\x26\x84\x21\x1A\x28\xC0\x05"
+ "\x0C\x05\xA2\xCD\x05\x08\x20\x94\xAC\xF3\x63\x12\xA3\x22\x0B\x13\x83\xC2\x8F\x9F\x0C\x4C\x40\x09\x07"
+ "\x60\x90\x33\x02\xE3\x5C\x1E\x18\xEC\xF2\x20\xCB\x99\x64\x45\x81\x81\xFC\x15\xE2\x73\x38\xF8\xC0\xC0"
+ "\xC0\xFB\x86\x81\xCB\x54\x8F\xC1\xE4\xD7\xA5\xE2\x6B\xA9\x0C\x9E\xCC\xFF\x19\xDE\x5C\x4B\x64\xBC\xF8"
+ "\xF7\x1F\xC3\xFF\x9F\xBF\x19\x2E\xFE\xFB\xCB\xF0\xFE\xDB\x6F\x86\xFB\x8E\xEB\x19\xEE\x01\x35\xFC\x07"
+ "\x01\x98\x6E\x80\x00\x62\xFC\x37\x9B\x61\x03\x30\xF3\xF8\x33\xFC\x05\xF2\x40\xF8\x1F\x10\xFD\x01\xD2"
+ "\x42\x9C\xC0\xC0\xE4\x61\xF8\xCF\xCE\xCB\xC0\x28\x0A\xCC\x65\x40\x2D\x4C\x06\xB1\x40\x07\xAC\x86\x58"
+ "\x8A\x02\x04\x80\x7A\x53\x19\xBE\xEC\x9A\x0C\x56\xF7\xE3\xC1\x75\x86\x3F\x5F\x3E\x33\xFC\xFE\xF2\x85"
+ "\xE1\xFB\xC3\xEF\x0C\xFF\x81\xE6\x02\x1D\xC3\xF0\x1F\x64\x36\x10\xFF\xF8\xCD\x70\xD4\x6C\x03\x83\x07"
+ "\x50\xE3\x77\x80\x00\x62\xF9\xF3\x8F\xE1\x13\x2B\x28\xF7\xAA\x01\xE3\xD6\x30\x0B\x58\xA4\x18\x31\x40"
+ "\xC2\xEF\x36\xD4\xF0\xB7\x40\xFC\x1E\xCA\xDE\x00\xC4\xEF\xB0\x04\x24\x50\x8C\x79\x05\x03\x8F\xA7\x2E"
+ "\xA8\x38\x00\xE6\x47\x33\x20\xCD\x01\xC4\x32\x70\x15\x7F\xAF\x9C\x61\x78\xB9\x75\x2D\xC3\xEB\xD3\x8F"
+ "\x18\xDE\x7E\x07\x1B\x28\x0E\xC4\xCF\x01\x02\x08\x64\x35\xE7\xD3\x4E\x86\x69\x52\x3C\x0C\x09\x0C\x7A"
+ "\xB6\x0C\x0C\x36\x16\xC0\xE4\x7E\x84\x81\x6A\xE0\x37\xD0\x3B\xEF\x98\x18\xDE\xEF\xBE\xCE\xF0\x64\xEB"
+ "\x1B\x86\xBB\x9F\x18\xF6\x04\xEE\x62\x68\x05\xCA\x3C\x05\xE2\x27\x00\x01\xC4\x08\x2D\x3C\x78\x4F\x96"
+ "\x30\x64\x9A\xC8\x30\xB4\x31\x69\x00\x43\xC2\x41\x9D\x81\xE1\xD7\x5D\xCA\x2D\xFF\x02\x34\xFA\x33\x0B"
+ "\xC3\xB3\xD5\x67\x18\xDE\x5E\xF8\xCD\x70\xFC\x05\xC3\xAC\xF4\x23\x0C\xCB\x80\x32\xAF\x80\xF8\x05\x10"
+ "\x7F\x02\x08\x20\x70\x05\x02\x4D\xB5\x3C\x87\x72\x19\xA2\x4C\x65\x19\xBA\x59\x65\xF8\x78\x98\x1D\xB5"
+ "\x80\x85\xFE\x67\xF2\x7D\xFD\x09\x98\x1B\xBF\xFC\x66\x78\xBE\xFD\x1A\xC3\x9B\x8B\x7F\x18\x76\x3D\x66"
+ "\xE8\x2F\x39\xC1\xB0\x1E\x6A\x31\xC8\x01\x5F\x80\x76\xFF\x05\x08\x20\x46\x58\x82\x84\x3A\x82\x73\x41"
+ "\x24\x83\x7D\xB0\x0E\xC3\x4A\x56\x11\x66\x1E\x76\x0F\x7D\x60\xF8\x7C\x22\xCD\xF2\x6F\x6C\x10\x0C\x4C"
+ "\x69\xF7\x97\x5E\x65\xF8\xF8\x9C\xE1\xEB\x84\x4B\x0C\x65\x0B\x6F\x01\xF3\x2B\xC2\xF2\x6F\x40\x7B\xFF"
+ "\x81\x94\x03\x04\x10\x23\x52\x8E\x80\x39\x82\x7D\x49\x04\x83\xBD\x8B\x0A\xC3\x44\x2E\x4E\x06\x35\x5E"
+ "\x57\x61\x06\x06\x41\x2E\x22\x2B\x0A\xA0\xF6\xF7\x5C\x0C\x7F\x5F\x7F\x66\x78\xB4\xEB\x09\xB2\xE5\x67"
+ "\x41\x09\x0E\x88\xDF\x40\xF3\x30\xD8\x72\x90\xDD\x00\x01\x84\xE2\x00\xA8\x23\x40\xE9\x82\x3D\xD1\x84"
+ "\x41\xA1\xD5\x85\x61\x03\x37\x2F\x83\x3A\x9F\xBF\x38\xD1\x01\x70\xED\x25\x33\x43\xF1\xB7\x37\x38\xE5"
+ "\xAF\x33\xFC\x0A\x7C\xE8\x0B\xCE\x4E\x60\x00\x10\x40\x18\x0E\x40\x72\x04\xEB\xDD\x22\x86\x29\xA2\x32"
+ "\x0C\xA9\xBC\xF6\x82\x44\x3B\xC0\xF3\xE1\x57\x86\x08\xA3\xC9\x0C\x4A\xDC\x2A\xC0\x52\x0C\x51\x3B\x03"
+ "\x9B\x1F\x0C\x6F\x7F\xBD\x61\x88\x3E\x14\xFE\xE1\x5B\x24\x03\xDC\x40\x80\x00\xC2\xDA\x88\x80\x96\x54"
+ "\xBF\x5E\x55\x32\x5A\xB0\x0B\x80\xAA\xC1\x9F\xC4\x37\xD5\xBE\xFF\x63\x30\x96\xB7\x62\x10\x03\x42\x74"
+ "\xF0\x0A\x08\xBF\x7D\x07\x95\x5A\x08\x00\x10\x40\x78\x5B\x31\xC0\x4C\xA4\x0B\xAC\xE9\xC0\x09\x0A\xB5"
+ "\x62\x60\x82\xB4\x7F\xD8\xFF\x61\x6A\xFA\xF5\x8F\xE1\x30\x10\xE2\xAE\xD3\x51\xB9\x00\x01\x84\xD3\x01"
+ "\x2F\xCB\x19\x1D\x41\x05\x04\x13\x37\x92\x03\xFE\x03\x83\xF4\x03\x50\xF4\x27\xD4\x62\x0E\x20\xCD\x0B"
+ "\xC4\xCC\x48\xD1\xF8\x8B\x01\xEC\x80\xC7\x40\x88\x0E\x64\x41\x4D\x86\x1F\xA8\x62\x00\x01\x84\xD3\x01"
+ "\xC0\x4C\xE2\xC8\xC4\x01\x4D\xAF\xBF\xA0\xF8\x3D\xD0\xA2\xBF\x7F\x18\x3E\x01\xD3\xF3\x3B\x60\x86\x02"
+ "\x95\xF1\x02\x12\xC0\x4C\xA2\x0A\xAD\x88\x99\x21\x3E\x3C\x05\x84\xF7\xFE\xDF\x43\x31\x4F\x88\x51\x88"
+ "\xE1\x33\x10\xA2\x87\x00\x40\x00\xB1\xE0\x69\x7A\x19\xB0\xB0\x43\x33\x0D\xA8\x02\xFC\x08\x74\x03\x90"
+ "\x7E\x0D\xB4\xFC\x3B\x50\xEC\xDC\x4B\x86\x65\xC0\x5A\xF2\x9F\xE6\x0F\x86\x80\xA2\x1F\x0C\x3C\x77\x81"
+ "\x4D\x33\x66\x60\x74\x01\x0B\x3C\x86\xCF\x7F\x1E\x00\xAB\x41\x68\xA8\x00\x03\x8D\x91\x8D\x91\xE1\x23"
+ "\xD3\x47\x06\x10\x04\x3B\xA0\x81\x61\x3F\xAC\x2E\x07\x08\x20\xAC\xB9\x00\x04\x9E\x15\x31\x3E\x14\x96"
+ "\x60\x90\x63\x07\x35\x2F\xBE\x00\x13\x10\xB0\x4E\xFA\x06\x74\xC0\x93\x4F\x0C\x27\x3A\x4F\x33\x4C\xDB"
+ "\x72\x8F\xE1\x0E\x50\xE6\x73\x92\x26\x83\xD4\xBC\x40\x86\x9D\x0C\x41\x48\x0D\x32\x39\x68\xCD\x8A\xCD"
+ "\x8B\x0F\x91\xD8\xEB\x18\x18\x00\x02\x08\xAB\x03\x1E\xE6\x33\x2A\xB2\x31\x33\xDC\x13\x03\x96\x3F\xDF"
+ "\x80\x41\xFF\x1E\x18\x72\x1F\x7F\x30\xDC\x5B\x7E\x9D\x61\x66\xFB\x49\x86\xE3\xD0\xEA\x11\x54\x2D\x42"
+ "\xCA\xEA\x3C\x86\xD9\x0C\xD2\x0C\xE1\x0C\xA1\xD0\x4A\x90\x18\xB0\x03\x54\x68\x30\x2C\x00\x08\x20\xAC"
+ "\x51\x00\x0C\x35\x43\x50\x41\xF9\x12\x14\x65\xBF\x18\xBE\xEE\xBA\xCB\x30\x2B\x63\x37\xC3\x26\x48\x44"
+ "\x80\xEB\x67\x50\x83\xE0\x1B\xDC\x9F\x93\x18\x62\x18\x32\x19\xFE\x30\x2C\x02\xB6\x88\x82\x89\x68\x9A"
+ "\xEE\x06\x97\x48\x0B\x18\xA6\x30\x24\x02\x04\x10\xF6\x34\xF0\x0F\xE8\x00\x60\x4E\xBB\xFC\x8A\x61\x7E"
+ "\xF9\x3E\x86\x8D\x97\x5E\x31\x3C\x83\xFA\xF8\x1D\x34\x45\xFC\x86\xB5\x6A\xA0\x5D\x81\x3F\x0C\xD3\x19"
+ "\x62\x19\x52\x80\x0E\x5A\xCA\x10\x07\x6C\xDE\xE0\x76\xC4\x3E\x70\x5B\xF6\x02\xB0\xD1\x01\x6A\xDB\x31"
+ "\x00\x04\x10\xAE\x92\x10\x14\xF3\xA2\xA0\xC4\x0B\x4D\xFF\xB0\xE0\xFE\x05\xAB\x44\x90\xD4\xA2\x6A\x8E"
+ "\x05\xFA\x4C\x98\x21\x1E\xDC\x44\x45\x77\xC4\x41\x70\x3B\x07\x64\xB9\x23\x50\x15\xB8\x59\x05\x10\x40"
+ "\xB8\x1C\xC0\x04\xD5\xCE\x0A\xF6\x1D\x30\x26\x40\x55\x27\xD6\xE8\xC2\xD6\x19\x8A\x66\x98\x0F\x74\x7A"
+ "\x02\x83\x33\x52\x1B\x19\xD4\x8E\xBD\x0B\xAE\x11\x1D\x81\xA1\x04\x6F\xD3\x01\x04\x10\xCE\x5C\x40\x2C"
+ "\xC0\xD9\x1B\x03\x39\x82\x1F\xE8\x08\x6B\x20\xFB\x0A\x10\x3F\xC2\xB4\x1C\x04\x00\x02\x88\x62\x07\xE0"
+ "\x75\x5C\x0C\xE3\x7C\x20\x95\x00\x6E\xBB\x03\x2D\xFF\xBF\xE4\x3F\x7A\x6B\x96\x01\x20\xC0\x00\xA5\xBB"
+ "\x6A\x3A\x4A\x3F\xC0\x7E\x00\x00\x00\x00\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 2232,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x04\x67\x41\x4D\x41\x00\x00\xAF\xC8\x37\x05\x8A\xE9\x00"
+ "\x00\x00\x19\x74\x45\x58\x74\x53\x6F\x66\x74\x77\x61\x72\x65\x00\x41\x64\x6F\x62\x65\x20\x49\x6D\x61"
+ "\x67\x65\x52\x65\x61\x64\x79\x71\xC9\x65\x3C\x00\x00\x08\x4A\x49\x44\x41\x54\x78\xDA\x62\xFC\xFF\xFF"
+ "\x3F\xC3\x40\x02\x80\x00\x62\x62\x18\x60\x00\x10\x40\x2C\x20\x82\x91\x91\x91\x2A\x86\xD5\xB4\x6E\x56"
+ "\x64\x66\x60\x9D\xFF\xFD\xD7\xCF\xA3\x5D\x8D\xFE\xCD\x40\xA1\x5F\x40\xFC\x0F\x9F\x1E\x80\x00\xA2\x5A"
+ "\x08\x34\x76\xEE\x6C\xE4\xE6\xE2\xBE\xE7\xE3\xA5\x67\xCF\xC3\xC3\x5D\xE5\x1B\x5C\xE6\x04\x14\xE6\x04"
+ "\xF9\x0F\x9F\x3E\x80\x00\x62\xA1\xD8\xE2\xAE\x1D\x86\x40\x3B\xE6\x2B\xCA\x8B\xE8\xFB\x79\xE8\x32\xB0"
+ "\xB3\xB1\x00\x31\x33\xC3\xEB\x37\x1F\x26\x00\xA5\x9D\xA0\xA1\xF0\x1B\x97\x7E\x80\x00\x62\x20\x37\x11"
+ "\xB6\xF7\xEF\x15\x68\xED\xDD\xDD\xD8\x33\xE5\xC0\xFF\xBB\xF7\xDF\xFF\xFF\xFD\xFB\xFF\xFF\xB7\x6F\x7F"
+ "\xFE\x7F\xF5\xEA\xDB\x7F\x10\x98\x3E\xFF\xE4\xFF\xC8\xC4\x09\xDD\x40\xA5\x42\xF8\x42\x1A\x20\x80\x18"
+ "\x41\x0E\xE0\x0E\x3F\x7C\xE0\xFF\xDF\xBF\x4C\xFF\xFF\xFD\x67\x04\xBA\x08\xE2\x28\x10\x82\x3A\x0E\x28"
+ "\xCE\xF0\xEF\xE7\x9B\xB6\xBF\x7B\xA2\xF6\x82\x7C\xD3\xDE\xB7\xCB\xE1\x3F\x03\xD3\x7C\x0D\x35\x09\x79"
+ "\x5F\x0F\x6D\x86\x5F\x3F\xFF\x31\xFC\xFE\xFD\x97\xE1\xEF\xDF\xFF\x40\xFC\x97\x81\x89\x89\x91\x81\x9D"
+ "\x83\x95\xA1\xA9\x6B\xE7\x97\x43\xFB\x96\xF9\x9C\x3C\xB2\xF4\x34\x50\xDF\x77\x06\xB0\xA9\xA8\x00\x20"
+ "\x80\xC0\x51\x60\xAF\x23\x64\xBF\xA9\x56\x9B\xE1\x03\x90\xFD\xE7\x2F\x03\xC3\x0F\x20\xFE\xF9\x07\x18"
+ "\x76\x50\xF6\xCE\x93\x9F\x18\x7A\xE6\x5C\xD8\xC6\xE2\xB9\xA4\xB1\xD8\x49\x58\x54\x50\x90\x37\xCB\xDD"
+ "\x49\x93\x41\x4E\x86\x9F\xE1\xC7\x8F\x7F\x0C\xFF\xFE\xA1\x9A\xFB\xE7\xCF\x3F\x06\x2E\x26\x26\x06\x17"
+ "\x07\x0D\x9E\xD7\x6F\x3C\xFB\x80\x0E\xF0\x81\x46\x03\x46\x54\x00\x04\x10\x0B\x24\x1A\x18\x18\x3E\x01"
+ "\xE9\x27\xDF\x80\x9A\xFF\x41\xF0\xEF\x3F\x10\x1A\xE4\x08\x43\x3D\x3E\x86\xD2\x28\x45\x86\x6F\x77\xFE"
+ "\xD6\x5B\x5B\x2B\x30\xD8\x98\x2B\x82\xF5\xFC\xF9\x83\x3B\x8A\xDE\xBF\xFF\xCA\xE0\xE6\xA8\xC4\x70\xEA"
+ "\xDC\x63\x23\x1D\x9F\x19\xDD\x57\x6E\xDE\xED\x61\xB8\xDD\x7D\x05\x28\xF5\x17\x39\x24\x00\x02\x88\x85"
+ "\x01\xE6\x02\x1C\xE0\x1F\xD0\xCD\xCF\xCE\x5C\x67\x90\xF8\xF2\x89\xC1\x27\xC1\x9C\x41\x5C\x94\x0B\xAC"
+ "\xFC\xDF\x3F\xC2\xE9\xE4\xCD\x9B\x1F\x0C\x31\xA1\x46\x0C\x37\xEF\xBF\x8B\xBE\xF9\xF2\xDF\x47\xA0\x51"
+ "\x35\x40\xE1\xCF\xA0\x40\x82\xA9\x01\x08\x20\xB0\x03\x40\x21\xF8\x17\x8B\x1B\x3E\x3D\xFF\xCC\xF0\xE8"
+ "\xD4\x25\x06\x4B\x23\x79\x06\x13\x43\x4D\x92\x13\xEA\xAF\x5F\x7F\x18\xA4\x24\x78\x19\xFC\xDD\xD5\x19"
+ "\x3E\x7E\x78\xA5\xB8\xF9\x34\x83\x20\x34\x2D\xC0\x1D\x00\x10\x40\x2C\xB0\x44\x86\xEC\x80\x3F\xC0\x8C"
+ "\x73\xF7\xC8\x15\x06\xCE\x7F\xBF\x18\x12\xC2\xCD\x19\x78\x79\x48\xCB\xAD\x57\x1F\x7E\x61\xD8\x72\xFA"
+ "\x0D\xD8\x67\x8C\xCC\x8C\x0C\x6C\x2C\xCC\x0C\x8F\x7E\x4B\x78\xB2\x5A\xCC\x6E\xFA\xFD\x8F\xF3\x19\x03"
+ "\x03\xCB\x6F\x88\xAF\x7F\x5F\x04\x08\x20\x48\x08\x40\xE3\x1D\xEE\xF2\xAF\x7F\x18\x7E\x7D\xFC\xC8\x90"
+ "\x10\x6F\x4D\xB2\xAF\xAF\x3C\xFC\xCA\x10\xD0\x72\x91\xC1\x40\x43\x84\x41\x45\x9A\x1F\x92\x4E\x7E\xFE"
+ "\x67\xD0\xB7\xD0\x61\x50\xD6\xF9\x19\x0D\xF4\xE8\x07\x50\x36\xDD\x7B\xFC\x11\xEF\xD7\x17\xCF\x17\x03"
+ "\x04\x10\xD8\x01\x7F\xFF\xA3\x86\x00\x97\x20\x0B\x03\x9B\x90\x10\xC3\xE9\xF3\x4F\x18\x4C\x0D\x65\x88"
+ "\xB6\xFC\xE3\xD7\xDF\x0C\xB9\xD3\x6F\x30\xD8\x1A\x49\x31\x64\x45\x6A\x33\xDC\x7C\x09\x49\xC4\x20\xC0"
+ "\xC6\xCA\xC0\xF0\xF2\xD5\x2F\x86\x97\xEF\xBF\xFD\xFC\xFE\xF9\xC7\x8B\xAF\xDF\xEE\xEA\x32\x7C\xB9\x71"
+ "\x03\x20\x80\x70\xA6\x81\x9D\x0F\xD8\x19\xBA\x36\xDD\x63\x90\x97\xFD\x00\x4E\x74\xFF\xFF\x42\xCA\x87"
+ "\xFF\xC0\xE0\x82\x44\xD9\x7F\x30\x0D\x13\x07\x65\xC5\x47\x2F\xBF\x31\xE8\x6B\x88\x32\x64\x47\x6B\x33"
+ "\xAC\x3D\xCF\xC0\xF0\xEE\x2B\xC4\x6C\x70\x99\x0F\x2C\x8A\x58\x98\xD9\x18\x8E\x9D\x7A\x26\xFE\xE4\xE0"
+ "\xA5\x7F\x0C\xDC\xBF\x99\x18\xEE\x76\x1F\x05\x08\x20\x68\x14\xFC\x03\xE7\x7F\x18\x78\x0E\x8C\xBE\x8D"
+ "\x87\x9E\x32\x2C\x2D\xD5\x67\xE0\x61\xFD\xCF\xC0\xCB\xCB\x0E\x96\xFF\x03\xCC\x3D\xBF\x41\xD1\x05\xB4"
+ "\x14\x14\xB4\xBF\x41\x05\x0F\x28\xCB\x82\xE4\xFE\xFC\x67\xE0\x64\x67\x65\x10\x10\xE6\x60\xD8\x78\x11"
+ "\x98\xD4\x7F\x20\x2C\x07\xD5\x75\xA0\x10\xB8\x75\xE2\x21\xC3\xF3\x63\x37\xFE\x31\xB0\xFC\x13\x60\xF8"
+ "\xF5\xE6\x18\x28\xB6\x01\x02\x08\x9E\x06\x90\x43\xE0\xE8\xF9\x57\x0C\xBA\x8A\xBC\x0C\x3E\x66\xFC\x0C"
+ "\xF7\x1E\x7C\x62\x10\x10\x62\x65\xE0\xE6\x63\x01\xE7\x9F\x4F\xC0\xBC\xF4\x19\x58\x5E\x7C\xFA\x0E\xC1"
+ "\x5F\x81\xEC\xCF\x40\x1A\x94\xC7\x3E\xBF\x07\xE2\xA7\x10\xCB\x7F\x43\x3D\xF4\xF7\xC7\x6F\x86\x0F\x4F"
+ "\xDF\x33\x5C\x3D\x72\x8B\xE1\xDD\x2B\xA0\x8E\x2F\xBF\x5E\x32\x08\xFC\x91\x64\xF8\x72\xFF\x28\x28\x47"
+ "\x00\x04\x10\xD4\x01\x10\x9F\xC0\x4A\xEC\xB5\xBB\x1F\x31\x34\x46\x29\x31\xFC\x00\x55\x67\xA2\x7C\x0C"
+ "\xF7\x1E\xBE\x66\x50\xD1\x12\x05\xA5\x25\x86\x5F\x40\x8B\x80\x66\x32\x7C\x00\x96\x5C\x4F\x5F\xFF\x67"
+ "\x78\xFF\xF9\x1F\xC3\xE3\xE7\x3F\x81\xFC\x7F\x0C\x1F\x3F\xFF\x65\xF8\xFC\xE5\x0F\xC3\x8F\x6F\xBF\x18"
+ "\x7E\xFF\xF8\xC9\xF0\xE7\xF3\x57\x86\x77\x4F\xDF\x31\xBC\x7B\xFF\x8D\xE1\xEF\xF7\xDF\x1F\x81\x1A\x5F"
+ "\x33\x30\xFF\x67\x61\x60\xFA\xCF\xCE\xF0\xF1\x24\xA8\x78\xFE\x06\x10\x40\xD0\x44\x08\x0C\x42\x68\x08"
+ "\xDC\x7E\xF4\x87\xE1\xF9\xEB\x6F\x0C\x3E\x16\x42\x0C\xC0\x22\x9E\xE1\x1F\x1B\x50\x90\x8F\x9F\xE1\xEA"
+ "\xBD\xCF\x0C\x42\xE2\xBC\x0C\x77\x80\x3E\x7C\xFC\xF2\x1F\xD0\xC2\xBF\x60\x0C\xB2\xF4\x03\x10\x7F\xFC"
+ "\xF8\x87\xE1\x1D\x90\xFF\xF5\x0B\xD0\xE2\xEF\xBF\x18\xFE\x00\x83\xE6\xCD\xF3\xB7\x0C\x7F\x81\xD9\xEB"
+ "\x2F\x13\x07\x30\x48\x7E\x41\x4A\x40\x76\x06\x6E\x86\x3F\xDF\xEE\x30\xBC\x3B\xF0\x08\xE4\x00\x80\x00"
+ "\x42\x84\x00\xD0\x01\xCC\x40\xF6\xF6\xC3\x4F\x19\x7C\xCC\x45\x19\xB8\x80\x16\xBF\x07\xD5\x09\xA0\x02"
+ "\x1C\xC8\xB9\xF5\xE4\x27\x03\xF3\x7B\x60\x1A\xF8\xC3\xC8\xF0\xF3\xF7\x7F\x70\x48\x80\xD2\x02\x28\x1D"
+ "\xFC\x06\xB2\x7F\xFD\x81\xB0\xC1\xC5\x3A\x30\xA4\x3F\xBD\xFB\xC2\xC0\xC4\xC6\xC9\xC0\xC8\xCE\x08\x89"
+ "\x2B\x18\x60\xFE\xCB\xC9\xF0\xEB\xED\x21\x06\x88\xD1\x3F\x00\x02\x88\x09\x96\x0B\x60\xE5\xC0\xA1\xB3"
+ "\x2F\x19\x7C\xCD\xC5\xC0\xB2\x9F\x81\x05\xD2\xA3\x77\xC0\xA0\xFE\x00\x0A\x09\x5E\x86\x97\xAF\xBF\x02"
+ "\x2D\x86\x58\x08\x4A\x94\xBF\x40\x09\xF1\x37\x24\x31\xFE\xF9\xC7\xC8\xF0\xED\xFB\x5F\x86\xA7\x4F\x3F"
+ "\x31\x7C\x01\xC6\x15\x0B\x0F\x2F\x03\x23\x0B\x96\x02\x8C\xE5\x1F\x0F\xC3\x87\xA3\xDB\x40\xBE\x07\x25"
+ "\x42\x80\x00\x82\x87\x00\xC8\x01\x8F\x1E\xFE\x61\xF8\xF6\xF5\x17\x83\xB7\xA5\x30\xC3\x93\x2F\x0C\x60"
+ "\x0C\xE4\x82\x53\xFC\x7F\xA0\x53\xFF\x30\x32\x33\xBC\xFB\xF8\x83\x81\x91\x89\x0D\xEC\xE3\x3F\x60\x5F"
+ "\x43\x1C\xF3\x1C\xE8\xB8\x97\xAF\x7F\x32\x30\x72\x72\x31\x30\xFF\xFB\xCB\xF0\xFF\xC7\x0F\xCC\x3A\x86"
+ "\xFD\x3F\x37\xB0\xF4\xFB\xC2\xF0\x7A\xDD\x75\x20\xEF\x2B\xC8\x01\x00\x01\x04\x4F\x03\x20\xBC\x7C\xFB"
+ "\x03\x86\x00\x0B\x31\x06\xA0\x39\x40\x5F\x00\x13\x20\x23\x24\x0B\x81\xF2\x30\x33\x30\x7E\xFE\xF3\xB1"
+ "\x33\x3C\x7D\xF2\x99\x81\x93\x8B\x99\x81\x0D\x98\x29\xD9\x18\xFF\x32\xB0\xFD\xFF\xCD\xF0\xF5\x1D\x50"
+ "\x0C\x28\x2F\x21\xC2\xC1\xF0\xFF\xE7\x4F\x20\xFE\x01\x2C\x23\xBE\x03\x43\xF6\x27\xB8\xAC\xF8\xC6\xF9"
+ "\x1B\x98\xFE\xFE\xB3\xFE\xF8\xF7\x87\x0D\x96\xFD\xA0\x75\xC2\x5F\x80\x00\x82\x84\x00\x34\x3F\x1F\x38"
+ "\xFD\x9C\x61\x19\x30\xEF\x6B\xF2\x02\x05\x79\x11\x0E\x07\xB6\x31\xC0\x0D\x8E\x3F\x40\xAF\xFE\xD1\x64"
+ "\x05\xB2\x7F\x42\xD8\xC0\xA0\x01\xD5\xFD\xBF\x7F\xB3\x41\xD9\x7F\x20\xD1\xF3\x87\x05\x88\xB9\x80\x98"
+ "\x1D\x2A\xC6\x09\xA4\x79\x79\x43\xDB\x1F\x32\xFC\x78\xF4\xF4\x02\x28\xEE\xA1\x8E\xF8\x0F\x10\x40\xF0"
+ "\x92\x70\xCF\xA9\x4F\xC0\x44\xF8\x9F\xC1\xC3\x88\x0F\xB3\xE5\x0A\x0E\x01\x46\x60\x54\x31\x82\x5B\x3B"
+ "\x4C\x40\x01\x26\x26\x60\x45\xC3\x08\xA1\x51\xE5\x40\x98\x19\x2A\xFF\x1F\xCE\xBE\xFB\xFC\x17\xC3\x8F"
+ "\xB7\x40\xD7\xBD\x59\x7F\x18\x1A\xFF\xE0\xC6\x09\x40\x00\x41\x13\xE1\x7F\x86\xC3\x67\x9E\x33\x24\xB9"
+ "\x61\x2F\xF7\x21\xD1\x00\xB3\x98\x19\x6C\x21\x88\xCF\xCC\xCC\x04\x6E\xD2\x23\x2C\x65\x02\x8B\x21\x1C"
+ "\xC2\x08\x96\x07\xA9\x3F\x7C\x15\x18\xE5\x7F\xBF\xDE\x63\xF8\x71\xF7\x1D\xB2\x03\x00\x02\x88\x09\x56"
+ "\x12\x9E\xBF\xF4\x82\x21\xD1\x5D\x16\x67\x45\x03\x33\x08\xD9\x70\x88\x83\x98\xC0\x21\x81\x29\x07\x53"
+ "\x0F\x92\x67\x66\x38\x78\x19\x98\xA2\xBF\xDF\xDB\x0D\x8D\xFB\x1F\xB0\xFE\x02\x40\x00\x81\xA3\xE0\xCE"
+ "\xBD\xB7\x0C\xCA\x72\xBC\x0C\x1A\x52\xAC\xB8\x3B\x10\x4C\xD0\x22\x1B\xD8\x44\xFA\xF9\x0B\x18\x9C\xC0"
+ "\x92\xEE\x27\x30\xB1\x81\xE8\x1F\x3F\x7E\x31\x7C\x07\xA6\xFA\x1F\xC0\x04\xF8\xF3\x07\x48\xEE\x07\xB0"
+ "\xAC\xF8\xC5\xF0\x0F\x54\x08\x01\x35\x7D\xFA\xF6\x8F\xE1\xCD\x63\x60\xAA\xFE\x76\xF5\x1C\xD0\xA8\x2F"
+ "\xD0\xF8\x07\x03\x80\x00\x62\x81\x85\xF1\x7B\x60\x21\xEF\x5C\x7E\x16\xDC\x5A\x03\x37\x32\xFF\x43\x0A"
+ "\x15\x10\xF1\x0F\x5A\xF3\xFD\x03\x66\x2F\x90\xA1\x7F\x80\xA9\xF2\x1F\x30\xD5\xFE\x03\xD2\x7F\xA0\xF4"
+ "\x63\x60\xD6\xF9\xFC\xFA\x37\x24\x41\x81\x5C\xFA\x1F\x9A\xB8\xFE\x43\xF1\xBF\x9F\xAF\x18\xDE\x6F\xBE"
+ "\x06\xCD\x7E\xF0\xC6\x29\x40\x00\x81\x9B\xE5\xC0\xE0\x05\xA5\x3C\x50\xF8\xF3\xD3\xB0\x1B\x08\x0A\x72"
+ "\x50\xDB\xF7\x29\x94\x06\x17\x12\x00\x01\x04\x73\x00\x2B\xB4\x1B\xC5\x4A\x43\x07\xFC\x87\xFA\x1C\xA5"
+ "\x4D\x08\x10\x40\x8C\x03\xDD\x3D\x07\x08\x30\x00\xBB\x4C\x41\x1B\x78\xB7\x50\xC8\x00\x00\x00\x00\x49"
+ "\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1331,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x04\x67\x41\x4D\x41\x00\x00\xAF\xC8\x37\x05\x8A\xE9\x00"
+ "\x00\x04\xEA\x49\x44\x41\x54\x78\x9C\xB5\x57\x5F\x68\x53\x57\x18\xFF\x9D\x73\x4F\x4D\xD6\xA4\xB1\x74"
+ "\x6D\xAC\x26\xD0\x12\x42\x92\x75\xA1\x98\x40\x67\x0B\xBA\xD9\x22\x8C\xE9\x50\x86\xB6\x0A\x85\xF9\x3C"
+ "\xB6\x37\xDF\xA4\x3E\x0E\x87\x43\xFA\xB0\x27\x1D\x7B\x90\xBD\xA9\x43\x19\x9B\x58\x11\x19\xB4\xF4\xA1"
+ "\x4E\x47\x1B\xD6\x4E\xB0\xC6\x06\x63\xDB\xD0\x76\x9A\xDE\x24\x4D\x72\xFE\xEC\xA1\xBD\x77\x69\xCC\x6D"
+ "\x52\xAA\x1F\x7C\xDC\x7B\xCE\x3D\xF7\xFB\x7E\xDF\x39\xDF\xBF\x43\x50\x85\x06\x06\x06\x2E\x9E\x3A\x75"
+ "\xEA\x2B\x21\x84\xE5\x1A\xA5\x14\xA4\x94\x90\x52\x42\x29\x05\xC6\x18\x26\x27\x27\x67\x2F\x5D\xBA\x74"
+ "\x04\xC0\xBF\x5B\xC9\x67\xD5\x00\xEC\xDD\xBB\xD7\xD5\xDF\xDF\xBF\xBB\xDA\x3A\x00\xE0\x9C\x83\x73\x0E"
+ "\xBB\xDD\x8E\x4C\x26\xD3\x0E\xC0\xBD\x63\x00\x00\x64\x2D\x4A\x4B\xB9\x58\x2C\x82\x73\x2E\x00\x90\x6A"
+ "\xC2\xAB\x02\x20\xC4\x5A\x46\x25\xE5\x9C\x73\x68\x9A\x56\x4D\x6C\xED\x00\x28\xA5\xDB\x52\xCE\x39\x07"
+ "\xA5\x74\x4B\xE0\xDB\x02\x50\xC9\x9A\xAD\x94\x73\xCE\x6B\x56\x5E\x13\x80\xF2\x1D\xA8\xA6\xFC\xAD\x03"
+ "\x60\xEC\xFF\x25\xB5\x28\x37\x00\xBC\xB5\x23\x10\x42\x14\x37\x9E\x35\x03\x00\x00\xA5\x94\x02\x90\xAB"
+ "\x26\x7F\x4B\x77\x3D\x7F\xFE\xFC\x47\x5E\xAF\xF7\x44\x57\x57\x57\x90\x52\x0A\x4D\xD3\x40\x29\x35\x9D"
+ "\xAC\x12\x03\xEB\xBB\xB6\xB8\xB8\xC8\x57\x57\x57\x67\xFB\xFA\xFA\xF4\xC7\x8F\x1F\x2F\x5B\xE9\xB0\xDC"
+ "\xA7\xBE\xBE\xBE\xDE\xA1\xA1\xA1\x3B\xD7\xAF\x5F\xB7\x77\x76\x76\x42\x08\x01\x21\x84\x99\xF1\x0C\x36"
+ "\xE6\x4A\x9F\x00\x30\x37\x37\x87\x68\x34\x8A\x8E\x8E\x8E\x17\x03\x03\x03\x87\xD3\xE9\xF4\x6C\x25\x3D"
+ "\x96\x47\x70\xF0\xE0\xC1\x2F\x0F\x1D\x3A\x64\xF7\x78\x3C\x28\x16\x8B\xEB\x68\x4B\xCE\xD5\x00\xB4\x91"
+ "\x74\xDE\xE0\x03\x07\x0E\xA0\xA9\xA9\x09\x4E\xA7\xD3\x1B\x0E\x87\xCF\x8C\x8F\x8F\x7F\x5B\x33\x80\x48"
+ "\x24\xE2\xF7\xFB\xFD\x3D\x8C\x31\x04\x02\x81\x8A\x00\xA5\x94\x28\x14\x0A\x66\xE6\x33\xB8\x74\x9C\xCF"
+ "\xE7\xC1\x39\x87\xDF\xEF\x3F\x32\x3E\x3E\xFE\x13\x80\x85\x72\x39\xA6\x49\xFD\xFD\xFD\xAD\xAD\xEE\xD6"
+ "\x93\xFB\x23\xFB\x4F\x84\xC3\xE1\x9E\xD0\x07\x21\xA7\xCB\xE5\xB2\x54\x6E\x14\x20\xA5\x94\xC9\xA5\xE3"
+ "\xD2\x77\x5D\xD7\x31\x33\x33\x93\x1A\x1D\x1D\xFD\xE3\xEE\xDD\xBB\xBF\x3C\x7C\xF8\xF0\x77\x00\x19\x53"
+ "\xE0\xBE\x7D\xFB\x02\x37\x6E\xDC\x98\x7B\xB5\xF2\x4A\x15\x8A\x05\xF5\x2E\x29\x95\x4A\xA9\xA1\xA1\xA1"
+ "\x51\x00\x8D\x26\x80\xC1\xC1\xC1\x1F\x94\x52\xEA\x66\xFC\xA6\x3A\xFB\xE7\x59\x75\x6D\xE6\xDA\x3B\x05"
+ "\xB1\xB0\xB0\xA0\x42\xA1\xD0\x37\x00\x40\x01\x34\x1E\x3F\x7E\xFC\x24\x00\xE4\x8A\x39\xC4\xD2\x31\x80"
+ "\xAE\xD7\x78\xC3\xD1\xDE\x26\x2B\xA5\xB0\x67\xCF\x1E\x1C\x3D\x7A\xF4\x0C\x00\x3B\x09\x04\x02\x9F\xDD"
+ "\xBE\x7D\xFB\x4E\x30\x18\x84\x2C\x4A\xAC\x15\xD7\x60\xAF\xB3\x43\xC0\xBA\x01\xD9\x29\xD9\x6C\x36\xDC"
+ "\xBA\x75\x2B\x77\xFA\xF4\xE9\x6E\xE6\xF3\xF9\xA2\x4D\x4D\x4D\xD0\x75\x1D\x1A\xD5\xA0\x51\x0D\x79\x9E"
+ "\x87\x52\xEA\x9D\x01\x10\x42\xC0\xEB\xF5\xBE\xD7\xDA\xDA\x1A\x61\xED\xED\xED\x6D\x85\x42\x01\x6B\x6B"
+ "\x6B\xA0\x94\x82\x31\x66\x66\x3C\x23\xEE\x4B\xE3\xBF\x1A\xB0\x4A\x6B\xD5\x46\x54\x18\xE9\x9C\x10\x02"
+ "\xA7\xD3\x09\xB7\xDB\xED\x63\x76\xBB\xDD\x61\xC4\x6F\xA9\x70\x42\xC8\x1B\x69\xD7\xA8\x8C\x56\x85\xC6"
+ "\xF8\xBF\x3C\x1C\x8D\xB1\x41\x86\x81\x75\x75\x75\x0E\x06\x40\xE6\xF3\x79\xD3\x41\xAA\x59\x5A\xAD\xCA"
+ "\xD5\xF2\x1F\xA5\xD4\xD8\x09\xC2\x96\x97\x97\x5F\x1B\x19\x4D\x29\x05\x4A\x29\x1C\x0E\xC7\xB6\x6A\x7A"
+ "\x2D\x24\x84\x40\x26\xB3\x9E\x7B\x34\x4D\x83\xAE\xEB\xC8\x66\xB3\x19\x96\x48\x24\x66\xB3\xD9\xAC\x89"
+ "\x32\x9D\x4E\xE3\xEA\xD5\xAB\x66\x59\x2D\xDF\x99\xED\x10\x21\xC4\xEC\xA8\x5A\x5A\x5A\x70\xEC\xD8\x31"
+ "\xD3\xCF\x96\x96\x96\x90\x4A\xA5\xE6\x58\x3C\x1E\x9F\x78\xF9\xF2\xA5\x72\xBB\xDD\x84\x10\x82\x95\x95"
+ "\x15\x5C\xB9\x72\x65\xC7\x16\x13\x42\x36\x01\xF7\x78\x3C\xE8\xED\xED\x85\xCD\x66\x03\x00\x3C\x7F\xFE"
+ "\x7C\x75\x7E\x7E\x7E\x86\x25\x12\x89\xBF\x9E\x3C\x79\x32\xDD\xDC\xDC\xFC\x21\xE7\x1C\xF9\x7C\x7E\x93"
+ "\xA0\xE1\xE1\x61\x04\x83\xC1\x37\xE6\x4B\xA9\xBC\x1C\x0B\x21\x40\x29\x45\x22\x91\xC0\x85\x0B\x17\x4C"
+ "\xEF\xD7\x75\xDD\x74\xE4\x89\x89\x89\x49\x00\xFF\x30\x00\xD9\x91\x91\x91\x9F\xC3\xE1\xF0\x77\x0D\x0D"
+ "\x0D\x68\x6C\x6C\xC4\xB9\x73\xE7\xCC\xF6\x7A\x70\x70\x10\x2E\x97\xCB\xAC\xF3\xE5\x64\xD5\x15\x49\x29"
+ "\x11\x0C\x06\xB1\xB8\xB8\x08\x4A\x29\x6C\x36\x1B\x08\x21\x60\x8C\x21\x1E\x8F\x63\x6C\x6C\xEC\x57\x00"
+ "\x2B\x86\xA7\x35\x74\x74\x74\x7C\xDD\xDD\xDD\xFD\x45\x57\x57\x57\x38\x14\x0A\xD5\x03\x80\xCB\xE5\x42"
+ "\x34\x1A\xB5\xB4\x5C\x29\xB5\xA9\x1F\x28\x7D\x37\x7A\x85\xA7\x4F\x9F\xA2\xBE\xBE\x1E\xBA\xAE\x63\x6A"
+ "\x6A\x6A\xF5\xD1\xA3\x47\x7F\x8F\x8D\x8D\x8D\xCC\xCF\xCF\xFF\x08\x20\x59\xEE\xEA\x6E\x4D\xD3\x3A\xDB"
+ "\xDA\xDA\x22\x3D\x3D\x3D\x9F\x0F\x0F\x0F\x7F\xDC\xD2\xD2\x52\x93\xE5\xE5\x8D\x89\xD1\xC4\x24\x12\x09"
+ "\x5C\xBE\x7C\xF9\x41\x2C\x16\xBB\x9F\x4C\x26\x63\x00\xA6\x00\xBC\xC0\xC6\x8D\xAB\xFC\xD6\x91\x12\x42"
+ "\xDC\x7F\xF6\xEC\xD9\xF7\x3E\x9F\x2F\x6E\xA5\x1C\x58\x0F\x25\x83\x8D\x84\x55\x9E\xB8\xA4\x94\xF0\x78"
+ "\x3C\x90\x52\xC6\x92\xC9\xE4\x45\x00\xBF\x01\x48\xA0\xE4\xBA\x57\xB1\x23\x72\x38\x1C\xEE\x68\x34\xFA"
+ "\xE9\xF4\xF4\x34\x84\x10\x9B\x62\xB0\xD4\xD1\xA4\x94\xE6\x79\x5B\xCD\xED\xDA\xB5\x8B\x44\x22\x91\x4F"
+ "\xEE\xDD\xBB\xB7\x1B\xC0\xEB\x72\x5D\x56\xD9\xC6\x6E\xB3\xD9\x0E\x4B\x29\xDF\x07\x76\x5C\x16\x29\x63"
+ "\x6C\x2D\x97\xCB\x3D\x00\xF0\xAA\xFC\xE3\x7F\xC0\x42\x83\x1B\x33\x49\xBA\x6F\x00\x00\x00\x00\x49\x45"
+ "\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1647,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x06\x62\x4B\x47\x44\x00\xFF\x00\xFF\x00\xFF\xA0\xBD\xA7"
+ "\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0B\x0D\x00\x00\x0B\x0D\x01\xED\x07\xC0\x2C\x00\x00\x00"
+ "\x07\x74\x49\x4D\x45\x07\xD3\x09\x09\x14\x14\x16\xE9\x33\x80\x72\x00\x00\x05\xFC\x49\x44\x41\x54\x78"
+ "\xDA\xC5\x97\x5D\x6C\x1C\x57\x15\xC7\x7F\xF3\xB5\xBB\x63\xC7\x6B\xEF\x66\x69\x12\x3B\xA9\x93\xE2\x56"
+ "\x0E\x21\x91\xE3\x81\x08\x11\x12\x1A\x20\x54\x8D\x22\x22\xAA\x4A\x7D\x69\xA1\x1F\x58\x60\xC9\xAD\xFA"
+ "\x50\x55\x08\x24\xA4\x20\x40\x48\x3C\x14\x09\x1E\x4A\x57\x4E\x09\xA4\x42\xED\x43\x0B\x08\xF5\x21\x25"
+ "\x4A\x95\xB6\x29\x95\xEA\x49\x6D\xB7\x29\x5F\x8B\x92\xA6\xCE\xBA\xF1\xC7\xEE\xBA\xBB\x3B\xB3\x3B\x33"
+ "\xF7\xF2\xB0\xB3\xF6\x6E\xBD\x6B\xA7\x10\xC4\x95\xFE\x5A\xCD\x9E\x73\xE7\xFC\xCF\xB9\x67\xCE\x39\x17"
+ "\xFE\xCF\x4B\xF9\x38\xCA\xC3\xA3\x93\x3B\x40\x1E\x02\x31\x04\x0C\x21\x45\xC3\x3B\xE4\x14\x52\x4C\x21"
+ "\xBC\xB3\x16\x27\x33\x80\x48\xA7\xD3\xF2\x86\x10\x18\x1E\x9D\x7C\x00\xB8\x1F\x38\x08\x12\x10\xA0\x46"
+ "\x40\x8D\xD5\x14\x84\x0B\x81\xDB\xB8\xE5\x3C\xC2\x3F\x65\xC9\xF1\x13\x80\x97\x4E\xA7\xC5\x7F\x44\x60"
+ "\x78\x74\x72\x2F\x8A\xFA\x04\x52\x7C\x11\x55\x83\x48\x0F\x44\x92\x44\xA2\x26\xDB\xE2\x4B\x7C\x76\x6B"
+ "\x0E\x80\xA2\x0B\x67\x2E\xF5\xE3\xB8\x55\xA8\xCC\x81\xBB\x00\xD2\x03\xA4\x43\xE0\x3E\x66\xF1\x9B\x5F"
+ "\x03\x6E\x2B\x22\xCA\x3A\x5E\x9F\x00\xC0\xDC\x4C\x64\xC3\x4D\x3C\xB4\x6F\x86\xDD\xB7\x6C\xE0\xB6\xAD"
+ "\x1D\xC4\x22\xEA\xAA\x3D\x33\xF3\x15\xFE\xF2\x6E\x81\x57\xFE\x0A\x6F\x5E\x32\xA0\x74\xB9\x26\x08\xAA"
+ "\x2F\x58\x3C\xFD\x2D\x60\x29\x9D\x4E\xFB\xEB\x12\x58\x36\xAE\x45\x21\x7E\x1B\xF7\xEE\x7D\x9F\x63\xFB"
+ "\x53\x24\x36\xE8\x6D\xA3\x25\x3F\xF2\xAA\x57\xA6\xF3\xFC\xEA\xAC\xC1\x07\xB3\xB3\xE0\x17\x41\x78\x53"
+ "\x96\x3C\xF1\x55\x60\xAE\x31\x12\x5A\x5B\xE3\x7A\x07\xDB\xB6\x6D\xE1\xB1\x3B\x8A\x1C\xFE\x4C\x12\x43"
+ "\x57\xF1\x05\x4D\xF8\xEE\xA9\x22\xA7\x27\xAB\x1C\xDC\x15\x21\x10\xB2\x09\x7D\xA9\x28\x07\x06\x21\x57"
+ "\xF4\xB9\x34\xA7\x80\x0C\x36\x65\xE5\xAE\x4F\xF5\x32\xF9\x07\xCB\xB2\x7C\xDB\xB6\xE5\x2A\x02\xC3\xA3"
+ "\x6F\xED\x05\xE5\x45\x34\x83\xBE\xBE\x3E\x1E\x3F\x2A\xD9\xBE\x29\x86\xE7\xCB\x55\x38\xFE\x5C\x99\xF1"
+ "\xB1\x24\xC7\xF6\x99\x3C\x3A\x5E\xE0\x73\xB7\x6A\xAB\x74\x74\x4D\x61\xF7\x76\x93\x6B\x4B\x82\x2B\x0B"
+ "\x00\xF2\xD6\xAC\xB7\xE3\xF5\x5E\xF5\xE2\x95\x90\x04\x1F\x3D\xC8\xA7\x21\x80\xF8\x20\x0F\x1E\x70\x89"
+ "\x77\xE8\x94\x2B\xB2\x25\xC6\xC7\x92\xCB\x9B\xC6\xC7\x92\xFC\xE4\x79\xA7\xA5\x9E\x90\xF0\x8D\x43\x71"
+ "\x06\x6E\x4E\xD4\x94\x23\x3D\xC7\x81\x04\xA0\x37\x45\x60\x78\xD4\x7E\x00\xE4\xB7\x31\x7B\xB9\x6F\x5F"
+ "\x8E\x9D\xFD\x1B\xF0\x02\xD9\x16\x5B\x53\xD1\x26\xE6\xC7\xF6\x99\x7C\xEF\x99\x0F\xD9\xD3\xAF\xAC\xD2"
+ "\x95\xC0\xF6\x94\xE0\x5C\xA6\x07\xBC\xA5\x2D\x59\xB1\x33\xDF\xAB\x4C\x5D\xB0\x2C\xAB\xBA\x12\x01\x29"
+ "\xEE\x07\x8D\x4D\xA9\x2E\x06\xFB\x3B\x29\xB9\x62\x4D\xB4\x5A\xE3\x63\x49\x9E\xFA\xB3\xD7\x52\x3F\xDE"
+ "\x69\xF0\xF5\xA1\x02\x28\x06\x68\xB1\xBB\x80\x1E\xC0\x50\x01\x86\xBF\xF3\xE6\x0E\xE0\x20\xB1\x8D\x7C"
+ "\x69\x60\x01\x3F\x80\x72\x25\x58\x13\x7F\x7A\x63\xB1\x2D\x89\x67\x5E\x6D\xD6\x2D\x94\x7C\xFE\x95\x2D"
+ "\x23\xD1\x20\xB6\x11\x14\x6D\x68\xA2\x72\x64\x27\x10\xAB\x7F\x57\x87\x6A\xE7\x93\x24\x15\x5F\xA2\xE4"
+ "\x88\xEB\x2A\xCD\xCF\xBE\x3C\xCF\x3D\xB7\xA7\x5A\x92\x78\xE8\x97\x8B\xEC\xE9\x2D\xF3\xDE\xA2\xC2\x1B"
+ "\x33\x7D\x2B\xC2\x88\x03\xCE\x2C\x18\xDD\xFB\x81\x0B\x75\x02\x43\x00\x9B\xBB\x05\x92\x9A\xF7\x00\xAF"
+ "\xFE\xC3\x58\x97\xC4\xE9\xB7\x17\x9B\x12\xB2\x99\x04\xFC\x6D\xA1\x59\x16\x89\x9A\x54\x01\xD4\xC8\x20"
+ "\x60\xAE\x10\xD0\x62\x24\xCC\x2A\xC5\xD0\xFB\xB7\xDE\x8F\xB6\x7C\xF1\xC7\x59\xE3\x63\x49\x0E\xFC\x30"
+ "\x4C\xB1\xB0\x2D\x69\x2A\xB5\x3C\x50\x83\x01\x04\xB1\x95\x24\x54\x63\xC4\xA3\x55\x4A\x15\x41\xA9\x22"
+ "\xFE\x6B\xE3\xCB\x15\xF1\x07\x35\xE3\x4A\x63\xA1\xD4\x3B\x41\x4A\x05\x30\xF4\xC6\x92\x5C\xF2\x22\x7C"
+ "\xE8\xF8\x37\xBE\xE7\xB7\x6F\x79\xEA\x4A\x71\x17\x2E\x39\x27\x86\xAE\xCA\xFF\xDD\xF0\x51\x27\xE2\x97"
+ "\x56\x18\x2C\x0F\x13\x81\x4B\xBE\x12\x25\x5B\xEC\x22\x5B\xEC\xE2\xC8\x4F\xBD\x1B\x62\xB4\x9E\x03\x00"
+ "\xBA\x1A\xE6\x82\xF4\x40\x7A\x19\x40\xE8\x61\x11\x9A\x42\xD1\x28\x39\x3E\x86\xB6\x12\x94\x2F\xFF\x58"
+ "\x34\x74\xBB\xE6\xAA\xED\x05\xCD\xE7\xBC\x96\x71\xA3\xA1\xE3\x38\x6E\x35\x6C\xD1\x95\x0C\x1A\x5E\xCD"
+ "\x9A\xF0\xCE\xA2\x69\x50\x5D\x40\x55\xB7\x5C\x97\x67\x75\x02\xEB\x19\x5F\xCE\xFC\xFA\xAA\x2E\x84\xBF"
+ "\x39\x1B\x13\x57\x05\x08\x67\xB8\xF3\x38\x73\x18\x8A\x87\xA9\xB7\x87\xEB\x81\xEB\xAD\x6D\xFC\x6B\x3F"
+ "\xF3\x48\x98\x2B\xA8\xEF\x35\x14\x0F\x9C\x39\x10\xFE\xB4\x65\x9E\xBE\x0C\x38\xF5\x78\x0B\x84\x7F\x0A"
+ "\x95\xCF\x2F\xE5\xE7\xF9\x64\x5F\x67\x5B\xCF\x13\x31\x07\x80\x93\x0F\xC7\x5B\xCA\xBF\xF9\x8B\x25\x12"
+ "\xB1\xD6\x7B\x33\x33\xA5\xDA\xF9\xFB\xC5\x97\xD0\x28\x01\x8E\x06\x60\xDB\x36\x47\x87\x95\xE9\xAC\x6A"
+ "\x7D\xC5\xAF\x14\xB7\xA6\x12\x71\x7A\xCC\x80\x98\xDE\x1E\x77\x5A\x1D\xAB\x0C\x3C\xF2\xD4\x7C\x5B\x7D"
+ "\xA7\x22\xC8\x5E\xBD\x52\xF3\x5E\xF9\xED\xCF\x81\x0F\x80\x7C\xE3\x8C\xE5\x11\xB8\x8F\xA3\x99\xE7\x32"
+ "\x97\x67\xF8\xC2\x9E\x4F\x60\x68\xD7\xFF\x49\x7E\xFF\xE4\x55\xBA\xA2\xED\xF2\x45\x21\x73\x79\xAE\xF6"
+ "\xE0\x66\x9F\x24\x4A\x1E\xC8\x03\xDE\x72\x7E\xDA\xB6\x2D\x8F\x5A\x7A\x36\x2B\x3F\x9D\x0B\x84\x7A\xC7"
+ "\x7C\xBE\xC2\x40\x6F\x84\x88\xA1\x61\x68\xCA\x2A\x9C\x7B\xBB\xC8\xC1\xDD\x5D\x00\xFC\xE8\x77\xD9\x96"
+ "\x3A\x86\xA6\xA0\xE2\xF3\xDA\x54\x8E\xB2\xEB\x41\x35\xF7\x84\x65\xFC\xFE\x0C\x90\x05\xF2\xE9\x74\x3A"
+ "\x68\x1A\xC9\x2C\xCB\x92\xBD\x4C\x4E\x66\xE5\xAE\x42\x35\x50\x0F\x5F\x99\xAB\xD2\x9F\x52\xE9\x30\xA3"
+ "\xE8\x9A\xB2\x0A\xE7\x2F\x96\x38\x7F\xB1\xD4\x52\xA6\x6B\x0A\xAE\x53\xE6\xCC\x85\x02\x25\x27\x34\xAE"
+ "\x3D\xF7\x3C\x30\x0B\xCC\x03\x55\xDB\xB6\x9B\x67\x42\xDB\xB6\xB1\x2C\x2B\xA8\x93\xF0\x84\x76\xF8\xEF"
+ "\x33\x2E\x9E\x50\xD9\xB6\x51\xC5\xD0\x55\x74\x95\x75\xA1\x48\x9F\x89\x7F\x96\x79\xFD\x9D\x3C\x9E\x2F"
+ "\x1A\x8D\x67\x81\x6B\x80\x53\xBF\x35\xB5\xAC\xD2\x23\x23\x23\x2A\xD0\x31\xE1\xDF\x7D\x3B\x91\x9E\xE3"
+ "\x28\xDA\x70\xD4\x50\xB9\x79\x73\x07\xBB\x7A\x05\xC9\x64\x37\x9A\xD6\xDC\xAA\x83\xC0\x63\x71\xB1\xC0"
+ "\x3B\x57\x55\xDE\x9B\x2D\x53\xF1\x04\x08\x7F\x1A\x37\xFB\xA4\x15\x7D\xF1\x42\x98\x74\xD7\x80\x72\xE3"
+ "\x58\xDE\xB6\x4D\x84\x24\x62\x40\x62\x42\xDE\xFB\x20\x5A\xEC\x2E\x14\x6D\xA8\x2E\x37\x23\x90\xEA\xAE"
+ "\xE5\xF0\x7C\xC1\xC7\xA9\x36\x6C\x16\xFE\x34\x7E\xF1\x25\x4B\x7B\xF6\x8F\x61\xB2\xCD\x03\xB9\x56\xB7"
+ "\xA3\x35\xAF\x66\x23\x23\x23\x4A\x38\xBD\x76\x02\x3D\x13\x95\x23\x3B\x31\xBA\xF7\xA3\x46\x06\x51\x8D"
+ "\x81\xB0\xA5\x86\xB5\xDA\xCB\x10\x54\x32\x54\x73\x76\x58\x64\x4A\x40\x21\x24\x50\x02\xFC\x56\x97\xD5"
+ "\xEB\xBA\x9C\x86\xD1\x30\xC2\x88\x98\x21\x62\xE1\x7F\xEA\x72\x31\x03\x0F\x70\x01\x27\x84\xBB\xDE\xE5"
+ "\xF4\xDF\xBB\x32\x46\xA9\x19\x56\x7E\x4C\x00\x00\x00\x00\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1625,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x06\x62\x4B\x47\x44\x00\xFF\x00\xFF\x00\xFF\xA0\xBD\xA7"
+ "\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0B\x0D\x00\x00\x0B\x0D\x01\xED\x07\xC0\x2C\x00\x00\x00"
+ "\x07\x74\x49\x4D\x45\x07\xD3\x09\x09\x13\x12\x2A\x95\x49\x4D\xF6\x00\x00\x05\xE6\x49\x44\x41\x54\x78"
+ "\xDA\xC5\x97\x5D\x8C\x5B\x47\x15\xC7\x7F\x77\xEE\xBD\xFE\xDA\xAC\xF7\x23\x2E\x49\x76\x13\x36\x81\x50"
+ "\x25\xA4\x91\x36\x7B\xA1\x0F\x44\x09\x09\x10\x22\xA2\x88\x96\x0A\x29\x2F\x2D\x6D\x0A\x2B\xC8\x43\xDF"
+ "\xAA\xBE\x54\x42\x4A\x05\x02\x89\x87\x22\xF5\xA5\xC8\x22\x25\xB4\x12\x2A\x0F\x14\x10\x0A\x12\x55\x1A"
+ "\xD4\x88\x0D\x91\xBA\xDE\xEE\x2E\x5D\xAA\xB6\x86\x6C\x83\xE3\x4D\xF6\xC3\x5E\xC7\xF6\xBD\xBE\x1F\x33"
+ "\x3C\xF8\xEE\xDA\x8E\xED\x6C\x8A\x0A\x8C\xF4\x7F\xF0\x9D\x33\xF3\xFF\x9F\xE3\x99\x33\xE7\xC0\xFF\x79"
+ "\x68\x1F\xC5\x78\xEC\xCC\xF4\x2E\x50\x47\x41\x8E\x02\xA3\x28\xD9\xB4\x87\x9A\x41\xC9\x19\xA4\x77\xC9"
+ "\xE2\x7C\x16\x90\xE9\x74\x5A\x7D\x2C\x02\xC6\xCE\x4C\x9F\x06\x9E\x00\x0E\x83\x02\x24\x88\x08\x88\x58"
+ "\xDD\x40\x3A\x10\x38\xCD\x4B\x26\x90\xFE\x2B\x96\xFA\xF9\x39\xC0\x4B\xA7\xD3\xF2\x3F\x12\x30\x76\x66"
+ "\xFA\x00\x9A\x78\x1E\x25\xBF\x88\xD0\x21\xD2\x0F\x91\x41\x22\xD1\x38\x3B\x92\x25\x3E\xBF\xBD\x00\x40"
+ "\xD9\x81\x8B\xD7\x46\xB0\x1D\x17\x6A\x8B\xE0\x2C\x83\xF2\x00\x65\x13\x38\x4F\x5B\xFC\xF2\x17\x80\xD3"
+ "\x49\x88\xB6\x81\xD7\xE7\x00\x88\x6F\x25\xB2\xE9\x13\x7C\xFB\xC1\x1C\xFB\x3F\xB5\x89\xFB\xB7\x27\x88"
+ "\x45\x44\xDB\x9A\xDC\x52\x8D\xBF\xFE\x7D\x95\xCB\xEF\xC2\x5B\xD7\x4C\xA8\xCC\xD7\x27\x02\xF7\x35\x8B"
+ "\x97\xBE\x03\x94\xD2\xE9\xB4\xBF\xA1\x80\x75\x72\x3D\x0A\xC9\xFB\x79\xF4\xC0\xBF\x78\xE8\x60\x8A\x81"
+ "\x4D\x46\xD7\x68\xA9\x3B\xB6\xBA\x3C\x5B\xE4\x67\x97\x4C\x6E\x2E\x2C\x80\x5F\x06\xE9\xCD\x58\xEA\xDC"
+ "\x57\x81\xC5\xE6\x48\xE8\x5D\xC9\x8D\x04\x3B\x76\x6C\xE3\xE9\xE3\x65\x8E\x7D\x6E\x10\xD3\x10\xF8\x92"
+ "\x16\xBC\xF1\x76\x89\x6C\xBE\xC6\xF0\x7D\x51\x02\xA9\x5A\x30\x9C\x8A\x72\x68\x0F\x14\xCA\x3E\xD7\x16"
+ "\x35\x50\xC1\x96\xBC\xDA\xF7\xD9\x21\xA6\x7F\x67\x59\x96\x9F\xC9\x64\x54\x9B\x80\xB1\x33\x6F\x1F\x00"
+ "\xED\x02\xBA\xC9\xF0\xF0\x30\xCF\x9C\x54\xEC\xDC\x12\xC3\xF3\x55\x1B\xAE\xCC\x95\x39\x75\x24\xC5\x03"
+ "\x3B\x13\x5C\xB8\x5A\xE0\xBE\x3E\xA3\xCD\xC6\xD0\x35\xF6\xEF\x8C\x73\xAB\x24\xB9\xBE\x0C\xA0\x3E\x93"
+ "\xF7\x76\x5D\x19\x12\x73\xD7\x43\x11\xDC\x19\xD3\x97\x20\x80\xE4\x7E\x9E\x3C\xB4\x4C\x32\x91\xA0\x5A"
+ "\x6B\xBF\x49\x73\xF3\x55\x4E\x1D\x49\xAD\xFF\x3E\x75\x24\xC5\xEC\x3F\xAB\x5D\xFF\x9E\x6F\x1D\x4D\x72"
+ "\xF3\xB6\xC9\x07\xFF\x28\x43\xA4\xFF\x2C\x92\x29\xC0\x03\x3C\xBD\xE1\x7D\xE6\x34\xA8\xEF\x12\x1F\xE2"
+ "\xB1\x07\x0B\xEC\x1D\xD9\x84\x17\xA8\x36\xBC\x9F\x73\x5A\xC8\xD7\xC6\xB5\x9B\x4E\x47\x7B\x2F\x50\x28"
+ "\x60\x67\x4A\xF2\x66\xB6\x1F\xBC\xD2\xB6\xBC\xDC\x5B\x1C\xD2\x66\xA6\x2C\xCB\x72\x1B\x11\x50\xF2\x09"
+ "\x34\x93\x2D\xA9\x5E\xF6\x8C\x38\x54\x9C\xF6\xAB\xBB\x58\xF4\x3A\x92\x03\x1D\xED\x9B\x47\xB2\xC7\xE4"
+ "\x1B\xA3\x4B\xBC\x36\x61\x82\x1E\x7B\x04\xC9\xCB\x80\x6D\x00\x8C\x7D\xEF\xAD\x5D\xC0\x61\x62\x9B\xF9"
+ "\xD2\xEE\x65\xFC\xA0\x07\x3F\x08\x5A\x09\x6C\xD9\x95\xFC\x0F\x57\x57\xEE\x4A\xEE\xF9\x8A\xE5\x92\x8B"
+ "\x42\x87\xD8\x66\xB0\x17\x46\x27\x6B\x27\xF6\x5A\xD1\x0B\x85\xB5\x08\x1C\x05\x20\x32\x48\x2A\x59\xA2"
+ "\x62\xB7\x7B\xD3\x8D\xFC\xD5\x3F\x2F\x75\x25\x5E\x58\x71\xF8\x70\x45\xE3\x6A\x6E\xB8\xF1\x31\x62\x83"
+ "\xBD\x00\x66\xDF\x41\x60\x6A\x4D\xC0\x28\xC0\xD6\x3E\x89\x02\xAA\xB5\x56\xEF\x4F\x1F\xDF\x72\xCF\xE4"
+ "\xCD\x6B\x57\xCA\x01\x57\x73\x23\x2D\xF3\x91\x68\x1C\x17\x40\x44\xF6\x00\xF1\x86\x00\x3D\xC6\x40\xDC"
+ "\xA5\x7C\x87\xF7\x4F\x3D\xBC\xAD\xAB\x87\xDD\xA2\xD2\x3C\xCE\x02\x87\x9E\x03\x15\x5E\x26\x5D\x00\x9A"
+ "\x09\x22\xD8\x8D\x24\xD6\xC8\xA7\x22\x46\x32\xEA\x52\xA9\xC9\x75\xDC\x8D\xFC\xA3\x8C\xCB\xDF\x07\xAD"
+ "\x39\x51\x1A\x3D\xA0\x94\x06\x98\x46\x73\x4A\xAE\x78\x11\x6E\xDB\xFE\xFF\xB2\x1C\x10\x8D\x6B\x28\x1D"
+ "\x0A\x76\x0C\x43\xA8\xFF\x1A\xDB\x7A\x14\xFC\x4A\x43\xC1\x7A\x31\x11\x38\x14\x6B\x51\xF2\xE5\xDE\x75"
+ "\x9C\xF8\xB1\xF7\xB1\x10\x1F\x7A\x2E\x8C\xBC\x08\xCF\x82\xF2\x40\x79\x59\x40\x1A\x61\x12\x9A\x41\xD3"
+ "\xA9\xD8\x3E\xA6\xDE\x9A\x9D\xBF\xFC\x43\xC9\xC5\x67\xC5\x5D\x37\xDE\x68\x98\x4D\x2F\x8E\xED\xB8\xE1"
+ "\x13\x5D\xCB\xA2\xE3\xD5\x77\x96\xDE\x25\x00\xDC\x65\x84\x10\x6D\x38\xF6\xA3\xEE\x87\xEB\x5E\x86\x2E"
+ "\x1A\xC0\x5D\xAE\x7F\x74\x0B\x19\xC0\x11\x00\x61\x0D\x37\x81\xBD\x88\xA9\x79\xC4\x8D\x76\x7C\xFD\x27"
+ "\xDE\x3D\x8B\x18\x88\x7B\x2D\x58\xDB\xC3\xD4\x3C\xB0\x17\x41\xFA\xB3\x56\xFC\x4F\xF3\xEB\xA9\x18\x90"
+ "\x48\xFF\x15\x04\x5F\x28\x15\x97\xF8\xF4\x70\x4F\x47\xB2\xC7\x5F\xB0\x39\xFF\x54\xB2\xA3\x88\xC7\x5F"
+ "\x28\x6D\x18\x89\x6C\xAE\x52\xFF\xFF\xFD\xF2\xEB\xE8\x54\x00\x5B\x07\xC8\x64\x32\x9C\x1C\xD3\x66\xF3"
+ "\xC2\xFA\x8A\x5F\x2B\x6F\x4F\x0D\x24\xE9\x8F\x07\xC4\x8C\x76\xFC\x71\xB2\xCA\xD7\xAC\x44\xDB\xE6\x97"
+ "\xA6\x6F\x77\xB4\x5F\x83\x5D\x93\xE4\x6F\x5C\xAF\x7B\xAF\xBD\xFC\x53\xE0\x26\x50\x6C\x3E\x5D\x1E\x81"
+ "\xF3\x0C\x40\x76\x3E\x47\xCC\xF0\xE8\x8D\xBA\x1D\xF1\xEC\xF9\x1B\x6D\x02\xBA\xD9\xF6\x46\x5D\x62\x86"
+ "\x47\x76\x3E\x57\x37\x74\xF2\x2F\x02\xC5\x10\x8D\x7A\x20\x93\xC9\xA8\x93\x96\x91\xCF\xAB\x07\x0A\x81"
+ "\x14\xC7\x97\x8A\x35\x76\x0F\x45\x88\x98\x3A\xA6\xAE\xB5\xE1\xCD\xBF\x95\x39\xBC\xBF\x17\x80\x1F\xFC"
+ "\x2A\xDF\xD1\xC6\xD4\x35\x04\x3E\x7F\x99\x29\x50\x75\x3C\x70\x0B\xCF\x5B\xE6\x6F\x2F\x02\x79\xA0\x98"
+ "\x4E\xA7\x83\x96\x92\xCC\xB2\x2C\x35\xC4\xF4\x74\x5E\xED\x5B\x75\x03\x71\xEC\xFA\xA2\xCB\x48\x4A\x90"
+ "\x88\x47\x31\x74\xAD\x0D\x13\x73\x15\x26\xE6\x2A\x1D\xE7\x0C\x5D\xC3\xB1\xAB\x5C\x9C\x5A\xA5\x62\x87"
+ "\xE4\xFA\xAF\x7F\x03\x2C\x00\x4B\x80\x9B\xC9\x64\x5A\x6B\xC2\x4C\x26\x83\x65\x59\xC1\x9A\x08\x4F\xEA"
+ "\xC7\xDE\xCB\x39\x78\x52\xB0\x63\xB3\xC0\x34\x04\x86\x60\x43\x68\xCA\x67\xF2\x83\x2A\x57\xDE\x29\xE2"
+ "\xF9\xB2\x99\x3C\x0F\xDC\x02\xEC\xB5\xAE\xA9\x63\x59\x3E\x3E\x3E\x2E\x80\xC4\xA4\xFF\xCD\x23\x44\xFA"
+ "\xCF\xA2\xE9\x63\x51\x53\xF0\xC9\xAD\x09\xF6\x0D\x49\x06\x07\xFB\xD0\x75\xB3\x65\x4D\x10\x78\xAC\xAC"
+ "\xAC\xF2\xCE\x0D\xC1\x87\x0B\x55\x6A\x9E\x04\xE9\xCF\xE2\xE4\x5F\xB4\xA2\x17\xA6\xC2\x43\x77\x0B\xA8"
+ "\x36\x97\xE5\x5D\x1B\x93\x50\x44\x0C\x18\x98\x54\x8F\x3E\x89\x1E\x7B\x04\x4D\x1F\x5D\x9B\x8F\x47\x20"
+ "\xD5\x57\xBF\xC5\x4B\xAB\x3E\xB6\xDB\xB4\x58\xFA\xB3\xF8\xE5\xD7\x2D\xFD\xD5\xDF\x87\x87\x6D\x09\x28"
+ "\x74\xEA\x8E\xEE\xDA\x9A\x8D\x8F\x8F\x6B\x80\x01\xF4\x00\xFD\x93\xB5\x13\x7B\x31\xFB\x0E\x22\x22\x7B"
+ "\x10\xE6\xEE\xF0\x49\x0D\x9F\x13\x2F\x4B\x50\xCB\xE2\x16\x32\x61\x92\xA9\x00\xAB\xA1\x80\x0A\xE0\x77"
+ "\x6A\x56\xEF\xA9\x39\x0D\xA3\x61\x86\x11\x89\x87\x88\x85\xDF\xC4\x7A\x32\xAB\x97\xDA\x0E\x60\x87\x70"
+ "\x36\x6A\x4E\xFF\x0D\xCD\x4A\x06\xF6\x87\x57\xDE\x02\x00\x00\x00\x00\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1647,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x06\x62\x4B\x47\x44\x00\xFF\x00\xFF\x00\xFF\xA0\xBD\xA7"
+ "\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0B\x0D\x00\x00\x0B\x0D\x01\xED\x07\xC0\x2C\x00\x00\x00"
+ "\x07\x74\x49\x4D\x45\x07\xD3\x09\x09\x14\x14\x16\xE9\x33\x80\x72\x00\x00\x05\xFC\x49\x44\x41\x54\x78"
+ "\xDA\xC5\x97\x5D\x6C\x1C\x57\x15\xC7\x7F\xF3\xB5\xBB\x63\xC7\x6B\xEF\x66\x69\x12\x3B\xA9\x93\xE2\x56"
+ "\x0E\x21\x91\xE3\x81\x08\x11\x12\x1A\x20\x54\x8D\x22\x22\xAA\x4A\x7D\x69\xA1\x1F\x58\x60\xC9\xAD\xFA"
+ "\x50\x55\x08\x24\xA4\x20\x40\x48\x3C\x14\x09\x1E\x4A\x57\x4E\x09\xA4\x42\xED\x43\x0B\x08\xF5\x21\x25"
+ "\x4A\x95\xB6\x29\x95\xEA\x49\x6D\xB7\x29\x5F\x8B\x92\xA6\xCE\xBA\xF1\xC7\xEE\xBA\xBB\x3B\xB3\x3B\x33"
+ "\xF7\xF2\xB0\xB3\xF6\x6E\xBD\x6B\xA7\x10\xC4\x95\xFE\x5A\xCD\x9E\x73\xE7\xFC\xCF\xB9\x67\xCE\x39\x17"
+ "\xFE\xCF\x4B\xF9\x38\xCA\xC3\xA3\x93\x3B\x40\x1E\x02\x31\x04\x0C\x21\x45\xC3\x3B\xE4\x14\x52\x4C\x21"
+ "\xBC\xB3\x16\x27\x33\x80\x48\xA7\xD3\xF2\x86\x10\x18\x1E\x9D\x7C\x00\xB8\x1F\x38\x08\x12\x10\xA0\x46"
+ "\x40\x8D\xD5\x14\x84\x0B\x81\xDB\xB8\xE5\x3C\xC2\x3F\x65\xC9\xF1\x13\x80\x97\x4E\xA7\xC5\x7F\x44\x60"
+ "\x78\x74\x72\x2F\x8A\xFA\x04\x52\x7C\x11\x55\x83\x48\x0F\x44\x92\x44\xA2\x26\xDB\xE2\x4B\x7C\x76\x6B"
+ "\x0E\x80\xA2\x0B\x67\x2E\xF5\xE3\xB8\x55\xA8\xCC\x81\xBB\x00\xD2\x03\xA4\x43\xE0\x3E\x66\xF1\x9B\x5F"
+ "\x03\x6E\x2B\x22\xCA\x3A\x5E\x9F\x00\xC0\xDC\x4C\x64\xC3\x4D\x3C\xB4\x6F\x86\xDD\xB7\x6C\xE0\xB6\xAD"
+ "\x1D\xC4\x22\xEA\xAA\x3D\x33\xF3\x15\xFE\xF2\x6E\x81\x57\xFE\x0A\x6F\x5E\x32\xA0\x74\xB9\x26\x08\xAA"
+ "\x2F\x58\x3C\xFD\x2D\x60\x29\x9D\x4E\xFB\xEB\x12\x58\x36\xAE\x45\x21\x7E\x1B\xF7\xEE\x7D\x9F\x63\xFB"
+ "\x53\x24\x36\xE8\x6D\xA3\x25\x3F\xF2\xAA\x57\xA6\xF3\xFC\xEA\xAC\xC1\x07\xB3\xB3\xE0\x17\x41\x78\x53"
+ "\x96\x3C\xF1\x55\x60\xAE\x31\x12\x5A\x5B\xE3\x7A\x07\xDB\xB6\x6D\xE1\xB1\x3B\x8A\x1C\xFE\x4C\x12\x43"
+ "\x57\xF1\x05\x4D\xF8\xEE\xA9\x22\xA7\x27\xAB\x1C\xDC\x15\x21\x10\xB2\x09\x7D\xA9\x28\x07\x06\x21\x57"
+ "\xF4\xB9\x34\xA7\x80\x0C\x36\x65\xE5\xAE\x4F\xF5\x32\xF9\x07\xCB\xB2\x7C\xDB\xB6\xE5\x2A\x02\xC3\xA3"
+ "\x6F\xED\x05\xE5\x45\x34\x83\xBE\xBE\x3E\x1E\x3F\x2A\xD9\xBE\x29\x86\xE7\xCB\x55\x38\xFE\x5C\x99\xF1"
+ "\xB1\x24\xC7\xF6\x99\x3C\x3A\x5E\xE0\x73\xB7\x6A\xAB\x74\x74\x4D\x61\xF7\x76\x93\x6B\x4B\x82\x2B\x0B"
+ "\x00\xF2\xD6\xAC\xB7\xE3\xF5\x5E\xF5\xE2\x95\x90\x04\x1F\x3D\xC8\xA7\x21\x80\xF8\x20\x0F\x1E\x70\x89"
+ "\x77\xE8\x94\x2B\xB2\x25\xC6\xC7\x92\xCB\x9B\xC6\xC7\x92\xFC\xE4\x79\xA7\xA5\x9E\x90\xF0\x8D\x43\x71"
+ "\x06\x6E\x4E\xD4\x94\x23\x3D\xC7\x81\x04\xA0\x37\x45\x60\x78\xD4\x7E\x00\xE4\xB7\x31\x7B\xB9\x6F\x5F"
+ "\x8E\x9D\xFD\x1B\xF0\x02\xD9\x16\x5B\x53\xD1\x26\xE6\xC7\xF6\x99\x7C\xEF\x99\x0F\xD9\xD3\xAF\xAC\xD2"
+ "\x95\xC0\xF6\x94\xE0\x5C\xA6\x07\xBC\xA5\x2D\x59\xB1\x33\xDF\xAB\x4C\x5D\xB0\x2C\xAB\xBA\x12\x01\x29"
+ "\xEE\x07\x8D\x4D\xA9\x2E\x06\xFB\x3B\x29\xB9\x62\x4D\xB4\x5A\xE3\x63\x49\x9E\xFA\xB3\xD7\x52\x3F\xDE"
+ "\x69\xF0\xF5\xA1\x02\x28\x06\x68\xB1\xBB\x80\x1E\xC0\x50\x01\x86\xBF\xF3\xE6\x0E\xE0\x20\xB1\x8D\x7C"
+ "\x69\x60\x01\x3F\x80\x72\x25\x58\x13\x7F\x7A\x63\xB1\x2D\x89\x67\x5E\x6D\xD6\x2D\x94\x7C\xFE\x95\x2D"
+ "\x23\xD1\x20\xB6\x11\x14\x6D\x68\xA2\x72\x64\x27\x10\xAB\x7F\x57\x87\x6A\xE7\x93\x24\x15\x5F\xA2\xE4"
+ "\x88\xEB\x2A\xCD\xCF\xBE\x3C\xCF\x3D\xB7\xA7\x5A\x92\x78\xE8\x97\x8B\xEC\xE9\x2D\xF3\xDE\xA2\xC2\x1B"
+ "\x33\x7D\x2B\xC2\x88\x03\xCE\x2C\x18\xDD\xFB\x81\x0B\x75\x02\x43\x00\x9B\xBB\x05\x92\x9A\xF7\x00\xAF"
+ "\xFE\xC3\x58\x97\xC4\xE9\xB7\x17\x9B\x12\xB2\x99\x04\xFC\x6D\xA1\x59\x16\x89\x9A\x54\x01\xD4\xC8\x20"
+ "\x60\xAE\x10\xD0\x62\x24\xCC\x2A\xC5\xD0\xFB\xB7\xDE\x8F\xB6\x7C\xF1\xC7\x59\xE3\x63\x49\x0E\xFC\x30"
+ "\x4C\xB1\xB0\x2D\x69\x2A\xB5\x3C\x50\x83\x01\x04\xB1\x95\x24\x54\x63\xC4\xA3\x55\x4A\x15\x41\xA9\x22"
+ "\xFE\x6B\xE3\xCB\x15\xF1\x07\x35\xE3\x4A\x63\xA1\xD4\x3B\x41\x4A\x05\x30\xF4\xC6\x92\x5C\xF2\x22\x7C"
+ "\xE8\xF8\x37\xBE\xE7\xB7\x6F\x79\xEA\x4A\x71\x17\x2E\x39\x27\x86\xAE\xCA\xFF\xDD\xF0\x51\x27\xE2\x97"
+ "\x56\x18\x2C\x0F\x13\x81\x4B\xBE\x12\x25\x5B\xEC\x22\x5B\xEC\xE2\xC8\x4F\xBD\x1B\x62\xB4\x9E\x03\x00"
+ "\xBA\x1A\xE6\x82\xF4\x40\x7A\x19\x40\xE8\x61\x11\x9A\x42\xD1\x28\x39\x3E\x86\xB6\x12\x94\x2F\xFF\x58"
+ "\x34\x74\xBB\xE6\xAA\xED\x05\xCD\xE7\xBC\x96\x71\xA3\xA1\xE3\x38\x6E\x35\x6C\xD1\x95\x0C\x1A\x5E\xCD"
+ "\x9A\xF0\xCE\xA2\x69\x50\x5D\x40\x55\xB7\x5C\x97\x67\x75\x02\xEB\x19\x5F\xCE\xFC\xFA\xAA\x2E\x84\xBF"
+ "\x39\x1B\x13\x57\x05\x08\x67\xB8\xF3\x38\x73\x18\x8A\x87\xA9\xB7\x87\xEB\x81\xEB\xAD\x6D\xFC\x6B\x3F"
+ "\xF3\x48\x98\x2B\xA8\xEF\x35\x14\x0F\x9C\x39\x10\xFE\xB4\x65\x9E\xBE\x0C\x38\xF5\x78\x0B\x84\x7F\x0A"
+ "\x95\xCF\x2F\xE5\xE7\xF9\x64\x5F\x67\x5B\xCF\x13\x31\x07\x80\x93\x0F\xC7\x5B\xCA\xBF\xF9\x8B\x25\x12"
+ "\xB1\xD6\x7B\x33\x33\xA5\xDA\xF9\xFB\xC5\x97\xD0\x28\x01\x8E\x06\x60\xDB\x36\x47\x87\x95\xE9\xAC\x6A"
+ "\x7D\xC5\xAF\x14\xB7\xA6\x12\x71\x7A\xCC\x80\x98\xDE\x1E\x77\x5A\x1D\xAB\x0C\x3C\xF2\xD4\x7C\x5B\x7D"
+ "\xA7\x22\xC8\x5E\xBD\x52\xF3\x5E\xF9\xED\xCF\x81\x0F\x80\x7C\xE3\x8C\xE5\x11\xB8\x8F\xA3\x99\xE7\x32"
+ "\x97\x67\xF8\xC2\x9E\x4F\x60\x68\xD7\xFF\x49\x7E\xFF\xE4\x55\xBA\xA2\xED\xF2\x45\x21\x73\x79\xAE\xF6"
+ "\xE0\x66\x9F\x24\x4A\x1E\xC8\x03\xDE\x72\x7E\xDA\xB6\x2D\x8F\x5A\x7A\x36\x2B\x3F\x9D\x0B\x84\x7A\xC7"
+ "\x7C\xBE\xC2\x40\x6F\x84\x88\xA1\x61\x68\xCA\x2A\x9C\x7B\xBB\xC8\xC1\xDD\x5D\x00\xFC\xE8\x77\xD9\x96"
+ "\x3A\x86\xA6\xA0\xE2\xF3\xDA\x54\x8E\xB2\xEB\x41\x35\xF7\x84\x65\xFC\xFE\x0C\x90\x05\xF2\xE9\x74\x3A"
+ "\x68\x1A\xC9\x2C\xCB\x92\xBD\x4C\x4E\x66\xE5\xAE\x42\x35\x50\x0F\x5F\x99\xAB\xD2\x9F\x52\xE9\x30\xA3"
+ "\xE8\x9A\xB2\x0A\xE7\x2F\x96\x38\x7F\xB1\xD4\x52\xA6\x6B\x0A\xAE\x53\xE6\xCC\x85\x02\x25\x27\x34\xAE"
+ "\x3D\xF7\x3C\x30\x0B\xCC\x03\x55\xDB\xB6\x9B\x67\x42\xDB\xB6\xB1\x2C\x2B\xA8\x93\xF0\x84\x76\xF8\xEF"
+ "\x33\x2E\x9E\x50\xD9\xB6\x51\xC5\xD0\x55\x74\x95\x75\xA1\x48\x9F\x89\x7F\x96\x79\xFD\x9D\x3C\x9E\x2F"
+ "\x1A\x8D\x67\x81\x6B\x80\x53\xBF\x35\xB5\xAC\xD2\x23\x23\x23\x2A\xD0\x31\xE1\xDF\x7D\x3B\x91\x9E\xE3"
+ "\x28\xDA\x70\xD4\x50\xB9\x79\x73\x07\xBB\x7A\x05\xC9\x64\x37\x9A\xD6\xDC\xAA\x83\xC0\x63\x71\xB1\xC0"
+ "\x3B\x57\x55\xDE\x9B\x2D\x53\xF1\x04\x08\x7F\x1A\x37\xFB\xA4\x15\x7D\xF1\x42\x98\x74\xD7\x80\x72\xE3"
+ "\x58\xDE\xB6\x4D\x84\x24\x62\x40\x62\x42\xDE\xFB\x20\x5A\xEC\x2E\x14\x6D\xA8\x2E\x37\x23\x90\xEA\xAE"
+ "\xE5\xF0\x7C\xC1\xC7\xA9\x36\x6C\x16\xFE\x34\x7E\xF1\x25\x4B\x7B\xF6\x8F\x61\xB2\xCD\x03\xB9\x56\xB7"
+ "\xA3\x35\xAF\x66\x23\x23\x23\x4A\x38\xBD\x76\x02\x3D\x13\x95\x23\x3B\x31\xBA\xF7\xA3\x46\x06\x51\x8D"
+ "\x81\xB0\xA5\x86\xB5\xDA\xCB\x10\x54\x32\x54\x73\x76\x58\x64\x4A\x40\x21\x24\x50\x02\xFC\x56\x97\xD5"
+ "\xEB\xBA\x9C\x86\xD1\x30\xC2\x88\x98\x21\x62\xE1\x7F\xEA\x72\x31\x03\x0F\x70\x01\x27\x84\xBB\xDE\xE5"
+ "\xF4\xDF\xBB\x32\x46\xA9\x19\x56\x7E\x4C\x00\x00\x00\x00\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1736,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x06\x62\x4B\x47\x44\x00\xFF\x00\xFF\x00\xFF\xA0\xBD\xA7"
+ "\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0B\x0D\x00\x00\x0B\x0D\x01\xED\x07\xC0\x2C\x00\x00\x00"
+ "\x07\x74\x49\x4D\x45\x07\xD3\x09\x09\x13\x0E\x0C\xA1\x33\x95\x56\x00\x00\x06\x55\x49\x44\x41\x54\x78"
+ "\xDA\xC5\x97\xDB\x6F\x1C\xD5\x1D\xC7\x3F\x73\x66\xE7\xB2\xBB\xB6\x77\xD7\x71\x62\xC7\xC6\x89\x13\x62"
+ "\x14\x27\x4D\xB0\x3D\x2D\x52\x9B\x84\x92\x16\x8A\x8A\x90\xDA\xA2\xBE\x20\xD1\x0A\x68\xAD\x36\x0F\x7D"
+ "\xA8\x84\xF2\x58\x89\xFE\x03\xBC\x82\x96\x86\x06\xF1\xD2\x3E\xF4\xC2\x03\x42\x05\x14\x95\xA8\x84\x4A"
+ "\x78\x8D\x6D\x51\x10\xCA\xA6\x36\xA9\xB3\x49\x7C\xD9\x5D\xDB\xBB\x33\xBB\x33\x73\x4E\x1F\x76\xBD\x17"
+ "\xAF\x43\x48\x52\xA9\x23\x7D\xA5\x33\xE7\xFC\xCE\xF9\x5D\xCE\xEF\xFC\x2E\xF0\x7F\xFE\xB4\x3B\x21\x9E"
+ "\x3C\x33\x7B\x00\xD4\x69\x90\xE3\xC0\x38\x4A\xB6\x9C\xA1\xE6\x50\x72\x0E\xE9\x5F\x70\x38\x9F\x05\x64"
+ "\x3A\x9D\x56\xFF\x13\x01\x26\xCF\xCC\x3E\x07\x3C\x0B\x3C\x0C\x0A\x90\x20\x4C\x10\x76\x8D\x40\x7A\x10"
+ "\x7A\xAD\x5B\x3E\x40\x06\x6F\x38\xEA\x77\xE7\x00\x3F\x9D\x4E\xCB\xBB\x12\x60\xF2\xCC\xEC\x04\x9A\x78"
+ "\x09\x25\xBF\x8D\xD0\xC1\x4C\x82\xD9\x8B\x69\x45\x19\xEE\x59\xE7\x1B\xF7\xE5\x01\xD8\xF4\xE0\xBD\x85"
+ "\xFD\xB8\x5E\x15\x2A\xCB\xE0\xAD\x82\xF2\x01\xE5\x12\x7A\x2F\x38\xBC\xFE\x7B\xC0\xDB\x49\x10\xED\x36"
+ "\x5A\x9F\x03\x20\x3A\x80\xD9\xB5\x87\x9F\x3D\xB4\xC4\xB1\x83\x5D\x3C\x70\x5F\x0C\xDB\x14\x1D\x7B\x96"
+ "\x56\x2A\x7C\xF8\x69\x91\x8B\x9F\xC1\x47\x0B\x06\x94\x16\x6B\x0B\x61\xF5\xCF\x0E\xAF\xFD\x1C\x58\x4F"
+ "\xA7\xD3\xC1\x6D\x05\x68\x30\xD7\x2D\xE8\x79\x80\x67\x26\xFE\xC3\x0F\x4E\xF4\x91\xEA\x8A\xB4\xD1\xCD"
+ "\x64\xCB\x00\x4C\xDC\x1F\x43\x6D\x3B\xEA\xE2\x7C\x81\x57\x2E\x18\xDC\xB8\x7E\x1D\x82\x4D\x90\xFE\x9C"
+ "\xA3\xCE\x7D\x0F\x58\x6E\xB5\x84\x7E\x4B\xE6\x91\x18\xC3\xC3\x7B\x79\xE1\xF1\x4D\x1E\xFB\x7A\x2F\x46"
+ "\x44\x10\x48\x1A\x98\x5F\x70\x79\xF0\x60\x8C\x3D\x49\x83\xD9\x2B\x65\x52\xDD\x11\x42\xA9\x1A\x18\xEA"
+ "\xB3\x38\x75\x18\xF2\x9B\x01\x0B\xCB\x1A\xA8\xB0\x3F\xA7\x8E\x1E\x19\x64\xF6\xAF\x8E\xE3\x04\x99\x4C"
+ "\x46\x75\x08\x30\x79\xE6\xE3\x09\xD0\xDE\x42\x37\x18\x1A\x1A\xE2\xEC\x93\x8A\x91\x7E\x1B\x3F\x50\x6D"
+ "\xB8\x7C\xAD\xC2\x91\x7D\x36\x7B\x92\x26\x86\xAE\x11\xB5\x04\x9F\x5D\xF5\x88\x5B\xA2\x8D\x2E\xA2\x6B"
+ "\x1C\x1B\x89\x72\x73\x5D\x72\x75\x15\x40\x8D\xE6\xFC\x03\x97\x06\xC5\xBF\xAE\xD6\x85\x20\xB2\xCD\x00"
+ "\xAF\x41\x08\x3D\xC7\x78\xFE\xD4\x2A\x3D\xB1\x18\xE5\x4A\xFB\x4B\x5A\x2E\xFA\x8C\x0E\xD9\xEC\x4E\x98"
+ "\x00\x98\x86\xA0\xB7\xDB\x60\xA4\x5F\xB1\x70\xA3\xC2\xEE\x84\xD1\x71\xA5\x3F\x3D\xDD\xC3\x8D\x0D\x83"
+ "\xCB\x57\x36\xC1\x4C\xBE\x88\x64\x06\xF0\x01\x5F\x6F\x6A\x9F\x79\x0E\xD4\x2F\x88\x0E\xF2\x93\x87\xF2"
+ "\x8C\xED\xEF\xC2\x0F\x55\x1B\x0A\xA5\x90\x91\x7E\x8B\xC1\x5D\x26\x46\xA4\xE9\x84\x46\x44\xC3\x34\x34"
+ "\x82\x50\x71\xB3\xE0\xA3\x69\xB4\xED\x53\xC0\x48\x9F\xE4\xFD\x6C\x12\xFC\xF5\xBD\x39\x39\x56\x18\xD4"
+ "\xE6\x66\x1C\xC7\xA9\x36\x4F\x51\xF2\x59\xD0\xE9\xEF\xEB\xE6\xF0\xFE\x38\x25\x4F\x76\x60\xA0\xD7\x60"
+ "\xA8\xCF\xC4\x8C\x74\xBE\x80\xB8\xAD\x33\xD2\x6F\xD1\x15\x15\x3B\xEE\xED\x89\x1B\xFC\x68\xBC\x08\x9A"
+ "\x01\xBA\xFD\x14\x90\x04\x0C\x01\x30\xF9\xCB\x8F\x0E\x00\x0F\x63\xEF\xE2\x3B\x87\x56\x09\x42\x28\x57"
+ "\xC2\x36\x24\xE2\x82\xD1\x41\x1B\xCB\x10\xB7\x8C\x1B\x71\x5B\xE7\xF8\x81\x38\x52\xC9\xB6\xBD\xC5\x52"
+ "\xC0\x95\x5C\x19\x85\x0E\xF6\x2E\xD0\xF4\xF1\xE9\xCA\x13\x63\x80\xBD\xE5\x03\xA7\x6B\x17\xDA\x4B\x5F"
+ "\xCF\x3A\x25\xB7\x19\x2F\x34\x0D\x86\x77\x9B\x38\xA3\xDD\x5F\x29\x5C\xDB\xA6\xE0\xD1\x89\x14\x6F\x5E"
+ "\x5A\xE3\xDF\xB9\x32\x5F\xAC\x69\xFC\x73\x69\xA8\x49\x60\xBA\xE0\x5E\x07\x23\x71\x02\x98\xD9\x52\x67"
+ "\x1C\x60\x20\x21\x51\xB4\x6B\xBF\x27\x19\xE1\x9B\x47\x7A\xEE\x38\xC9\x3C\x3A\x99\xC0\x34\x44\x3B\x73"
+ "\xC0\xB4\xA2\xB5\x81\x30\x0F\x03\xD1\xA6\x00\xBA\x4D\x2A\x5A\x65\xD3\x95\x0D\xF4\xA7\x4C\x1E\x79\x30"
+ "\x79\x57\x59\x2E\x66\xE9\xFC\xF0\x64\x3F\xC7\xF7\xD5\xAC\xD8\x08\x3C\x82\x9A\x1F\x08\xE3\x10\x60\x37"
+ "\x2F\x54\xD8\xF4\x58\x55\x4A\x15\x49\xA9\x22\x39\xB8\xD7\xE6\xBB\xE3\x89\x7B\x4A\xB5\x7B\x53\x3A\xBF"
+ "\xFE\x3E\x8C\x6F\x13\x82\x48\x1C\x94\xD2\x1A\x4E\xB8\x15\x92\x4B\xBE\xC9\x86\x0B\x1B\x2E\x8C\xED\x8B"
+ "\x61\x99\xE2\x9E\xF3\xFD\xE8\x00\x4C\x8C\xDC\x72\x59\x34\x03\x91\xF4\xC8\xBB\x36\x11\x51\x0B\x3C\xAF"
+ "\xFF\xDD\x23\x66\x55\x00\x18\xEE\xD3\x79\xFA\x54\xFC\x8E\x18\xFF\xEA\x7C\x73\x7C\xBD\xD0\x74\x68\x00"
+ "\x82\x52\xD3\x18\x8D\x62\x22\xF4\x4E\x16\x2A\x16\x81\xAA\x4D\xE5\x36\x9B\x07\x1C\x73\x35\x9E\xDE\x81"
+ "\xC9\xA9\xDF\xB6\xFF\x5F\xFC\x4D\x73\xFC\xF1\x62\x27\x7D\x44\x80\x1F\x52\x4B\xD5\xCA\xCF\x02\x32\x52"
+ "\x0F\x42\x73\x68\x3A\x25\x37\xC0\xD0\x23\x1D\x1B\xFD\xF0\xDE\xAE\xC1\x68\xC9\x38\xAE\x57\xAD\xA7\xE8"
+ "\x4A\x16\x1D\xBF\x76\xC9\xD2\xBF\x00\x40\x75\x15\x21\x44\x07\x34\x71\x6F\xBE\xA0\x8B\x26\xA8\xAE\xD6"
+ "\x26\xAB\xF9\x0C\xE0\x09\x80\x7A\x0D\xF7\x01\xEE\x32\x86\xE6\x13\x8D\xB4\xC3\xD2\x83\x3B\x66\x9A\x8A"
+ "\xFA\x0D\x6C\x9D\x63\x68\x3E\xB8\xCB\x20\x83\x79\x27\xFA\xB7\x45\xC0\xDD\xB2\xB7\x44\x06\x6F\x20\xF8"
+ "\xD6\x7A\x61\x85\xFB\x87\xDA\x1D\xAE\xDB\xD4\x9B\xEE\xD2\xF2\x1D\x4C\xAD\x6F\x9B\x69\x06\xAC\x94\xED"
+ "\x76\xD0\x67\x97\x4A\xB5\xFB\x0F\x36\xDF\x41\xA7\x04\xB8\x02\x20\x9D\x4E\xAB\x5A\x01\xA9\x3E\x74\x8B"
+ "\xD7\x90\x81\x4F\xC2\xAA\x36\x10\x37\x76\xB6\x40\x2B\x4D\xC2\xAA\x7E\xE9\x9A\x0C\x7C\xDC\xE2\xB5\x9A"
+ "\xF6\xFA\x1F\xDE\x04\x8A\x80\xD7\xAA\x96\x4F\xE8\x9D\x45\x8F\xBE\x9F\x5D\x5C\xE2\xE4\xF1\xDD\x18\x7A"
+ "\xED\x49\x16\x37\x7C\x5E\x7D\xDB\x6F\x10\xE6\xD6\x7C\x3C\x5F\xD1\x6D\xB5\x0B\xF4\xEA\xDB\x2B\x4D\xAB"
+ "\xB5\x08\xE4\x87\x1A\xD9\xC5\xE5\xDA\x8F\x97\x7B\x19\x8B\x02\x50\x68\xAB\x07\x32\x99\x8C\x7A\xD2\x89"
+ "\xE4\x72\xEA\x6B\xF9\x50\x8A\xC7\x57\x0A\x15\x0E\x0D\x9A\x98\x86\x8E\xA6\xC1\xA6\x27\x1B\xD0\x34\x30"
+ "\x74\xAD\x03\xAD\x34\x5B\x73\x82\x80\x7F\xCC\xE5\x29\x7B\x3E\x54\xF3\x2F\x39\xC6\x5F\xDE\x03\x72\x40"
+ "\x21\x9D\x4E\x87\xDB\xDD\x3B\x70\x38\xFF\x0A\xA1\x7B\x76\xA3\x5C\xE5\xDD\xE9\x3C\x7E\xC5\xC5\x32\xC4"
+ "\x5D\xC1\xAF\xB8\xBC\x3B\x9D\x67\xA3\x5C\xAD\x31\xD7\xFF\xF8\x27\xE0\x06\x90\x07\x82\x8E\x9A\x30\x93"
+ "\xC9\xE0\x38\x4E\x38\xC8\xEC\x6C\x4E\x1D\x2D\xFA\x52\x7F\xEC\xF3\x25\x0F\x5F\x0A\x86\x77\x09\x8C\x88"
+ "\x20\x22\xB8\x2D\x34\x15\x30\x7D\xB9\xCC\xA5\x4F\x0A\xF8\x81\x6C\x65\x9E\x03\x6E\x02\xEE\x56\xD7\xB4"
+ "\x63\x59\x3E\x35\x35\x25\x80\xD8\x74\xF0\xE3\x47\x30\x93\x2F\xA2\xE9\x93\x96\x21\xD8\x37\x10\xE3\xE8"
+ "\xA0\xA4\xB7\x37\x81\xAE\xB7\xD7\x7E\x61\xE8\xB3\xB6\x56\xE4\x93\x6B\x82\x2F\xAE\x97\xA9\xF8\x12\x64"
+ "\x30\x8F\x97\x7B\xD9\xB1\xDE\x9A\xA9\x6B\x7E\x13\x28\xB7\x96\xE5\xB7\x6C\x4C\xEA\x42\xD8\x40\x6A\x5A"
+ "\x3D\xF3\x3C\xBA\xFD\x14\x9A\x3E\xBE\xB5\x1E\x35\xA1\x2F\x51\xF3\xE1\x95\x62\x80\xDB\xFA\x08\x64\x30"
+ "\x4F\xB0\xF9\x4E\xDD\xDB\x0B\xC0\x4A\xDD\xEC\x1D\xDD\xD1\x97\xB6\x66\x53\x53\x53\x5A\x3D\x00\xC4\x81"
+ "\xE4\x74\xE5\x89\x31\x8C\xC4\x09\x84\x79\x18\x61\x1C\xAA\xA7\xD4\x7A\x3A\xF1\xB3\x84\x95\x2C\xD5\x7C"
+ "\xA6\x1E\x64\x4A\xF5\xA7\x56\xA8\x8F\x83\x9D\x9A\xD5\xAF\xD4\x9C\xD6\xAD\x61\xD4\x2D\x12\xAD\xC3\xAE"
+ "\xCF\x89\x46\x30\xAB\x95\xDA\x1E\xE0\xD6\xE1\xDD\xAE\x39\xFD\x2F\xD0\x42\x12\x9F\x36\x7A\xBA\x3A\x00"
+ "\x00\x00\x00\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 952,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x04\x67\x41\x4D\x41\x00\x00\xAF\xC8\x37\x05\x8A\xE9\x00"
+ "\x00\x00\x19\x74\x45\x58\x74\x53\x6F\x66\x74\x77\x61\x72\x65\x00\x41\x64\x6F\x62\x65\x20\x49\x6D\x61"
+ "\x67\x65\x52\x65\x61\x64\x79\x71\xC9\x65\x3C\x00\x00\x03\x4A\x49\x44\x41\x54\x78\xDA\x62\xFC\xFF\xFF"
+ "\x3F\xC3\x40\x02\x80\x00\x62\x04\x11\x16\x93\x1E\x1A\xFE\xFF\xF7\x57\xF0\xEF\xCF\x1F\x4C\xFF\xFE\xFE"
+ "\x65\xF8\xF7\xF7\x1F\xC3\xBF\x3F\x20\x0C\x65\x23\xF3\x41\xF4\x3F\x08\xFD\x17\x2C\xFF\x9F\xE1\x3F\x48"
+ "\xEC\xEF\x5F\x14\x3D\x7F\xC1\xFC\xFF\x60\x71\xB0\x3C\x5C\xCD\xEF\x0F\xFF\xCE\xA7\x9F\x07\x5A\xFB\x0F"
+ "\x88\xFF\x03\x04\x10\xA3\xC5\xE4\x47\x89\x8C\x4C\xCC\xF3\x44\xF9\xD9\x80\x06\x02\x35\xFE\xFE\x0F\xA1"
+ "\xA1\xF8\xCF\x6F\x18\x1B\x28\x0E\x64\xFF\x01\xAB\x81\x8A\x81\xF9\xFF\xE1\x6C\x14\xF5\x40\x73\xFE\xC0"
+ "\x2D\xFE\xC7\xF0\xFF\x1F\x90\xFE\xFD\x87\xE1\xDF\xCF\x57\x0C\xFF\x7F\xBE\xCA\x67\xB8\x52\x38\x07\xE8"
+ "\x80\x1F\x00\x01\xC4\x02\xB2\xDC\x54\x4D\x80\x41\x46\x98\x8B\xE1\xF7\x6F\x06\x30\xFE\xF5\x0B\x15\xFF"
+ "\x44\x66\xFF\x44\xA3\x41\xE2\x3F\x21\x7C\x38\x1B\x48\xFF\x06\x86\x2D\xD0\x0D\x0C\xFF\x40\x61\xCC\x0A"
+ "\x0D\x6F\xA0\x23\x18\xBF\x9F\x60\xF8\xCF\xF6\x7F\x22\x90\xB7\x09\x88\x5F\x00\x04\x10\x13\x48\x1C\x6E"
+ "\xF9\x1F\x88\x03\xFE\x00\x69\x60\x48\xC2\xF1\x5F\x24\x0C\x34\x83\x01\xE8\x21\x30\x0D\xC6\x50\xB1\x7F"
+ "\xFF\x51\xE9\xFF\x20\x8C\x9E\xBC\x98\x98\x18\x18\xFF\x8B\xC0\x78\x20\x06\x07\x40\x00\xB1\x80\x58\x20"
+ "\x9F\x80\x2C\x05\x39\x00\x99\xFE\xFB\x07\xD5\x72\xB8\x23\xFE\x42\x1C\x81\xE2\xA0\xBF\x98\x0E\x22\x90"
+ "\xBE\xD9\x80\x98\x19\x20\x80\xC0\x0E\xB0\x96\x44\xF2\x01\xCC\xD0\xBF\x08\x83\xFF\xE2\xC1\xE8\x21\xF4"
+ "\x07\xE6\x78\x60\xE2\x04\xF1\x61\xB9\x0C\x42\xFD\x67\xF8\xF9\x86\x8B\xA1\x6B\x19\xC2\x15\x00\x01\xC4"
+ "\x02\x14\x63\x70\x90\xA3\x5E\xB6\x02\x59\xF8\x1F\xEC\x99\xFF\x50\xF6\x7F\x28\x1B\x22\xF7\xE9\x23\x27"
+ "\x8A\x03\x00\x02\x88\x89\x9A\xE5\x00\x36\xCB\xFF\x43\xA3\x02\xD9\x31\xC8\x00\x20\x80\xA8\xE6\x00\x5C"
+ "\x96\xA3\xF2\x41\x0E\xF8\x87\xA2\x0F\x20\x80\x58\xFE\x23\xB9\xA8\xA9\xA9\x09\xA7\x05\x75\x75\x75\x44"
+ "\xA9\xC3\x05\x8A\x8A\xCA\xA0\x39\x07\xD5\x01\x00\x01\xC4\x82\x9C\x54\x91\x2D\xC1\x07\x90\xD5\xE1\x0E"
+ "\xF6\xFF\x68\xE9\x80\x01\x6B\x14\x00\x04\x10\x45\x51\x40\xAA\xE5\xD8\xA2\x00\x20\x80\x98\xFE\xFF\xFB"
+ "\x4F\x91\xE5\xC8\xF1\x8B\x69\x39\x03\x86\x1A\x50\xF6\x44\x06\x00\x01\xC4\x82\x1C\x02\xB4\x4C\x03\xB9"
+ "\xB9\xC5\xD0\xD0\x42\x0D\x01\x80\x00\x42\x49\x84\xC4\xA4\x01\x90\x21\x35\x35\xB5\x58\x7C\x4A\x1C\x1F"
+ "\xDD\x01\x00\x01\x44\x52\x1A\xC0\x0C\x72\xD2\x2C\xC7\x96\x08\x01\x02\x88\x89\x81\xC8\x34\x80\x6E\x39"
+ "\x72\xE9\x46\x4A\x48\xA0\x87\x00\x40\x00\x11\x9D\x06\x60\xC1\x0E\xC2\x6D\x6D\xAD\x24\xA7\x81\x8C\x8C"
+ "\x42\x88\x63\xFE\xA2\x3A\x00\x20\x80\x58\xFE\xFF\x63\xC0\x9B\x06\x30\x7D\xCE\xC0\x50\x5E\x5E\x85\x35"
+ "\x24\x88\x0D\x19\x64\x00\x10\x40\x78\xD3\x00\x36\xCB\x31\xF9\x0C\x38\x1D\x83\x35\x1A\xD0\xEC\x00\x08"
+ "\x20\x02\x0E\x20\x64\xF9\x7F\x92\x43\x02\x1D\x00\x04\x10\xD1\x75\x01\x72\xB0\x77\x77\x77\x90\x9C\x06"
+ "\x92\x93\xF3\x20\xC1\x8F\xE6\x08\x80\x00\xC2\x5A\x17\xE0\xAB\xD1\x40\x3E\x2F\x2A\x2A\x27\x2B\x24\xB0"
+ "\x45\x01\x40\x00\x61\x14\xC5\xF8\xAB\x53\xF2\xA3\x01\x5B\x19\x00\x02\x00\x01\x84\x92\x06\x08\x59\x8E"
+ "\xDF\x31\xB8\x13\x20\xB2\x3C\x7A\x42\x00\x08\x20\x70\x1A\xF8\xFC\xF9\x1B\xB8\x80\x80\x15\x95\xFF\xA1"
+ "\x34\x84\xFF\x1F\x45\x0E\xAB\x9A\xFF\x48\xE2\x50\x4B\xE0\xD6\x20\x47\x3B\x50\xFC\x37\xA8\xC1\x88\x04"
+ "\x00\x02\x08\x5C\x10\x99\x34\xDD\x82\x77\x20\x40\x3D\x9B\xBF\xE8\x3D\x1D\xE4\x1E\x0F\x72\x8F\x09\x4D"
+ "\x0E\xBD\x90\x21\x06\x00\x04\x10\xA8\xDB\xC0\x07\xC4\xB2\x40\xCC\x4F\xE7\x6E\xE1\x47\x20\x7E\x0C\x10"
+ "\x40\xB0\x7E\x0B\x27\x52\xFF\x85\x5E\x00\xD8\x05\x62\xF8\x0E\x10\x40\x8C\x03\xDD\x3B\x06\x08\x20\x26"
+ "\x86\x01\x06\x00\x01\x06\x00\x37\xA7\x3B\x50\x1D\xE2\x87\x14\x00\x00\x00\x00\x49\x45\x4E\x44\xAE\x42"
+ "\x60\x82"
+},
+
+{
+ 1749,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x06\x62\x4B\x47\x44\x00\xFF\x00\xFF\x00\xFF\xA0\xBD\xA7"
+ "\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0B\x13\x00\x00\x0B\x13\x01\x00\x9A\x9C\x18\x00\x00\x00"
+ "\x07\x74\x49\x4D\x45\x07\xD4\x07\x18\x0F\x35\x0D\xB5\x2A\xAE\xCF\x00\x00\x06\x62\x49\x44\x41\x54\x78"
+ "\xDA\xC5\x96\x5D\x6C\x54\xC7\x15\xC7\x7F\x33\x73\x3F\xF6\xDE\xDD\x35\x6B\xEC\x80\xA1\x44\x36\x90\x18"
+ "\x9A\x36\x68\x4B\x93\x2A\xA0\x56\x71\xAA\x50\xA1\x24\x04\xA7\x6A\x78\xA8\x44\x20\x12\x51\x9B\xBC\x04"
+ "\xD4\xAA\x7D\x08\x2A\x28\xCA\x03\x3C\x54\xA9\x91\x0A\xAA\x62\x09\x9B\x46\x45\x48\x21\x60\xDA\x26\x21"
+ "\xA9\x6A\x4B\x4D\x52\x15\x37\x60\xA9\x0D\xE0\x84\x80\xF9\x30\x8E\xC1\x1F\x8B\x31\xFB\x71\xF7\xDE\x99"
+ "\x3E\xAC\xBD\x98\x04\xD4\x35\x25\xEA\x91\x46\xF7\xEA\x6A\xEE\x9C\xDF\xF9\x9F\x33\x67\x46\x70\x0B\x3B"
+ "\x7C\xF8\x83\xF5\x4A\x99\xD5\x4A\x99\x26\xCF\x73\x53\xAE\xEB\x12\x86\x21\xE3\xE3\x59\xA2\x48\x74\x45"
+ "\x91\xE8\x30\x46\xB4\xAD\x5C\xB9\x3C\xC3\xFF\x60\xE2\x8B\x1F\x0E\x1D\xEA\x6A\x72\x1C\xBD\x3B\x32\x51"
+ "\x43\x88\xC4\xF5\xE3\x18\x63\x90\x52\x22\xA5\x44\x6B\x8D\x25\x20\x2A\x16\xD0\x41\x98\x29\x16\x55\xCB"
+ "\xAA\x55\x0F\x6F\xBD\x23\x00\xFB\xF7\xBF\xB7\xD5\x76\xA2\x2D\x45\xA1\xF0\x13\x09\x12\x09\xBF\xEC\x58"
+ "\x0A\x90\x52\x22\xA4\x40\x20\x08\x8A\x21\xB9\x6C\x8E\xFC\xF8\x18\xF9\xF1\xA8\x2B\x0C\xC5\x53\x6B\xD6"
+ "\x3C\x9A\xB9\x6D\x80\xBD\x7B\xDF\xDA\x6A\xBB\xE1\x16\x11\x4B\x52\x5B\x9B\xC2\xB2\x2C\x6C\x4B\xA1\x94"
+ "\x42\x08\x81\x10\x82\x7C\x21\xC0\xB1\x2D\xA4\x92\x58\x4A\x62\x8C\x21\x9F\x0F\x18\x19\xFC\x9C\xD1\xA1"
+ "\x7C\x4F\x18\xF2\xC8\xDA\xB5\x8F\x4D\x0B\x42\x02\xEC\xDE\xDD\xD1\x64\xC8\x6E\xC1\x4D\x50\x5B\x9B\x22"
+ "\xE6\x3A\xF8\x7E\xAC\x3C\x62\x31\x87\x58\xCC\x21\x99\xF0\x28\x04\x45\x82\x42\x40\x10\x84\x48\x29\x49"
+ "\x26\xE3\xCC\xBE\xFB\x6E\xFC\x19\x76\x3A\x0C\x8B\x5B\xA6\xAB\x80\x04\x30\x26\xB7\x5B\x7A\xD7\x9D\x7B"
+ "\x9E\x8B\xEF\xC5\x88\xC7\x3D\xE2\xBE\x47\x22\xEE\x93\xCB\x15\xF0\xFD\x18\xA9\x19\x09\x6C\xC7\x46\x59"
+ "\x0A\xAD\x35\x00\xC9\xB8\x47\xFD\xFC\x7A\x84\x15\x6E\xDC\xB5\x6B\x7F\xD3\xB4\x00\x76\xEC\xD8\xBB\xDE"
+ "\xC8\xA8\x21\x55\x3D\x21\xBB\x63\xE3\x38\xA5\x88\x3D\xD7\xC5\x77\x1D\x7C\xD7\xC1\xB1\x2D\x0A\x85\x22"
+ "\x89\xB8\x8F\xEB\xD8\xB8\x13\xF3\xA4\x94\x48\x55\x52\x62\xE1\x3D\xF3\x08\xC3\xE0\xC5\x69\x01\x68\x9D"
+ "\x5B\xED\xF8\x09\x3C\xCF\x45\x29\x85\x6D\x95\x86\x63\x59\x38\x96\x45\xCC\x71\x88\x39\x0E\xB6\x63\xA3"
+ "\xB5\x2E\x3B\x77\xDD\xEB\x43\x4A\x89\xED\xD8\xCC\x9A\x53\x47\x14\xE5\x9A\xB7\x6D\x6B\x4B\x55\x0C\x10"
+ "\x86\xF9\xA6\x99\xB5\xB5\x48\x29\x51\xB2\x54\x6C\x93\x95\xAF\x94\x2A\x47\xA9\xB5\xC6\xB6\x6D\x04\x02"
+ "\xDB\xB1\xB1\x2D\x1B\xC7\xB2\xB0\x95\xC2\x56\x0A\x25\x04\xBE\xEF\x93\xAA\xAD\x22\x0C\xA3\x74\xC5\x00"
+ "\xB1\x98\x95\x52\x4A\xDD\xB0\xCF\x0D\xA6\xF4\x34\x86\x7C\x21\x60\x60\x68\x18\xDB\x52\x25\xD9\xED\x92"
+ "\x53\x4B\x95\x00\xA7\x0E\x4B\x49\x66\xCF\xAA\xA6\x50\x08\x2A\x06\xB0\x5C\xD7\xC6\xB2\x2C\x84\x10\x20"
+ "\x20\xD2\x86\xC1\x4B\xA3\xF8\x9E\x83\x6D\xD9\x18\x0C\xB6\x6D\xE3\x38\x16\x55\x71\x9F\x28\x8A\xAE\xF7"
+ "\x06\x28\xFD\x07\x18\x63\xD0\x80\xD6\x9A\x20\x08\x2B\x4F\xC1\xC8\xC8\x08\x51\x14\x95\xF6\x3A\x02\x4B"
+ "\x49\x92\x09\x8F\x30\xD4\x84\x51\x58\x8A\xCC\x92\x24\x62\x31\x94\x52\x84\x5A\x63\x49\x89\x25\x6F\xA2"
+ "\x80\x94\xE8\x28\xA4\x50\x28\x56\xDC\x0B\xAC\xE1\xE1\x51\x82\x20\x40\x4E\xB4\xA4\x2B\x63\xD7\x98\x51"
+ "\x15\x67\xE6\xCC\x2A\xA4\x90\x65\xC9\x35\x90\xCD\xE7\xCB\x8E\xA5\x94\xA5\x7A\x99\x58\x68\x32\xFA\xB3"
+ "\x7D\xE7\x09\x82\xA0\xA7\x62\x05\x72\xB9\xE8\xE0\xC8\xE5\x4B\xE5\x6E\x67\x5B\x8A\x6C\x36\x4F\xE6\xCA"
+ "\x38\xD7\xB2\x39\xB2\xB9\x3C\xD9\x20\x20\x0C\xC3\xEB\xD2\x4B\x89\x12\xA2\xA4\x84\x65\x95\xA3\x0F\x0A"
+ "\x01\xBD\x27\xCF\x50\x2C\x46\xD3\x01\x30\x1D\x9F\x9E\x38\x41\x50\x0C\x41\x80\xE3\x3A\x65\x18\x21\x44"
+ "\xB9\xF7\x4F\xE6\x7A\xF2\xFB\xE4\x2E\x99\xAA\xC8\xF1\x8F\x8F\x93\xCD\xEA\x83\xAF\xBD\xF6\x52\xC5\x29"
+ "\x90\xAD\xAD\xDB\xDA\x2E\x7D\x7E\xB1\xAF\xEF\x74\x1F\x46\x9B\x72\x75\x4B\x71\x8B\xB6\x39\x79\x88\x4C"
+ "\x05\x11\x82\x7C\x2E\xCF\xDB\x7F\x7E\x9B\x6C\x96\x96\x69\xB7\xE2\x7C\xDE\xDE\xD4\xFD\xC1\xDF\xC8\x64"
+ "\xC6\x00\xF0\x3C\xB7\x1C\xF1\x54\xD3\x53\xDE\x8D\x31\x18\x63\x08\xB5\x26\x32\x86\x37\xDE\x78\x13\x29"
+ "\x13\x34\x36\x2E\x58\x3D\x6D\x80\x3D\x7B\x5A\x0E\x8E\x5F\xCD\xFE\xE6\xF0\xA1\x0E\x46\x47\xAF\x60\x8C"
+ "\xC1\x71\x4A\xA9\x30\xDA\x60\x30\x65\x87\xC6\x94\x7A\x84\xD6\x9A\x28\x8A\x88\xA2\x88\x3D\xED\xAF\x73"
+ "\xFA\xB3\xB3\x2C\x59\xB2\x94\xAB\x57\xB3\xA9\xDB\xBE\x0F\x3C\xF7\xDC\xF3\xAF\xC6\x13\xC9\x8D\x0F\xAF"
+ "\x58\xC1\xBD\x8D\x0B\xF1\x62\x6E\x49\x62\xAB\xD4\xE9\x26\x73\x3E\x99\xFF\xD1\x91\x51\x3A\x0E\x74\x30"
+ "\x32\x3C\xC2\xF2\xE5\x8F\x70\xF6\xEC\x65\x92\x49\x3F\x33\x6B\x56\x75\x8B\x77\x74\x63\xBD\x08\x32\x99"
+ "\x65\x2F\x1D\xDF\x34\xAD\x1B\xD1\x86\x0D\x2F\x34\x0B\x61\x5E\x9D\x3B\x6F\x5E\xC3\xD2\x07\x1F\x60\xF1"
+ "\x7D\x8B\x71\x9C\xD2\x61\x34\xB9\x03\x06\x2E\xF4\x73\xF4\x9F\x47\x39\x76\xF4\x18\x96\xE5\xB4\x3D\xF4"
+ "\x50\xD3\xFA\x53\xA7\x06\xFA\x96\x2D\xBB\xBF\x21\x97\x2B\x90\x38\xFF\x3A\xA9\xF1\xBF\x62\x8A\x59\x46"
+ "\x72\xC9\xB6\xEF\xBF\x7C\xE2\xD9\x8A\x01\xA6\xA8\xB1\x1E\x58\x07\x34\xD5\xD4\xD4\x10\x4F\x26\x89\x8A"
+ "\x45\x06\x07\x2F\x13\x86\x41\x0F\xD0\x15\x04\x76\x4B\x7B\xFB\x8E\xBE\xCD\x9B\x77\xA5\x5F\x79\xE5\xF9"
+ "\x9E\xED\xDB\xDB\x0F\xDC\xEF\xBE\xDF\x3C\x27\x31\xC8\x82\xFA\x18\x41\xFF\x11\xCE\x9C\x2B\x72\xF9\x5A"
+ "\x55\xDB\xE3\xDB\x6F\x0E\x21\x2A\xC9\xD3\x86\x0D\x2F\x34\x08\x61\x1A\x8C\x11\xB4\xB6\xEE\xEC\xBA\xD5"
+ "\xBC\x3F\xBC\xB8\xF4\x40\x63\xFA\xDE\xE6\xF4\x0F\x7F\x4A\xF1\xE2\x47\x04\xFD\x47\x08\xFA\xBB\xE9\xFD"
+ "\xAC\xC8\xC0\x95\x64\xDB\xD3\x2D\x5F\x86\xB0\x2A\x01\x68\x6D\xDD\xD9\x07\xF4\xFD\xB7\x79\x51\x90\x6D"
+ "\x48\x79\x43\xA8\xE0\x1C\xCC\xFD\xF6\x44\x7C\x82\x45\x74\x13\x9C\x1C\x5B\xDF\xFE\x93\xC5\xAC\xFB\xDD"
+ "\xC9\x1B\x20\x14\x77\xD0\x9E\x48\xD7\xEE\x3B\x7D\xEA\xEA\xCA\x84\x39\x53\x77\x57\x7D\x3D\xA2\xFA\xEB"
+ "\x08\x51\x72\x71\x97\x3B\xC8\x58\x26\x9B\xFE\x6E\xE3\xD7\x1A\xFE\xD4\x33\xD4\xF1\x95\x00\x1C\x3A\x3A"
+ "\x94\xFF\xC1\x37\x6A\xF6\x7D\xFA\xC9\xD8\xCA\x24\xA7\xEB\x66\xCF\xAF\x47\x54\xDF\x87\x90\x12\x04\xD4"
+ "\xF9\x97\xC8\x8C\x64\xD3\x0F\xCE\x9F\xDB\x70\xF8\xDF\xC3\x1D\x37\xD4\x80\xF7\x21\xE6\xA6\xAB\xFE\x1D"
+ "\x72\x3F\xAB\xAC\x56\x26\x6D\xFB\xD3\x8B\x52\x91\xA6\xF3\xF1\x27\xE6\xA4\x97\x3C\xF6\x0C\x3A\xB6\x80"
+ "\x60\xE0\x18\x41\xFF\x11\x8A\xFD\xDD\x74\xFE\x23\x47\xEF\xC5\x44\xDB\xE6\x03\xBD\xCF\xDE\x00\xF0\xC7"
+ "\x7B\x7E\xF5\xA5\xC5\x56\xFD\xFE\xE5\x69\x03\x00\x6C\x5D\xB5\x28\x15\x69\xD3\xD9\xFC\xD4\x9C\xF4\xD2"
+ "\x55\xCF\xA0\xBD\x85\x04\x17\x7B\x26\x20\x8E\xF0\xEE\xFB\x39\x3E\x3E\x1F\x6F\xBB\x0E\xF0\xEB\x5B\x28"
+ "\x00\xB7\x05\x00\xF0\x8B\x15\x8D\x29\x63\xE8\x5C\xB3\xA6\x2E\xFD\xC0\xEA\xB5\x68\xAF\xB1\xAC\xC4\x85"
+ "\x7F\x75\xD3\xFE\x8E\x77\x7B\x0B\x4F\xC7\x7E\xFE\x68\x63\x0A\xE8\x7C\xF2\xC9\xD9\xE9\xEF\xAD\x59\x8B"
+ "\xF6\x17\x71\xAE\xFB\x2F\xB4\xEF\x7C\x8B\xD8\x37\x7F\x7C\x67\x8B\xF0\x66\xF6\xE1\xE9\xE1\xFC\xF2\x05"
+ "\x35\xFB\x7A\x7B\xAF\xAD\x1C\xBD\xF0\x49\x5D\x4D\x8D\x43\xFB\x6F\xDF\xE3\x5B\x3F\xFA\x25\x1F\x1D\x1F"
+ "\xCA\x7C\xE5\x0A\x7C\x51\x09\x2D\xEC\xF4\xCC\xEF\xAC\xE3\xEC\xA5\x62\x26\x93\xB9\xBA\x49\x18\x63\xF8"
+ "\x7F\xDA\x7F\x00\x35\xAE\x9C\x9A\x49\xED\xBD\xC2\x00\x00\x00\x00\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1783,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x06\x62\x4B\x47\x44\x00\xFF\x00\xFF\x00\xFF\xA0\xBD\xA7"
+ "\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0B\x13\x00\x00\x0B\x13\x01\x00\x9A\x9C\x18\x00\x00\x00"
+ "\x07\x74\x49\x4D\x45\x07\xD4\x07\x18\x0F\x35\x31\x9A\x45\xD2\x48\x00\x00\x06\x84\x49\x44\x41\x54\x78"
+ "\xDA\xC5\x96\x6D\x8C\x15\x57\x19\xC7\x7F\xE7\xCC\xCC\x99\x99\xFB\xB2\x5C\x70\x0B\x05\x8A\x2C\xD2\x02"
+ "\x9A\xB6\xAE\x14\xD7\x20\x6D\xB2\xDB\x6A\x1B\x5B\x09\x60\x0A\xB5\x69\x94\x6D\xFC\xA0\x7E\x30\x85\xD0"
+ "\x54\x13\x9B\x42\x10\x93\x42\x82\x48\xF8\xA0\x46\xEB\xEE\x52\x52\xB2\xD2\x16\xB6\x0D\x16\x68\x52\xA8"
+ "\x52\x8D\xA0\xB0\xD1\xF0\x26\x95\x2E\x94\xE5\x75\x61\x2F\xCB\x72\xEF\x9D\xB9\x33\xE7\xF8\x61\xD8\xCB"
+ "\x5A\x40\xEF\xA5\x4D\x7C\x92\x93\x99\x9C\x9C\x39\xCF\xEF\xF9\x3F\xE7\x79\xE6\x08\x6E\x62\xDB\xB7\xBF"
+ "\xD7\x6A\x59\x66\x8E\x94\x34\xFB\xBE\x9B\xF3\x3C\x45\x14\x45\x0C\x0E\x16\xD0\x9A\x5D\x5A\xD3\xA5\xB5"
+ "\x6C\x7F\xE4\x91\x59\x79\x3E\x86\x89\x8F\x4E\x74\x75\xBD\xDB\xAC\x94\x6E\xD3\x44\x0D\x11\x12\x37\x95"
+ "\xC6\x18\x83\x94\x12\x29\x25\x5A\x6B\x6C\x01\x71\x39\x80\x28\xCC\x47\x91\x5C\xFB\xE8\xA3\x0F\x2E\xFB"
+ "\x44\x00\x5E\x7B\xED\xED\x65\x8E\x8A\x97\x96\x85\x45\x2A\x93\x21\x93\x49\x55\x1C\x4B\x01\x52\x4A\x84"
+ "\x14\x08\x04\x61\x39\xA2\x58\x28\x12\x0C\x5E\x22\x0A\xC2\x5D\x41\x60\xCD\x7B\xFC\xF1\x87\xF3\xB7\x0C"
+ "\xB0\x71\xE3\xEF\x97\x39\x6E\xB4\x54\x78\x59\xEA\xEB\x73\xD8\xB6\x8D\x63\x5B\x58\x96\x85\x10\x02\x21"
+ "\x04\xA5\x20\x44\x39\x36\xD2\x92\xD8\x96\xC4\x18\x43\xA9\x14\x72\xF1\xEC\x19\x0A\x97\x07\xBA\x8B\x45"
+ "\xBB\xE5\xA9\xA7\xBE\x5E\x13\x84\x04\x68\x6B\xEB\x6A\x36\x14\x96\xE2\x66\xA8\xAF\xCF\xE1\xB9\x8A\x54"
+ "\xCA\xAB\x0C\xCF\x53\x78\x9E\x22\x9B\xF1\x09\xC2\x32\x61\x10\x12\x86\x11\x52\x4A\xB2\xD9\x34\x63\x26"
+ "\x4C\xC0\xF1\xFC\x46\x21\x0A\x4B\x6B\x55\x40\x02\x18\x53\x68\x93\xFE\x35\xE7\xBE\xEF\x92\xF2\x3D\xD2"
+ "\x69\x9F\x74\xCA\x27\x93\x4E\x51\x2C\x06\xA4\x52\x1E\xB9\x11\x19\x1C\xE5\x60\xD9\x16\x5A\x6B\x00\xB2"
+ "\x69\x9F\x09\x93\x26\x61\x30\x8B\x5E\x7A\x69\x63\x73\x4D\x00\xEB\xD6\xBD\xD2\x6A\xA4\x6E\xC8\x8D\xBC"
+ "\x2A\xBB\x72\x50\x2A\x89\xD8\x77\x5D\x52\xAE\x22\xE5\x2A\x94\x63\x13\x04\x65\x32\xE9\x14\xAE\x72\x70"
+ "\xAF\xAE\x93\x52\x22\xAD\x44\x89\x4F\x4F\x6A\x40\xEB\xD2\x33\x35\x01\xC4\x71\x69\x8E\x4A\x65\xF0\x7D"
+ "\x17\xCB\xB2\x70\xEC\x64\x28\xDB\x46\xD9\x36\x9E\x52\x78\x4A\xE1\x28\x07\xAD\x75\xC5\xB9\xEB\x5E\x1B"
+ "\x52\x4A\x1C\xE5\x30\x7A\xEC\xED\x84\x61\x38\x77\xF5\xEA\x5F\xE7\x6A\x00\x28\x36\x8F\xAA\xAF\x47\x4A"
+ "\x89\x25\x93\xC3\x36\x74\xF2\x2D\xCB\xAA\x44\xA9\xB5\xC6\x71\x1C\x04\x02\x47\x39\x38\xB6\x83\xB2\x6D"
+ "\x1C\xCB\xC2\xB1\x2C\x2C\x21\x48\xA5\x52\x8C\xC8\x8D\x00\xC2\xC6\xAA\x01\x5C\xD7\xCE\x59\x96\xF5\x1F"
+ "\x75\x6E\x30\xC9\xD3\x18\x4A\x41\xC8\xE9\xBE\x0B\x38\xB6\x95\xC8\xEE\x24\x4E\x6D\x2B\x01\x1C\x3E\x6C"
+ "\x4B\x52\x7F\x5B\x3D\x61\x58\xAA\x1A\xC0\x76\x5D\x85\x6D\xDB\x08\x21\x40\x40\xAC\x0D\x67\xCF\xF5\x93"
+ "\xF2\x15\x8E\xED\x60\x30\x38\x8E\x83\x52\x36\x75\xE9\x14\x71\x1C\x5F\xEB\x0D\x90\x7C\x07\x18\x63\xD0"
+ "\x24\xDF\x47\x51\x58\x7D\x0A\x2E\x5C\xE8\x27\x8E\xE3\xA4\xD6\x11\xD8\x96\x24\x9B\xF1\x89\x22\x4D\x14"
+ "\x47\x49\x64\xB6\x24\xE3\x79\x58\x96\x45\xA4\x35\xB6\x94\xD8\xF2\x06\x0A\x48\x89\x8E\x23\x82\xA0\x5C"
+ "\x75\x2F\xB0\xFB\xFA\xF2\x84\x61\x88\xBC\xDA\x92\x2E\x0D\x5C\x61\x44\x5D\x9A\x51\xA3\xEA\x90\x42\x56"
+ "\x24\xD7\x40\xA1\x54\xAA\x38\x96\x52\x26\xE7\xE5\xEA\x46\x1A\xD0\x5A\x73\xE2\xF8\x09\x4A\xA5\xA8\xBB"
+ "\x6A\x05\x8A\xC5\x78\xCB\xC5\xF3\xE7\x2A\xDD\xCE\xB1\x2D\x0A\x85\x12\xF9\x4B\x83\x5C\x29\x14\x29\x14"
+ "\x4B\x14\xC2\x90\x28\x8A\xAE\x49\x2F\x25\x96\x10\x89\x12\xB6\x5D\x89\x3E\x0C\x42\xDE\x3F\xFA\x3E\x41"
+ "\x60\xAA\x07\xB8\x72\x85\xAE\xA3\x87\x0E\x11\x96\x23\x10\xA0\x5C\x55\x81\x11\x42\x54\x7A\xFF\x50\xAE"
+ "\x87\xE6\x87\xAA\x64\xB8\x22\x07\x0F\x1C\x24\x0C\xC3\x2D\xEB\xD6\xFD\xA4\xEA\x14\xC8\xF6\xF6\x9F\xB6"
+ "\x9F\x3C\x71\xBE\xA7\xE7\x58\x0F\x46\x9B\xCA\xE9\x96\xE2\x26\x6D\x73\xE8\x27\x32\x1C\x44\x08\x4A\xC5"
+ "\x12\x6F\x6D\x7D\x8B\x42\x81\xB5\x35\xB7\xE2\x62\xD1\x5D\xFC\x97\xDD\xEF\x91\xCF\x0F\x00\xE0\xFB\x6E"
+ "\x25\xE2\xE1\xA6\x87\xBD\x1B\x63\x30\xC6\x10\x69\x4D\x6C\x0C\xAF\xBE\xFA\x3A\x4A\x79\x4C\x9C\xF8\xD9"
+ "\x39\x35\x03\x74\x76\xAE\xDA\xD2\x77\x2E\xFE\xF9\xF6\x37\xBA\xE8\xEF\xBF\x84\x31\x06\xA5\x92\x54\x18"
+ "\x6D\x30\x98\x8A\x43\x63\x92\x1E\xA1\xB5\x26\x8E\x63\xE2\x38\x66\x7D\xC7\x06\x7A\x3E\xE8\xE1\xEE\xBB"
+ "\x67\x30\x30\x50\xCC\xDD\xF2\x7D\xE0\xC9\x27\x9F\x5D\x73\xDB\x18\x7B\x51\xCB\xC3\x0F\x71\xD7\x94\xC9"
+ "\xF8\x9E\x9B\x48\x6C\x27\x9D\x6E\x28\xE7\x43\xF9\xEF\xBF\xD8\x4F\xD7\xE6\x2E\xFA\xCE\xF7\x73\xFF\xFD"
+ "\xCD\x1C\x3F\x7E\x9E\x6C\x36\x95\x1F\x3D\x7A\xE4\x5A\x7F\xDF\xA2\x89\x22\xCC\xE7\x67\xFE\xF8\xE0\xE2"
+ "\x9A\x6E\x44\x0B\x16\xFC\x70\xAE\xE7\x95\xD6\x4C\x9A\x3C\xBA\x61\xFA\x17\x67\x30\xED\x73\xD3\x50\x2A"
+ "\xF9\x19\x0D\x55\xC0\xE9\x93\xBD\xEC\xFB\xEB\x3E\xF6\xEF\xDB\x8F\x31\xE9\xF6\x59\xB3\x1E\x68\x3D\x76"
+ "\xAC\xB7\x67\xE6\xCC\x7B\x1A\x8A\xC5\x80\xCC\x87\x1B\xC8\x0D\xBE\x83\x29\x17\xB8\x58\xCC\xB6\x3F\xB8"
+ "\xFC\xD0\xD3\x55\x03\x0C\xD9\x13\x4F\x3C\xD7\xEA\x38\xE5\x85\xB6\x1D\x35\x8F\x1E\x33\x92\x6C\x5D\x9A"
+ "\xB8\x5C\xE6\xCC\x99\x3E\x4A\xA5\xB8\x3B\x8A\xEC\x5D\xE5\xB2\xB3\xB6\xB3\x73\x55\xCF\xF3\xCF\xFF\xA2"
+ "\x71\xC5\x8A\xEF\x77\xAF\x5C\xD9\xB1\xF9\x1E\x77\xF7\xDC\xB1\x99\xB3\x7C\x66\xA2\x47\xD8\xBB\x87\x0F"
+ "\x4E\x94\x39\x7F\xA5\xAE\xFD\xB1\x95\x37\x86\x10\xD5\xE4\x69\xFE\xFC\x1F\x35\x00\x0D\x00\x9B\x36\xBD"
+ "\xB8\xEB\x66\xEB\x5E\x79\x66\xFA\xE6\x29\x8D\x77\xCD\x6D\xFC\xC6\xF7\x28\x9F\xFA\x1B\x61\xEF\x1E\xC2"
+ "\xDE\xBD\x1C\xF9\x57\x99\xD3\x97\xB2\xED\xF3\xD7\x5E\x0F\x61\x57\x03\xB0\x69\xD3\x8B\x3D\x40\xCF\xFF"
+ "\x5A\x17\x87\x85\x86\x9C\xDF\x87\x15\x9E\x80\x71\xF7\x5D\x8D\x4F\x30\x95\xBD\x84\x87\x07\x5A\x3B\xBE"
+ "\x3B\x8D\x85\xBF\x3A\xFC\xF4\xCD\x4A\x3B\x29\xC1\x3F\x61\x86\x46\xAD\xD7\xAB\xB0\x4C\xCB\x3B\x3B\x7A"
+ "\xBB\x8F\xEC\x58\x8F\x15\x1C\xC7\x19\x37\x1D\x35\xFE\x4B\xA8\xF1\x4D\xDC\x3B\xCD\x65\x4C\xF6\x72\xEB"
+ "\x2F\x5B\xA7\xB5\xFD\x57\x00\x80\x37\xEF\x7C\x01\xFE\x5C\xFB\x15\xFB\x3B\xBF\x39\x9C\x0F\x42\xD3\xB2"
+ "\x6D\xEB\xC9\xEE\x03\xDB\x3A\xB0\x82\x9E\x04\xE2\x8E\x26\x9C\x3B\x9A\x98\x71\xAF\xC7\xB8\x11\x97\x5B"
+ "\x7F\xF6\xCD\xA9\x6D\xD7\x01\xDC\x28\x6A\x7F\x35\xC6\x5F\x5D\x9B\x12\x3F\xD8\x70\x24\x1F\x94\x69\x79"
+ "\xA3\xEB\x54\xF7\xDF\xB7\x76\x60\x95\x8E\xA1\xC6\x26\x4A\x38\xE3\x9B\xF8\xF2\x7D\x3E\x13\x3E\x35\xD8"
+ "\xBA\x62\x5E\x02\x21\x86\x03\xBC\x79\xE7\x0B\xD7\x6D\x38\xFB\xE5\xE5\x14\x97\x54\x77\x58\x87\xDB\xB2"
+ "\xD9\x53\x73\xB1\x36\x3B\xE7\xCE\x1B\xDB\x38\x7D\xF6\xB7\xD1\xFE\x64\xC2\x53\xDD\x84\xBD\x7B\x28\xF7"
+ "\xEE\x61\xC7\xEE\x22\x07\x3E\x4C\xB7\x8B\xE1\xD1\x02\x30\x33\x49\xC1\xEC\x97\x97\x57\x36\xBB\x15\x00"
+ "\x80\xE7\xBE\x3A\x25\x67\x0C\x3B\x17\x2C\xB8\xBD\x71\xC6\x9C\x6F\xA1\xFD\x29\x84\xA7\xF7\x13\xF6\xEE"
+ "\xE1\xE4\x3F\xF6\xD2\xB1\xCD\xBF\x96\x82\xE2\x12\xC4\x47\x1D\xDD\x68\xAE\x16\x5B\xF5\xF6\x3F\xF3\x06"
+ "\x5A\x3A\x7F\x77\xA6\xFB\x8F\x9D\xEB\x91\x85\x23\xA8\xB1\x5F\xE0\xA2\x99\xCC\xA6\x3F\xD4\x31\xAA\x69"
+ "\xE1\xF5\x9B\x0F\xCF\xF9\xC7\x71\x3E\xDC\x9E\xFD\xCA\x94\x1C\xB0\x73\x46\x53\x7D\xE3\x03\x73\xBE\xC6"
+ "\x6F\xD7\x6C\xE3\xF3\xF3\x96\xB0\xED\xDD\xA3\xF9\x4F\xC4\x41\x2D\x10\x5A\x38\x8D\xA3\x9A\x16\x72\xFC"
+ "\x5C\x39\x9F\xCF\x5F\x5E\x2C\x8C\x31\xFC\x3F\xED\xDF\x59\x90\xA8\x1E\xB1\x5A\x60\x2B\x00\x00\x00\x00"
+ "\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1567,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x06\x62\x4B\x47\x44\x00\xFF\x00\xFF\x00\xFF\xA0\xBD\xA7"
+ "\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0B\x0D\x00\x00\x0B\x0D\x01\xED\x07\xC0\x2C\x00\x00\x00"
+ "\x07\x74\x49\x4D\x45\x07\xD3\x0A\x09\x13\x22\x05\xA6\x7E\x3C\x8C\x00\x00\x05\xAC\x49\x44\x41\x54\x78"
+ "\xDA\xC5\x97\x5D\x6C\x1C\xD5\x15\xC7\x7F\x73\x67\x67\x3F\xEC\x64\x6D\x6F\x0C\x09\x36\x21\x09\x35\x91"
+ "\xD3\x7C\xC8\xF1\xB4\xA8\x6A\x08\x6D\x2A\x25\x91\x22\x24\x04\xA2\x6F\x40\x21\x60\xA8\x51\xC4\x53\xC8"
+ "\x43\x91\x90\xE0\xA1\x7D\xE4\xA1\x7D\x00\x56\x0E\x4D\x05\x0F\xED\x03\xFD\x78\xE0\x01\x82\x22\x11\x3E"
+ "\x5A\x09\x6F\xB0\x03\xB4\x02\xB6\x4A\x00\x67\x4D\xFC\xB1\xBB\xCE\xEE\xCE\xEC\xDE\x99\x7B\xFB\x30\xB3"
+ "\xEB\x5D\x3B\xEB\x35\x11\x52\x8F\xF4\x97\x66\xEE\x7F\xEE\x39\xE7\x9E\x7B\xE6\x9C\x7B\xE1\xFF\x2C\xC6"
+ "\x77\xF9\x78\x74\x7C\x6A\x07\xE8\x43\xA0\x46\x80\x11\xB4\x6A\xD2\xA1\xA7\xD1\x6A\x1A\x25\xCF\xD9\x9C"
+ "\xC9\x02\x2A\x9D\x4E\xEB\xEF\xC5\x81\xD1\xF1\xA9\x47\x81\x47\x80\xBB\x41\x03\x0A\x44\x14\x44\x3C\xF8"
+ "\x40\xB9\xE0\xBB\xCD\x53\x3E\x40\x79\xAF\xD9\x7A\xE2\x34\x20\xD3\xE9\xB4\xBA\x21\x07\x46\xC7\xA7\xF6"
+ "\x63\x88\x17\xD1\xEA\x67\x08\x13\xA2\xBD\x10\x4D\x11\x8D\x25\xD8\x9A\x5C\xE2\xC7\xB7\xE6\x01\x28\xB9"
+ "\xF0\xCE\xA5\x6D\x38\x6E\x0D\xAA\x73\xE0\x2E\x80\x96\x80\x76\xF0\xDD\x93\x36\x7F\xFA\x23\xE0\x5E\xCF"
+ "\x11\xA3\xC3\xAA\x4F\x03\x90\xD8\x42\x74\xC3\xCD\x3C\x76\xE7\x0C\x7B\x6F\xDF\xC0\xCE\x5B\xBB\x88\x47"
+ "\xC5\xAA\x39\x33\xF3\x55\xFE\xF9\xEF\x22\xE7\xFF\x03\x1F\x5D\xB2\xA0\x7C\x39\x20\xFC\xDA\x5F\x6D\x5E"
+ "\x7D\x1C\x58\x4A\xA7\xD3\x5E\x47\x07\x1A\xC6\xCD\x18\x24\x77\xF2\xE0\xFE\x6F\xB8\xF7\x40\x3F\x7D\x1B"
+ "\x22\x6D\xA3\xA5\x57\xA8\x3A\x7F\xB1\xC0\xCB\xE7\x2C\xBE\x9D\x9D\x05\xAF\x04\x4A\x4E\xDB\xFA\xF4\x11"
+ "\x60\xAE\x39\x12\x66\x5B\xE3\x91\x2E\xB6\x6E\xBD\x85\x93\x47\x4B\x1C\xFE\x51\x0A\x2B\x22\xF0\x14\x6D"
+ "\xE1\x2B\xDD\x82\xC1\xFE\x18\x07\x87\x21\x5F\xF2\xB8\x34\x67\x80\xF6\x37\xE7\xF4\xEE\x1F\x0E\x30\xF5"
+ "\x77\xDB\xB6\xBD\x4C\x26\xA3\x57\x39\x30\x3A\xFE\xF1\x7E\x30\xDE\xC4\xB4\x18\x1C\x1C\xE4\xD4\x3D\x9A"
+ "\xED\x9B\xE3\x48\x4F\xDF\x10\x22\xA6\xC1\xDE\xED\x09\xAE\x2E\x29\xBE\x5E\x00\xD0\x77\xE4\xE4\x8E\x0F"
+ "\x07\xC4\x67\x5F\x87\x4E\xB0\x72\x23\x5F\x05\x1F\x92\xC3\x1C\x3F\xE8\x92\xEC\x8A\x50\xA9\x6A\x7E\xFB"
+ "\x86\x43\xA5\xAA\xDB\x62\x2D\x5E\x69\x78\xF8\x50\x92\xA1\xDB\xFA\x02\x0B\xD1\xDE\xE7\x81\x3E\x20\xD2"
+ "\x12\x81\xD1\xF1\xCC\xA3\xA0\x9F\x24\x31\xC0\x43\x77\xE6\xD9\xB5\x6D\x03\xD2\xD7\x48\x5F\xF3\xD4\xB1"
+ "\x5E\x7E\xF3\xFA\x35\xF6\x6D\x33\x1A\x63\xCD\xE8\xC4\x6B\x60\x7B\xBF\xE2\xDD\x6C\x2F\xC8\xA5\x5B\x72"
+ "\x6A\x57\x61\xC0\x98\xBE\x60\xDB\x76\x6D\x39\x02\x5A\x3D\x02\x26\x9B\xFB\x37\x32\xBC\xAD\x9B\xB2\xAB"
+ "\x1A\x00\x98\x38\x91\xE2\x95\xB3\xB2\x65\x7C\xBD\x7C\xD9\x55\x24\xBB\x2D\xEE\x1B\x29\x82\x61\x81\x19"
+ "\xBF\x1F\xE8\x05\x2C\x01\x30\xFA\xEB\x8F\x76\x00\x77\x13\xDF\xC4\x2F\x86\x16\xF0\x7C\xA8\x54\xFD\x06"
+ "\xEA\x32\x71\x22\xC5\xEB\xEF\xF9\x2D\xDC\x7A\xF8\x62\xD9\xE3\xBF\xB9\x0A\x1A\x13\xE2\x9B\xC0\x30\x47"
+ "\x26\xAB\xC7\x76\x01\xF1\xFA\x7F\x75\x28\xD8\x9F\x14\xFD\xC9\x25\xCA\x4E\xDB\xC2\xC5\xC4\x89\x14\x8F"
+ "\xFD\x61\x91\x23\x7B\x54\x47\x7E\x76\xD1\xE5\xAB\x45\x83\x7F\xCD\x0C\x2E\x7F\x10\x75\xC0\x99\x05\xAB"
+ "\xE7\x00\x70\xA1\xBE\x05\x23\x00\x5B\x7A\x14\x1A\xDA\xAE\xB0\xD9\xC8\x5B\x9F\x88\x8E\xFC\x62\xC9\x6F"
+ "\x35\x0E\x44\x63\x89\xE0\x41\x44\x87\x81\xC4\xB2\x03\x66\x9C\xBE\x44\x8D\x92\xA3\x56\xA1\xDD\x4A\xDF"
+ "\xFB\xC2\x5A\x93\xFF\x66\x69\x23\x86\x01\x46\x53\x8D\x32\x05\x41\x1E\x08\x6B\x08\x88\x2F\x27\xA1\x88"
+ "\x93\x8C\xD5\x28\x57\x55\x03\x9D\x64\xE2\x44\x0A\x57\xAE\xBD\x5D\x00\x5A\xB7\x3A\x41\xA4\x1B\xB4\x36"
+ "\x1A\x49\x58\x2F\xC9\x65\x19\xE5\x9A\x43\x03\xEB\x91\x67\x7E\x39\xB8\x26\x7F\xFE\xB9\x15\xC6\x5B\x45"
+ "\x2C\x17\x77\xE5\x92\x77\xE2\x44\xC4\x72\x0B\x9F\x2D\x75\x76\xE0\xE0\x0B\x81\x91\xB5\xF8\x46\xE3\xA9"
+ "\x3B\xE2\x95\x97\x83\xD1\x38\x4C\xF8\xEE\x5D\x85\x6A\x0C\x4F\x47\xD6\x7D\x40\x69\x56\xBE\x1E\x3E\x22"
+ "\x40\xFA\x04\xAD\x5A\xCB\x2C\xA0\x22\x61\x11\x9A\xC6\x30\x29\x3B\x1E\x96\x19\xF9\xDE\x8D\x5B\x4D\x1D"
+ "\xC7\x71\x6B\x61\x8B\xAE\x66\x31\x91\x41\x0E\x28\x79\x0E\x80\xDA\x02\x42\x88\x55\x58\x29\x87\x7F\xF7"
+ "\xDD\x9C\x33\xC5\x32\xA8\x2D\x04\x83\xB5\x7C\x06\x70\x05\x40\x78\x86\xFB\x00\x67\x0E\xCB\x90\x24\x22"
+ "\xAD\x58\xA9\xDC\x95\x6B\x1B\xEF\x4B\xC8\x16\xD4\xF5\x58\x86\x04\x67\x0E\x94\x77\xD1\x4E\xBC\x75\x19"
+ "\x70\xEA\xF1\x56\x28\xEF\x35\x04\x3F\x5D\x2A\xCC\xF3\x83\xC1\xEE\x15\x6A\x2D\x00\x7E\xF5\xFB\x25\x6E"
+ "\xEF\xBB\x9E\xD9\x64\x07\x3E\x90\xEC\x4C\x39\xD8\x7F\xAF\xF4\x36\x26\xE5\x86\x03\xE9\x74\x5A\x8F\x8D"
+ "\x71\x7A\x92\x27\x1E\x76\x8A\x57\x7E\xA2\x36\x6F\xA7\xAF\xBB\xF5\x40\xFB\xF4\x2B\xF3\xF4\xC4\xDA\x2B"
+ "\xEF\xC4\xE7\xCB\x06\x4E\xF1\x4A\xB0\x7A\xF3\xCF\xFF\x00\x8A\x80\xDB\x9C\x71\x12\xDF\x3D\x85\x99\x78"
+ "\x37\x7B\x79\x86\xBB\xF6\xDD\x84\x65\x06\x4E\x3C\x7B\xE6\x0A\x1B\xD7\x50\xDE\x89\x97\xBE\x41\xF6\xF2"
+ "\x5C\xF0\xE2\xE6\x5E\x22\x46\x01\x28\x00\xB2\x91\x9F\x99\x4C\x46\xDF\x63\x47\x72\x39\xBD\x27\xEF\x2B"
+ "\x71\x74\xBE\x50\x65\x68\x20\x4A\xD4\x32\xB1\x4C\xE3\x86\x21\xF0\x78\x7F\x3A\x4F\xC5\x95\x50\xCB\xBF"
+ "\x68\x5B\x7F\x7B\x07\xC8\x01\x85\x74\x3A\xED\xAF\x4C\x71\xCF\xE6\xCC\xCB\xF8\xCE\xA9\x6B\x95\x1A\x67"
+ "\x27\xF3\xC8\xAA\x43\xCC\x12\x37\x04\x59\x75\x38\x3B\x99\xE7\x5A\xA5\x16\x18\x37\xFF\xF2\x06\xF0\x2D"
+ "\x90\x07\xBC\x55\x67\xC2\x4C\x26\x83\x6D\xDB\xFE\x00\x53\x53\x39\xBD\xBB\x28\x95\x79\xF8\xF3\x19\x17"
+ "\xA9\x04\x5B\x37\x09\xAC\x88\x20\x22\xE8\x08\x43\x7B\x4C\x7E\x59\xE1\xC3\x4F\x0B\x48\x4F\x35\x1B\xCF"
+ "\x01\x57\x01\xA7\x7E\x6B\xBA\x6E\x95\x1E\x1B\x1B\x13\x40\xD7\xA4\xF7\xC0\xCF\x89\xF6\x3E\x8F\x61\x8E"
+ "\xC6\x2C\xC1\x6D\x5B\xBA\xD8\x3D\xA0\x48\xA5\x7A\x30\x4D\xAB\x65\x8E\xEF\x4B\x16\x17\x8B\x7C\x7A\x45"
+ "\xF0\xD5\x6C\x85\xAA\x54\xA0\xBC\x8B\xB8\xB9\x97\xEC\xD8\x9B\x17\xC2\x95\x5F\x05\x2A\xCD\xC7\xF2\xB6"
+ "\x6D\x22\x74\x22\x0E\xF4\x4D\xEA\x07\x8F\x63\xC6\xEF\xC7\x30\x47\xEA\x7C\x22\x0A\xFD\x3D\x41\x0E\xCF"
+ "\x17\x3D\x9C\x5A\xD3\x64\xE5\x5D\xC4\x2B\xBD\x1D\x66\x7B\x01\x98\x0F\xC3\xBE\xEA\x76\xB4\xE6\xD5\x6C"
+ "\x6C\x6C\xCC\x08\xFB\x45\x37\xD0\x3B\x59\x3D\xB6\x0B\xAB\xE7\x00\x22\x3A\x8C\xB0\x86\xC2\x96\x1A\xB6"
+ "\x13\x99\xC5\xAF\x66\xA9\xE5\x33\x61\x91\x29\x87\xBF\x5A\x21\x7C\xF6\xAE\x77\x59\x5D\xD7\xE5\x34\x8C"
+ "\x86\x15\x46\x24\x11\x22\x1E\x8E\x89\x46\x31\x03\x09\xB8\x80\x13\xC2\xED\x74\x39\xFD\x1F\x79\x3A\x71"
+ "\x2E\xDF\x7C\x09\x0C\x00\x00\x00\x00\x49\x45\x4E\x44\xAE\x42\x60\x82"
+},
+
+{
+ 1557,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x06\x62\x4B\x47\x44\x00\xFF\x00\xFF\x00\xFF\xA0\xBD\xA7"
+ "\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0B\x0D\x00\x00\x0B\x0D\x01\xED\x07\xC0\x2C\x00\x00\x00"
+ "\x07\x74\x49\x4D\x45\x07\xD3\x0A\x09\x13\x1F\x34\x9D\x48\x74\x08\x00\x00\x05\xA2\x49\x44\x41\x54\x78"
+ "\xDA\xC5\x97\x4B\x6C\x1C\x45\x1A\xC7\x7F\x5D\x3D\x3D\x0F\x3B\x19\x7B\x1C\xEF\x26\xB1\x09\x49\xC0\x44"
+ "\xCE\x66\x41\x8E\x1B\x38\x10\x02\x04\x14\x90\x22\xC4\x4B\x48\x5C\x02\xCB\x63\xAD\x5D\x1F\xB2\x27\x14"
+ "\xAD\xC4\x89\x95\x10\x48\x1C\x38\xEC\x1E\x80\x11\x81\x00\x17\x38\xF0\x3A\xE4\xC0\x43\x91\x40\x84\x87"
+ "\xF0\x04\x3B\x0A\xA0\x88\x11\x0E\xC4\x19\x27\x7E\xCC\x78\x32\x33\xDD\x3D\xD5\x5D\xB5\x87\x69\xCF\x8C"
+ "\xE3\x99\x38\xF1\x22\xAD\xA5\xBF\xE4\xA9\x7F\xD5\xF7\xFD\xBF\xAF\xAA\xBF\xFA\x0A\xFE\xCF\x7F\xC6\x95"
+ "\x4C\x1E\x1E\x1D\xDF\x0A\x7A\x0F\xA8\x21\x60\x08\xAD\x9A\x6C\xE8\x09\xB4\x9A\x40\xC9\xA3\x36\x87\xB3"
+ "\x80\x4A\xA7\xD3\xFA\x77\x11\x30\x3C\x3A\xFE\x04\xF0\x38\x70\x1B\x68\x40\x81\x88\x82\x88\xD7\x26\x28"
+ "\x17\x02\xB7\x79\xC9\x31\x94\xFF\xB6\xAD\x5F\x3B\x04\xC8\x74\x3A\xAD\x56\x25\x60\x78\x74\x7C\x27\x86"
+ "\x78\x09\xAD\x6E\x47\x98\x10\xED\x86\x68\x0F\xD1\x58\x82\x4D\xC9\x22\x37\x5D\x95\x07\xA0\xE4\xC2\x67"
+ "\x93\x9B\x71\xDC\x2A\x78\x33\xE0\xCE\x81\x96\x80\x76\x08\xDC\xA7\x6D\xDE\x7C\x03\x70\x5B\x09\x31\x56"
+ "\x88\xFA\x10\x00\x89\x0D\x44\xD7\xFC\x91\xA7\x6E\x9E\xE2\xFA\x6B\xD6\xB0\xED\xAA\x0E\xE2\x51\xB1\x6C"
+ "\xCD\xD4\xAC\xC7\xD7\x3F\x2E\xF0\xC5\x4F\xF0\xDD\xA4\x05\xE5\xD3\x35\x22\xA8\xBE\x6F\xF3\xFA\x5F\x81"
+ "\x62\x3A\x9D\xF6\x57\x14\x50\x77\x6E\xC6\x20\xB9\x8D\xFD\x3B\xCF\x70\xFF\xAE\x5E\x52\x6B\x22\x6D\xB3"
+ "\xA5\x2F\x32\xF5\xC5\x89\x02\xAF\x1C\xB5\x38\x37\x3D\x0D\x7E\x09\x94\x9C\xB0\xF5\xA1\xBB\x81\x99\xE6"
+ "\x4C\x98\x6D\x9D\x47\x3A\xD8\xB4\x69\x23\x4F\xDF\x53\x62\xEF\x8D\x3D\x58\x11\x81\xAF\x68\x8B\x40\xE9"
+ "\x25\xE8\xEF\x8D\xB1\x7B\x10\xF2\x25\x9F\xC9\x19\x03\x74\xB0\x3E\xA7\x77\xFC\xA9\x8F\xF1\x0F\x6D\xDB"
+ "\xF6\x33\x99\x8C\x5E\x26\x60\x78\xF4\xFB\x9D\x60\x1C\xC1\xB4\xE8\xEF\xEF\xE7\xE0\xBD\x9A\x2D\xEB\xE3"
+ "\x48\x5F\xAF\x0A\x11\xD3\xE0\xFA\x2D\x09\xCE\x17\x15\xBF\xCD\x01\xE8\xEB\x72\x72\xEB\x57\x7D\xE2\x87"
+ "\xDF\x42\x11\x5C\xBC\x91\xAF\x43\x00\xC9\x41\x9E\xDC\xED\x92\xEC\x88\x50\xF1\x74\x4B\x1C\xF9\xB6\xD0"
+ "\x96\x6B\xE6\x95\x86\xC7\xF6\x24\x19\xB8\x3A\x55\xF3\x10\xED\x7E\x16\x48\x01\x91\x25\x19\x18\x1E\xCD"
+ "\x3C\x01\xFA\x6F\x24\xFA\x78\xF4\xE6\x3C\xDB\x37\xAF\x41\x06\xBA\x25\xBE\x3C\x79\x81\x03\x0F\x6C\x64"
+ "\xF2\x9C\x7B\x59\xBC\x06\xB6\xF4\x2A\x3E\xCF\x76\x83\x2C\x6E\xCC\xA9\xED\x85\x3E\x63\xE2\xB8\x6D\xDB"
+ "\xD5\xC6\xA9\xD2\xEA\x71\x0C\x8B\xF5\xBD\x6B\x19\xDC\xEC\x52\x76\x5B\x7F\xBA\x27\x27\x2B\x1C\x78\x60"
+ "\x23\x40\xCB\x39\xED\xF8\x64\xA7\xC5\x83\x43\xB3\xBC\x7F\xCC\x02\x33\xFE\x10\x8A\xB7\x00\x27\x02\x30"
+ "\xFC\xF7\xEF\xB6\x02\xB7\x11\x5F\xC7\x9D\x03\x73\xF8\x41\x27\x7E\x10\x2C\x33\xFE\x4B\xCE\xAB\x1B\x07"
+ "\xA8\x78\xC1\x65\xF1\xD2\xD7\xCC\x15\xAB\x68\x4C\x88\xAF\x03\x67\x7A\x68\xCC\xDB\xB7\xDD\x8E\x1D\xC9"
+ "\x2F\x66\x60\x4F\x6D\x7F\x7A\xE8\x4D\x16\x29\x3B\xCB\x23\x3B\x5F\x90\x4B\x8C\x03\x4B\xE6\xB5\xE2\xB3"
+ "\x53\x15\x7E\x9D\x37\xF8\x66\xAA\xBF\x31\x18\x75\xC0\x99\x06\xAB\x6B\x17\x70\x7C\x51\xC0\x10\xC0\x86"
+ "\x2E\x85\x6E\x11\x59\xC9\x51\xCB\x8C\x37\x47\xD8\x8E\x9F\x2F\x05\x7C\x33\xB5\x79\xC9\x58\x34\x96\xA0"
+ "\x0A\x20\xA2\x83\x40\xA2\x21\xC0\x8C\x93\x4A\x54\x29\xB5\x88\xBE\x95\xF1\x45\xC7\x97\xE2\xCF\x14\xD7"
+ "\x62\x2C\x5E\x55\xE1\xB5\x64\x0A\xC0\xB0\x40\x04\x03\x28\xE2\x8D\x43\x28\xE2\x24\x63\x55\xCA\x5E\x43"
+ "\x40\x67\x4C\xB4\x35\xBE\x92\x38\x80\x53\xF3\x3D\x75\xE7\x86\xD1\x10\x41\xA4\x13\x3C\xC7\x00\xAC\x48"
+ "\x73\x49\x2E\xCB\x28\x17\x9C\x46\xA9\xFE\xE7\x23\xAB\x77\xBE\xA4\xDE\xB7\xBF\xF2\x44\xA3\x10\x29\x97"
+ "\xBC\x13\x67\xBA\x94\xA8\xE3\xA9\xFF\xCC\x5F\xD2\xF0\xEE\x7F\x5D\x61\xF3\x61\x84\x62\xFC\x72\x43\x41"
+ "\xBD\x99\x08\x5C\x0A\x5E\x8C\x5C\x69\xED\x12\xEC\x7B\x41\xFE\x6E\x22\x22\x22\xDC\x06\x2D\x41\xCB\x2C"
+ "\xA0\x44\x58\x84\x26\x6A\x9F\x95\x8F\x17\x98\xCB\x70\xD7\x73\xEA\x7F\x12\x61\x99\x35\x18\x06\xB5\x9E"
+ "\x01\x20\xF0\xB2\x80\xAC\x09\x50\xF2\x28\x00\xD5\x39\x84\x10\x2D\xB1\xF7\x79\x56\x2D\xC2\x14\x0D\x50"
+ "\x9D\xAB\x0D\x56\xF3\x19\xC0\x15\x00\x61\x0F\x77\x0C\x67\x06\xCB\x90\x24\x22\xAD\x71\xDF\x8B\x57\xB6"
+ "\x1D\xA9\x84\x24\x95\x68\xAC\xB7\x0C\x09\xCE\x0C\x28\xFF\x84\x9D\xF8\xF8\x74\xBD\x14\x03\x0A\xE5\xBF"
+ "\x8D\xE0\x96\x62\x61\x96\x6B\xFB\x3B\xDB\x3A\xF9\xCB\xBF\x1D\x0E\x1F\x48\x02\x70\x4D\xAA\xD8\x82\xA7"
+ "\xCE\xA7\xE2\xCE\x45\x95\xB1\x5C\xDB\x7F\xBF\xF4\x09\x26\x65\xC0\x11\x00\xE9\x74\x5A\xD7\x1A\x48\xFD"
+ "\xB5\xB3\x70\x16\xE5\x4B\xBA\x62\xD5\xB6\xF8\xC7\xAB\xB3\x00\x57\xC4\x2B\x5F\xE2\x2C\x9C\xAD\x45\x6F"
+ "\xBE\xF3\x11\xB0\x00\xB8\xCD\x3D\x96\x24\x70\x0F\x62\x26\x3E\xCF\x9E\x9E\xE2\xD6\x1B\xFE\x80\x65\xB6"
+ "\xEF\xAA\x9F\x39\x7C\x96\xB5\x31\x2E\x8B\x97\x81\x41\xF6\xF4\x4C\xED\x87\x9B\x7B\x99\x18\x05\xA0\x00"
+ "\xC8\x7A\x3F\x90\xC9\x64\xF4\xBD\x76\x24\x97\xD3\x7F\xCE\x07\x4A\xDC\x33\x5B\xF0\x18\xE8\x8B\x12\xB5"
+ "\x4C\x2C\xD3\x58\x35\x04\x3E\x5F\x4E\xE4\xA9\xB8\x12\xAA\xF9\x97\x6C\xEB\x83\xCF\x80\x1C\x50\x48\xA7"
+ "\xD3\xC1\xC5\x1D\x91\x6F\x73\xF8\x15\x02\xE7\xE0\x85\x4A\x95\x4F\xC7\xF2\x48\xCF\x21\x66\x89\x55\x41"
+ "\x7A\x0E\x9F\x8E\xE5\xB9\x50\xA9\xD6\x9C\x9B\xEF\xBE\x07\x9C\x03\xF2\x80\xBF\xAC\x27\xCC\x64\x32\xD8"
+ "\xB6\x1D\xF4\x31\x3E\x9E\xD3\x3B\x16\xA4\x32\xF7\x9E\x9A\x72\x91\x4A\xB0\x69\x9D\xC0\x8A\x08\x22\x82"
+ "\x15\x61\x68\x9F\xB1\x9F\x2B\x7C\x75\xB2\x80\xF4\x55\xB3\xF3\x1C\x70\x1E\x70\x16\x5F\x4D\x2D\xAB\xF4"
+ "\xC8\xC8\x88\x00\x3A\xC6\xFC\x87\xEF\x20\xDA\xFD\x2C\x86\x39\x1C\xB3\x04\x57\x6F\xE8\x60\x47\x9F\xA2"
+ "\xA7\xA7\x0B\xD3\xB4\x96\xAC\x09\x02\xC9\xFC\xFC\x02\x27\xCF\x0A\x7E\x9D\xAE\xE0\x49\x05\xCA\x3F\x81"
+ "\x9B\x7B\xD9\x8E\x1D\x39\x1E\x46\x7E\x1E\xA8\x34\xB7\xE5\x6D\xAF\x89\x50\x44\x1C\x48\x8D\xE9\xFD\x4F"
+ "\x62\xC6\x1F\xC2\x30\x87\x16\xF9\x44\x14\x7A\xBB\x6A\x67\x78\x76\xC1\xC7\xA9\x36\x2D\x56\xFE\x09\xFC"
+ "\xD2\x27\xE1\x69\x2F\x00\xB3\x61\xDA\x97\xBD\x8E\x2E\xF9\x34\x1B\x19\x19\x31\xC2\xEE\xB5\x13\xE8\x1E"
+ "\xF3\xF6\x6D\xC7\xEA\xDA\x85\x88\x0E\x22\xAC\x01\xB4\x6E\xAC\xD7\x32\x4B\xE0\x65\xA9\xE6\x33\x61\x91"
+ "\x29\x87\x9F\x5A\x21\xFC\xDF\x6F\xF5\x58\xBD\xAC\xC7\x69\x98\x0D\x2B\xCC\x48\x22\x44\x3C\x1C\x13\xF5"
+ "\x62\x06\x12\x70\x01\x27\x84\xBB\xD2\xE3\xF4\xBF\xC4\x07\x59\x45\x3E\x69\x0D\xF8\x00\x00\x00\x00\x49"
+ "\x45\x4E\x44\xAE\x42\x60\x82"
+ },
+
+ {
+ 807,
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x20\x00\x00\x00\x20\x08"
+ "\x06\x00\x00\x00\x73\x7A\x7A\xF4\x00\x00\x00\x06\x62\x4B\x47\x44\x00\xFF\x00\xFF\x00\xFF\xA0\xBD\xA7"
+ "\x93\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0B\x13\x00\x00\x0B\x13\x01\x00\x9A\x9C\x18\x00\x00\x00"
+ "\x07\x74\x49\x4D\x45\x07\xD6\x02\x02\x07\x1F\x12\xE3\xD6\xA7\x2A\x00\x00\x02\xB4\x49\x44\x41\x54\x58"
+ "\xC3\xC5\x97\x3D\x6F\x14\x31\x10\x86\x9F\xDD\x1C\x11\x49\x41\x40\x24\x05\x12\x50\x22\xD1\x11\xE9\x10"
+ "\x91\x68\xE8\xE9\x40\x8A\x44\x49\x45\x89\xF8\x0B\x94\x74\x40\x8B\x52\x52\x44\x54\xFC\x0A\x8A\x88\x34"
+ "\x54\x74\x40\x83\x42\x8A\x84\x48\x24\x7B\xF6\xCC\x50\xEC\xC7\xD9\xDE\xDB\xDB\xCB\x87\x12\x4B\xD6\x8C"
+ "\xD7\x5E\xBF\xEF\xBE\x1E\xDB\x3B\x99\x99\x71\x91\x25\x03\x58\x7B\xF7\x63\xD5\x54\xAE\x49\x71\x94\xAB"
+ "\x08\x2A\x8A\x7A\x45\x7D\xE5\x87\x6D\xAF\xA8\x96\x56\xBC\xA0\x62\x98\x57\x54\x24\x7A\x47\x44\x50\x6F"
+ "\xA8\x48\xD9\xDF\x8C\x71\x7B\xBA\xFD\x62\x1B\x50\xC0\xB2\xB5\xF7\x3F\x9F\x67\xF9\xDC\xC6\xCA\xD2\x3C"
+ "\xE2\x15\x71\x56\xDA\xAA\x7A\x57\xFB\x86\x38\xC5\x7B\x45\xEA\x67\x4E\xF1\xDE\x1A\x3F\x1A\xEF\x0C\xDF"
+ "\x00\x2B\xA6\x8A\x3A\x8F\x16\x3B\x58\xB1\xF3\x92\x6F\xAF\x3E\x00\x47\x83\x2C\x9F\xDB\xB8\x7F\xE7\x2A"
+ "\x37\xAF\x2F\xE2\x1C\x38\x07\xA3\x51\x5C\x8B\xD0\x2F\x12\x3B\x82\x51\x51\xB6\x1B\x7F\x04\x2E\x03\x67"
+ "\xA0\x19\x70\xA9\xD2\x5B\x95\xEC\xF0\x0B\x36\x6F\x6F\x81\xCF\xC0\xEF\x1C\x18\x83\xFB\x92\x80\xF7\xE0"
+ "\x65\x5C\x25\xA8\xAA\x20\x5A\x5A\x55\xD0\xEA\x99\x5A\x6C\x4D\xA1\x15\x5E\x79\x4E\x66\xCB\x75\x6B\x19"
+ "\xB8\x3C\x80\xF2\x4B\xBC\x2F\x09\x84\x56\x7C\x0C\xDE\x90\x90\x92\x44\x44\x48\xDA\x84\x7A\xE2\x7B\x1E"
+ "\x98\x1B\x00\x3C\xBC\x11\x7C\x41\x3D\xA9\x8C\x27\x96\x29\x35\x55\xC8\xD7\xE4\xC5\x10\x81\x7A\x97\x95"
+ "\xC6\x28\x76\x17\x79\xF3\x71\xCC\x62\x80\xC1\xA3\xDB\xFD\xDB\x65\x73\x0B\x9E\x3D\xE8\x1F\x67\x66\x98"
+ "\x81\xAA\x55\xBE\x55\x7E\xD9\xF7\x77\x7F\x21\x22\x90\x9F\xE5\x39\x30\x09\xDC\xAA\xA5\x08\xC9\x44\x61"
+ "\x71\x56\x04\xBA\xC0\xE3\xB6\xA1\xAA\x09\x01\xB5\x73\x04\xA7\x4D\x80\x53\x2A\xD0\x2D\x7B\x1B\xFC\xD8"
+ "\x4B\xB0\xB9\x75\x72\xF0\x38\x08\x39\xFE\x12\xCC\x0A\x1E\x7F\x69\x0A\x4E\x6B\x8C\xC8\x0C\x0A\xF4\x83"
+ "\xD3\x01\x36\xAD\x5D\xAB\x15\x2B\x30\x48\x15\x48\xC1\xC3\x76\xDC\x97\xD5\x97\x69\x54\x1E\xDF\x2D\x3A"
+ "\x95\x50\x9D\xB4\x04\x81\x02\x7D\x5F\x3E\x5B\x50\x4E\x57\xA2\x15\x84\xE8\xD9\xFE\x90\xF4\x2D\xCB\x54"
+ "\x05\xD6\x87\xA7\x27\xD0\x1B\x13\xD2\x8A\x81\x78\x82\xF5\x61\xBC\x14\xEB\xC3\x72\xD2\x4F\x5F\x33\x9E"
+ "\xDC\x93\x68\x4B\xA5\xE7\x7C\xDA\xEE\x22\xD3\xBB\x0B\x42\x25\xC2\x97\xDA\xE0\x74\x82\x77\x6E\xCD\xF4"
+ "\x17\xA1\xEB\x20\xAA\x49\xD4\x13\x85\x7E\x7A\xB8\x1C\x47\x89\xB4\x0C\xBA\x0E\x22\x55\xE3\xE9\x6A\xFC"
+ "\x62\x37\xF8\xEC\x4A\xA4\x12\x4C\xBC\x0B\x26\x5D\x2A\xE3\x08\x3F\xB9\x12\x93\x97\x20\x51\xA0\xEB\x46"
+ "\x0B\xF7\xF8\x49\xC1\x75\x82\xDA\x51\x0C\x4C\xBB\x4E\x27\xF5\x4F\x03\x4F\xC7\xD4\xFD\xA9\xE2\x03\x53"
+ "\xE3\xE0\xE0\x1F\xAA\xDA\x1C\x95\x56\xD9\xB2\x5D\xFA\x6B\x2B\xC6\xEE\x9F\x8E\x31\x16\x3C\xAF\x40\x1A"
+ "\x98\x70\xD9\xCD\x70\xDE\x27\x04\xCC\x18\xBE\xFE\xDE\x24\x10\xEA\x05\x49\x33\x9D\x30\xE3\x09\x33\xA6"
+ "\xA4\x2F\x3D\x64\x66\x4D\xCD\xAE\x00\xB7\x80\xA5\x73\x4E\x0B\xF7\x81\x5F\x75\xDE\xB2\x10\xE4\x2F\xE7"
+ "\x55\x1C\x70\x98\x5D\x74\x76\x9C\x73\xC1\xE5\x3F\x07\xB4\x49\xC3\x70\xE9\xD2\x77\x00\x00\x00\x00\x49"
+ "\x45\x4E\x44\xAE\x42\x60\x82"
+ }
+};
+
+
+
+
+const QPixmap * KCHMIconStorage::getApplicationIcon( )
+{
+ static const char png_image_cr64_app_kchmviewer[] =
+ {
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x40\x00\x00\x00\x40\x08"
+ "\x06\x00\x00\x00\xAA\x69\x71\xDE\x00\x00\x14\xD6\x49\x44\x41\x54\x78\x9C\xED\x9B\x79\x78\xDC\xD5\x75"
+ "\xF7\x3F\xBF\x75\x34\xA3\x7D\x1B\x8D\xB6\xB1\xB5\xDA\x92\x6D\xC9\xC6\x2C\xC6\x16\x18\xB3\xC5\x35\x18"
+ "\xE2\x40\x5E\x0C\x4D\xC3\x9B\x14\x1B\x4C\x20\x4D\x9A\xC4\x6F\x13\x20\xD0\x82\x29\x10\x9A\xBC\x49\x4A"
+ "\x59\x42\xCA\x03\x26\x90\x02\x65\x09\x4D\x42\x48\x0B\xF1\x46\x08\x8B\x17\x24\x2F\xB2\xB1\x6C\x6B\x97"
+ "\x46\xDB\x68\x66\x34\x33\xBF\xED\xF6\x8F\xD1\x4C\x24\x4B\x36\x98\xC5\xEE\xD3\xE4\x3C\xCF\x7D\x7E\x9A"
+ "\xAB\x3B\xF7\x77\xBF\xDF\x73\xEE\x3D\xE7\xDC\x7B\x47\x12\x42\xF0\xA7\x2C\xF2\xA9\x1E\xC0\xA9\x96\x3F"
+ "\x13\x70\xAA\x07\x70\xAA\xE5\xCF\x04\x9C\xEA\x01\x9C\x6A\x51\x4F\xD5\x8B\xAF\x7E\xF0\x16\xD1\x31\xDC"
+ "\x43\xA5\xB7\x8C\x98\x69\xF0\xCC\xBA\x7B\xA4\x53\x31\x0E\xE9\x54\xB8\xC1\x0B\xEF\xBF\x51\x84\xCC\x18"
+ "\x92\x92\x30\x40\x55\x80\x25\x1C\xAA\xBD\x7E\x82\x91\x51\x5E\xBE\xF9\xFB\x27\x8D\x8C\x93\x4E\xC0\x17"
+ "\x1F\xFD\xAE\x38\x12\x0C\x10\xB7\xCD\x69\xFF\xEF\xD8\x36\x42\x38\x54\x15\x96\x33\x12\x1E\xE1\x95\xAF"
+ "\xFF\xF3\xA7\x4A\xC6\x49\x25\xE0\x33\x3F\xFA\x1B\x11\x8C\x45\x4E\xE8\x3B\x8E\x63\x53\x94\x91\xC3\x68"
+ "\x6C\x8C\x4D\xDF\x7C\xF8\x13\x27\xE3\xA4\x10\x70\xFB\x4B\x0F\x8B\xD7\x0F\x6C\xC7\x70\xEC\x63\xB6\x39"
+ "\xAF\xE4\x1C\x7E\xD7\xBD\xE5\xD8\x9D\x08\x81\x61\x19\x78\x33\xF3\x98\x91\xE7\xA3\xA2\xA0\x84\xBF\x5B"
+ "\x7E\xED\xC7\x26\xE4\x53\x27\xE0\x8E\x5F\x3C\x22\xB6\x1E\xDC\x45\xD8\x8C\x4F\xAA\x6F\x2A\x6A\x62\x56"
+ "\x7E\x25\xA7\xF9\x67\x93\x91\xAE\xA2\x28\x12\x86\xE1\x10\x0C\x19\xEC\xE8\x68\xE5\x77\x5D\x9B\x69\x8F"
+ "\xB4\x1F\xB3\x5F\xDB\xB6\xC9\xF6\x64\x52\x94\x99\x4B\x45\x41\x09\x77\x5D\x76\xFD\x47\x22\xE3\x53\x25"
+ "\xE0\x9A\x47\x6F\x15\xE1\x78\x94\xFE\x48\x30\x55\xE7\x4F\xF7\xB3\x76\xDE\xFF\xA5\xAE\x26\x0F\x6F\x81"
+ "\x1B\x01\x98\x8E\xC0\x72\x40\x95\x40\x96\xC0\xB2\x1C\x3A\xBA\x43\xBC\xDE\xD2\xCC\xC6\x03\x4F\x7E\xA8"
+ "\x77\xA5\xA9\x3A\xF9\xE9\x59\xD4\x14\x96\x71\xCF\xE7\x6E\xFA\xD0\x64\x7C\x6A\x04\xAC\xF8\xF1\xDF\x88"
+ "\x81\x48\x08\x59\xFE\x63\xA8\x51\x9E\xEE\x67\xFD\x92\xEB\x99\x57\x97\x8F\x29\x60\xF7\x90\x43\x73\xBF"
+ "\xCD\x60\x54\x60\x3B\x02\xC7\x71\x28\x4E\x97\x58\x50\xA4\x52\x9D\xAD\x10\x8B\x99\xBC\xB7\x27\xC0\x4F"
+ "\x9A\x1F\x3F\xAE\x35\x1C\x2D\x8A\x24\x53\x94\x99\x83\x37\x23\x97\x87\xBE\xF0\xED\xE3\x92\xF1\xA9\x10"
+ "\xF0\x97\x3F\xBD\x4D\xB4\x0D\xF6\x30\xB1\x67\x7F\xBA\x9F\x6F\x2C\x5E\xC3\xFC\x39\x85\x74\x46\x04\x2F"
+ "\xBD\x6F\x23\x0B\x41\x45\xB6\x44\x96\x4B\x42\x08\x30\x6D\x41\x67\xD0\x64\x4F\x6F\x1C\x5F\xA6\xCC\xE7"
+ "\xEB\x3C\xB8\x25\xC1\xCE\xE6\x3E\x6E\x7F\xFB\xAE\x13\x1A\x83\x5B\xD5\x09\xC7\xA3\x28\x48\xD4\xFB\x66"
+ "\x12\x37\x0C\x7E\x76\xFD\x5D\x53\xC8\xF8\xC4\x23\xC1\x55\x0F\xAD\x17\x9D\x23\x01\x8E\xA6\xF5\xA2\x19"
+ "\xE7\x31\x77\x76\x01\x47\x46\x05\x4F\x34\x9B\x64\xAA\x82\xD2\x0C\x89\x98\x25\xC8\x70\x49\x54\xE7\xAB"
+ "\x54\xE5\x29\xCC\xF6\x6A\x34\x96\xE8\x74\x0F\x9B\xFC\x60\xDB\x30\x11\x4B\x50\x5D\x99\x47\x93\xB7\xE9"
+ "\x84\xC6\x21\x84\xC0\xAD\xB9\x90\x25\x99\x5D\x1D\x07\xD8\xDB\xDD\x36\x6D\xBB\x4F\x94\x80\x73\xEF\x5F"
+ "\x2B\x42\xF1\x28\x71\xDB\x9A\x54\x5F\x9E\xEE\x67\xD9\x9C\x06\x0C\x07\x9E\xDE\x6B\xE0\x92\x05\x63\x86"
+ "\x43\x67\xD0\xA2\x63\xC4\x44\x41\xE0\xCF\x52\xA8\xCE\xD3\x58\x52\x9E\xC6\xC5\xD5\x1E\x72\xDD\x12\x9D"
+ "\x83\x06\x8F\xBF\x1B\xC4\xE3\xD1\x58\x39\xEB\xA2\x0F\x3D\x0E\x21\x04\x63\x46\x9C\xB1\x78\x94\x98\x11"
+ "\x07\xDB\x61\x49\xC9\xDC\x69\xDB\x7E\x22\xA1\xF0\xB7\x5F\x78\x40\x6C\x3D\xB8\x0B\xD3\x71\x30\xE2\xD1"
+ "\x29\xFF\x3F\xAF\xE4\x5C\xBC\x85\x1E\xDE\xE8\xB6\xE8\x0B\xDA\x64\xBA\x60\x28\xEC\x60\xDB\x89\xB2\xB1"
+ "\x37\xC4\x93\xF1\x28\x39\x6E\x85\x2F\x34\x15\x53\x59\x98\x86\x57\xB7\x11\xB6\xCD\xAB\xBB\x83\x7C\xA6"
+ "\xCA\x43\x41\xBE\x87\x25\x85\x4B\xD8\x16\xD8\x76\xCC\x71\x38\x8E\x83\x65\x5B\x38\x8E\x83\x00\x6C\xCB"
+ "\x42\x43\xE6\xA6\x33\x3F\x4B\x55\xBA\xF7\x93\x25\xE0\xAF\x37\x6E\x10\x03\xA1\x21\x86\xC6\x42\x48\x80"
+ "\xE9\x38\xC7\x6C\x3B\xAF\xB8\x1A\x24\x89\x37\xDB\x0D\x42\x51\x8B\xD1\x31\x1B\xDB\x72\xB0\x1D\xB0\x6D"
+ "\x07\xCB\x12\x58\xB6\x8E\x3D\xEA\x30\xA7\xD7\xA0\xB2\x30\x0D\x33\x6E\xD2\x39\x10\x63\x2C\x66\xB1\x69"
+ "\xFF\x28\x57\x9D\x96\x8B\x24\x1F\x7F\x71\x8F\x1A\x71\x04\xA0\x4A\x32\xA5\xD9\xF9\xF4\x0D\x07\xF8\xFA"
+ "\xA2\x2B\x99\x5B\x54\x81\x6D\x4F\x1F\x83\x9C\x10\x01\xAB\x1F\xF9\x8E\x70\x69\x3A\x6D\x03\xDD\xE4\xB8"
+ "\x33\x18\x33\x63\xB8\x54\x17\x61\x63\xAA\xD6\x27\x4A\x9A\xAE\x62\x5A\x0E\xFB\x3A\x47\x39\xD2\x3D\xC0"
+ "\x58\x38\x0C\x8A\x42\xF5\x4C\x2F\x67\x56\xE7\x91\xA1\xCB\x38\x42\x90\xE7\x51\x58\x52\xE1\x01\xA0\xB3"
+ "\x3F\xC2\xC0\xF0\x18\xB6\x69\xB2\xB7\x43\x41\xCC\xCF\x63\x69\x71\x13\x5B\xFB\xB6\x4E\xFB\x0E\xC3\x32"
+ "\x11\x80\x5B\xD5\xA8\xF2\x96\x13\x18\x19\xE0\x96\xA5\x5F\x60\x56\xA1\x1F\x4D\xD3\x30\x0C\xE3\xA3\x11"
+ "\x70\xD5\x23\xDF\x16\x8A\xAC\xD0\x3E\xD4\x8B\x47\xF7\x50\x90\x99\xCB\xDC\x92\x2A\x0E\x0E\x76\x12\x8A"
+ "\xC7\x26\xB9\xB9\x63\x8A\x04\xA6\x29\xE8\xEA\xEC\xA3\xAD\x75\x3F\x66\x3C\x4E\x5D\x6D\x31\x8F\x5D\x73"
+ "\x26\x59\x69\x93\x87\x60\x5A\x36\x4F\xBF\xD6\xC6\xB3\xBF\xEF\x26\x14\x1D\xC3\x8E\xC7\x08\x79\xCB\xB1"
+ "\x8F\x63\x61\xB6\x63\x63\x58\x26\x85\x19\x39\xCC\xC8\x2B\xA6\x77\x24\xC0\xD7\x16\x5D\xC1\xEC\xA2\x19"
+ "\xE8\xBA\x8E\x6D\xDB\x27\x66\x01\xCB\x6E\xFF\x92\xC8\xF7\x15\x71\x64\xA4\x17\x5D\xD1\xC8\x72\x67\x50"
+ "\x94\xED\x45\x96\x24\x4C\xC7\xA2\xB9\xE7\x20\xB6\xE3\x7C\x38\xF0\x40\xDC\xB0\x91\x10\xE8\x56\x0C\x47"
+ "\xC8\x08\x49\xA3\xC6\x97\x4D\x56\x9A\x4A\x4B\x5B\x80\xEF\x3F\xF3\x2E\x48\x32\xC3\x11\x83\x3D\x5D\x63"
+ "\x0C\xC6\x24\x6C\xDB\xC6\x32\xE3\x20\xC9\xE4\x6A\x89\x38\xA1\x2D\x78\x28\xD5\xA7\x61\x99\xD8\x8E\x83"
+ "\xED\x38\x68\x8A\xC2\x2C\xAF\x9F\xFC\x8C\x1C\x06\x42\x43\x7C\xF5\xAC\x55\xD4\xF9\x66\xE2\x76\xBB\x91"
+ "\x24\x89\x48\x24\x82\x24\x4D\x3F\x7D\xA6\x10\xB0\xF0\xA6\x55\x22\x3E\x16\x23\x22\x2C\xD2\xB3\x32\x90"
+ "\x65\x19\xD3\xB6\x08\xC5\x22\xC8\x92\x44\x30\x1A\x42\x92\xE5\x29\x6E\xEE\x78\xB2\xBB\xEF\x7D\xAA\x2A"
+ "\xCE\xA0\xAE\x30\x8D\xDD\x87\x34\x4C\x4B\x66\x6F\x67\x84\xA7\xB6\x1C\xE6\x3F\xDF\x6E\xE7\xE5\x7D\x63"
+ "\x64\x67\xB8\x18\x8D\x98\x98\xA6\x8C\xAC\xC8\x80\x84\x63\x38\xC8\x8E\xCD\x7C\x7F\x16\xB1\x98\xC5\x91"
+ "\x50\x07\xB6\x63\x13\x1D\x37\x67\x59\x82\x92\xEC\x7C\x66\xE4\x15\xA3\xC8\x32\x31\xD3\x60\xED\x69\x97"
+ "\x30\xA7\xA4\x12\x8F\xC7\x83\xA2\x28\xC4\xE3\x71\x2C\xD3\xE4\xF9\x6D\xBF\xE1\x95\x0D\xEB\xC5\xE6\x8D"
+ "\xBF\x98\xC4\xC4\x14\x02\xFE\xE2\xF4\xA5\xFC\x62\xF3\xAB\x44\xBB\x87\x70\x10\x28\x1E\x1D\x59\x92\x13"
+ "\x9D\x59\x06\xBA\xA2\x61\x8B\x63\x9B\xE3\x74\x72\x60\xE8\x10\xA1\xF0\x7C\x56\xCC\x2F\xE2\x85\x37\x0F"
+ "\x21\x29\x3A\x57\x2D\xAD\xE4\xAA\x25\x33\x58\x5C\x5F\x84\xFB\xD9\xDD\x78\xF3\x33\xE8\xEE\x19\xA6\xA1"
+ "\xBE\x98\xE1\x91\x08\xC2\x81\x07\x7F\xB1\x07\xB7\xE5\xB0\x68\x8E\x8F\x60\x30\xC6\xBE\xA1\xFD\x44\x0D"
+ "\x03\x09\xF0\x66\xE5\x32\x23\xCF\x87\x5B\x73\x01\xE0\x52\x34\xAE\xA9\x3F\x8F\x2A\x6F\x19\xE9\xE9\xE9"
+ "\x68\x9A\x86\x69\x9A\xA9\xF2\xDE\xFE\xBD\xB4\xB4\xEE\xE3\xF3\x37\x7C\x51\x3C\xFB\xD0\x13\x29\x12\xA6"
+ "\x10\x70\x79\xFD\x12\xD4\xC1\x28\xCF\xEF\xDE\x42\xA4\x6B\x00\xAD\x38\x07\x2D\x3D\x0D\xC9\xB1\xD0\xD5"
+ "\x13\x07\x0F\xB0\xAD\x7F\x2B\x97\xF4\x5C\xC0\x6C\x7F\x2E\x2B\xEA\x0B\x78\xFE\xBD\x01\xFE\xEB\xED\x1E"
+ "\xCE\x2E\x4F\x67\xD3\xCE\x2E\x46\x47\x63\x0C\x0C\x45\xF9\xED\x7B\x83\xF4\x8D\x18\xBC\xDF\x13\x41\x96"
+ "\x04\x66\x70\x84\x6F\x5D\x75\x3A\xAA\x2C\xB3\xA3\xBD\x85\xEE\x58\x17\x33\xF2\xBC\x94\xE6\x14\x91\xA6"
+ "\x6A\x00\x08\x20\x43\x77\xF3\x7F\xEA\xCE\xC1\x97\x53\x40\x7A\x7A\x3A\xBA\xAE\x27\x5C\xA2\x65\x61\x9A"
+ "\x26\x3F\x7D\xE5\x59\x5E\x7B\x6B\x1B\xB3\xCA\x67\x32\x11\x3C\x4C\x13\x0A\xEF\xD8\xB1\x43\xEC\xDA\xB5"
+ "\x8B\x8E\xA1\x3E\x9E\xDB\xBB\x19\xCD\x9B\x8D\x93\xAE\xA1\x8F\xBF\xF0\xA3\x4A\x93\x77\x09\xAB\x17\xAE"
+ "\x44\x4F\x53\xB8\xF5\xE1\x2D\x6C\x3E\x1C\xC6\x96\xD3\x41\xD6\x40\x52\x10\x88\xC4\xB4\x12\x02\xEC\x38"
+ "\x52\x28\xC0\x0D\x17\xD7\x72\xCD\xF2\x06\x02\x81\x51\x5E\xED\xF8\x25\xA6\x16\x45\x91\x26\x4F\xBF\x0C"
+ "\xDD\xC3\x17\x1A\x2F\x20\xD7\x93\x99\x02\x2F\x84\x20\x1E\x8F\x13\x8E\x44\xB8\xEF\x99\x47\xF8\xB7\x57"
+ "\x5F\xA6\x3A\xB7\x98\x2D\x4F\xBE\xFC\xC1\xA1\xB0\xA2\x28\xA4\xA5\xA5\x51\x9A\xE7\x65\x46\x4D\x15\x66"
+ "\x9A\xFC\xB1\xC1\x03\x6C\xED\xDF\xC6\x1B\xAD\xEF\x61\xC6\x6D\xEE\x5C\x73\x0E\x37\x9C\x5B\x4E\x8E\x39"
+ "\x00\xD1\x41\x84\x15\x06\x2B\x0A\xF1\x51\x9C\x91\x2E\xFC\xD2\x10\xFF\x78\xED\x19\x5C\xFD\x99\x79\x0C"
+ "\x0F\x8F\xD1\xDC\xBF\x1D\xD2\x4C\x34\x45\x45\x96\x65\x94\xF1\x92\xEB\xCE\xE4\x4B\x0B\x97\x53\x90\x99"
+ "\x43\x66\x66\x26\x2E\x57\x62\x3A\x24\x35\x7F\xDF\xBF\x3F\xCA\x73\x5B\x7E\x43\x65\x51\xE9\xB4\xE0\x61"
+ "\x1A\x0B\x68\x6E\x6E\x16\x2D\xAD\x7B\x79\xA6\xE3\x4D\xDA\x22\x01\x34\x45\x45\x55\x94\x8F\x4D\x00\x80"
+ "\x2A\x2B\xAC\xAE\x58\x4D\x43\xF9\x2C\x72\xB3\x3D\x84\xA2\x26\x6F\xB5\x74\xD0\x7A\x64\x90\x48\xCC\x20"
+ "\x37\xD3\x4D\x63\x8D\x8F\xFA\x4A\x2F\x8A\x24\x11\x18\x18\x65\xEF\xE0\x0E\xFA\x95\xEE\x29\x7D\x65\xBA"
+ "\x3C\x5C\xD3\x78\x01\xF9\x99\x39\x68\x9A\x86\xAE\xEB\x00\x98\xA6\x89\x61\x18\xDC\xF1\xF3\x07\xF8\xF7"
+ "\xCD\xBF\xA1\x32\xC7\xC7\xEF\x1E\xF8\xB7\x63\x46\x50\x53\x08\xD8\xF8\xFA\x4B\xE2\xB1\x77\x5E\x21\x10"
+ "\x1D\xE5\x92\x79\x8B\x29\xC8\xC8\xC5\x76\x6C\x5E\xD8\xB5\xE9\x84\x01\x97\xE7\x78\xB1\x1C\x1B\x5D\xD1"
+ "\x90\x25\x89\xB8\x6D\x11\x33\xE3\x14\xB9\x8A\xF9\x6C\xF9\x4A\xB2\xB2\xB3\xF0\x78\x74\x54\x55\x46\x92"
+ "\x24\x6C\xDB\xC1\x30\x6C\xC2\xE1\x18\x5D\x23\x9D\x74\x59\xEF\x33\x26\x87\xA7\xF4\x9B\xE3\xCE\xE0\xEA"
+ "\xC6\x0B\xC8\xCD\xC8\x42\xD3\x34\x34\x4D\x43\x08\x81\x6D\xDB\x18\x86\xC1\x6D\x3F\xFF\x31\x2F\xFD\xFE"
+ "\x35\x1A\x7D\x95\xBC\x78\xF7\x23\x1F\x3E\x1D\xBE\xF2\x1F\x6E\x12\x1D\x5A\x84\xA8\x65\xB2\xFE\xA2\xBF"
+ "\x64\x65\xC3\x39\xC4\x6D\x13\xD3\x36\x89\x9B\x26\x71\xCB\xC4\xB0\x12\xCF\xB8\x6D\x10\x33\x0D\xE2\x66"
+ "\xE2\x19\xB3\xFE\xF8\x39\x6A\xC6\x13\x6D\x6D\x13\x47\x38\x48\x48\x28\x92\x82\xAA\x28\xE8\xAA\x86\xAE"
+ "\xA8\x08\x40\x31\x5C\xB8\x9C\x4C\x90\x13\xE9\xB0\xE3\x38\x18\x66\x94\x90\x33\x44\x4C\x9D\x3E\xBA\xCC"
+ "\x73\x67\xB1\x7A\xFE\xF9\x64\xA7\x67\xA2\xEB\x3A\x8A\xA2\xA4\xC0\xC7\x8C\x38\xDF\x79\xFA\x87\xBC\xF2"
+ "\xCE\x16\xCE\xF2\xD7\xF3\xB3\x5B\x7E\xF0\x81\x1B\x23\x29\x2F\xB0\xE6\x9F\x6F\x13\xDD\xAE\x18\xB9\xEE"
+ "\x2C\xCE\x2A\xF2\x73\x69\xC3\x39\xA4\x69\x3A\xAA\xA2\x60\xDA\x2A\xBA\xAA\x93\x66\x99\x18\xB6\x85\x61"
+ "\x99\x58\xB6\x8D\x61\x9B\x98\xB6\x8D\xE5\x24\x8A\x6D\xDB\x38\xC2\xC1\x11\x02\x21\x04\x0E\x89\x40\xC5"
+ "\x1C\xFF\x9E\x69\xDB\x58\xE3\xED\x4D\xDB\xC2\x52\x6C\xA2\xF6\x20\xB6\xB0\xB1\xC7\xFB\x70\x64\x07\xC7"
+ "\x71\x50\x44\x62\x61\x9C\xB8\xE2\x15\xA4\x67\x73\x55\xE3\x32\x32\x3D\x19\xE8\xBA\x8E\x2C\xCB\x89\xF7"
+ "\x38\x0E\x51\x23\xCE\x37\x9E\xF8\x1E\x9B\x5A\xDE\x61\xD9\xAC\xD3\xF9\xC9\xDF\x6E\xF8\x50\xBB\x42\x92"
+ "\x10\x82\x3B\x5F\x7E\x54\xEC\x68\x79\x0F\x6F\x89\x8F\xE2\x7C\x2F\x08\x90\x65\x99\xAA\xC2\x52\x1A\x4A"
+ "\xAB\xA9\xF2\x96\x21\x23\x25\x40\x3A\x0E\xF6\xF8\xD3\xB4\xAD\x14\x78\xCB\xB1\x31\x2D\x6B\x52\x9D\x69"
+ "\x8F\x7F\x1E\x7F\x9A\x13\xC1\x3B\x09\x32\x4C\xDB\x4A\x81\x4F\xD6\x39\xC2\xC1\x1A\x7F\x8F\x23\x12\x99"
+ "\x5D\xA1\x27\x9B\xCF\x37\x9E\x47\x86\x3B\x7D\x8A\xE6\xA3\xF1\x18\x5F\x7B\xE2\x7B\x6C\xDE\xF3\x0E\x0B"
+ "\x2A\xEB\x78\xF6\x6F\xFF\xE9\xC4\xB6\xC4\x56\x3F\x7A\xAB\xF8\xBC\xFF\x6C\xAA\x4B\xFD\xF4\x47\x47\x39"
+ "\x38\xDC\xC5\x60\x3C\x82\x23\x01\x08\xD2\x34\x17\xF5\xC5\x33\x99\x57\x52\x85\x37\x2B\x0F\xC7\x71\xB0"
+ "\x85\x9D\x1A\xA4\x95\xB2\x02\x6B\x1C\xD4\x44\x02\xEC\x14\x01\x96\x93\x24\x61\x62\xFD\x64\xF0\xB6\xE3"
+ "\x60\x39\x16\x51\x33\x8E\x69\x5B\x08\x21\xF0\xE7\x14\xB1\xA2\x6E\x11\x99\x9E\x44\x80\x33\x51\xF3\x91"
+ "\x78\x94\x9B\x1F\xBF\x87\x3F\xB4\x36\x53\xEE\x2B\x61\xC8\x19\x63\x46\x9E\x8F\x17\xD6\xDD\xF7\xE1\x2D"
+ "\xE0\xC6\xA7\xEF\x13\x4D\xDE\xD9\x9C\x35\x73\x4E\x02\x9C\xE3\x30\x10\x1E\x66\xDF\x40\x17\x81\x78\x10"
+ "\x74\x05\x21\x12\x1B\x0D\xF9\xE9\x59\xD4\x17\x57\x50\x5F\x52\x41\x86\xCB\x93\xD2\xB0\x2D\x9C\x09\x44"
+ "\x24\xC0\x25\x48\x70\xC6\xFF\x4E\x80\x4D\x12\x61\xD9\x36\x66\xB2\x9D\x6D\x4F\xB2\x9C\xD1\x68\x84\x88"
+ "\x11\x43\x08\x87\xCA\xDC\x62\x96\xD7\x2D\xC2\x9D\x96\x86\xAE\xEB\xA9\x98\xDE\x71\x1C\xC2\xB1\x31\xBE"
+ "\xFA\xC4\x3D\xBC\xB9\xBF\x99\xD5\x8B\x97\x73\x56\xDD\x7C\x9E\x79\xE7\xB7\x6C\x6F\xDF\x4F\xB6\xDB\xC3"
+ "\x96\x6F\xFD\xE4\x03\x49\x90\x84\x10\x2C\xFB\xE1\x8D\xE2\x8A\xDA\x26\xAE\x5C\x70\x3E\x96\x65\x61\x59"
+ "\x56\x62\x45\x35\x4D\x02\xC1\x61\x76\x76\xB4\x72\x60\xB8\x1B\x27\x4D\x21\x3F\x27\x8F\x0C\x3D\x0D\x21"
+ "\xA0\x34\xB7\x90\xBA\xE2\x0A\x2A\x0B\x4A\xD0\x15\x15\x63\x7C\x33\x22\x01\xD0\x99\x6A\x15\xC2\xC2\xB2"
+ "\x8E\x9A\x1E\xE3\x6D\xCD\xF1\x76\xFD\xA1\x61\x82\xD1\x30\x42\x08\x6A\x0A\xCA\xB8\x78\xD6\x19\xB8\x5C"
+ "\x2E\x34\x4D\x4B\x81\x17\x42\x10\x1C\x0B\x73\xE3\xE3\x77\xB3\xF3\xD0\x3E\xFE\xAA\x69\x25\x8B\x66\x37"
+ "\xE2\x52\x35\xDC\xBA\x8B\x97\x77\x6D\xE1\xB9\xED\xAF\x53\xE5\x2D\xE1\xC5\x75\xF7\x1F\x97\x04\x15\xC0"
+ "\x97\x91\x4F\xC8\x8E\xE1\x76\xBB\x13\x59\xD8\x38\x01\xBA\x65\xE1\x4E\x4B\xA3\x24\xBF\x90\x68\x3C\xC6"
+ "\xEE\x8E\xF7\x79\x7D\xFF\x76\xDE\x89\x0E\x92\x9D\x97\xCB\xE0\xD8\x08\x5D\x23\x01\x74\x45\xA5\xA2\xA0"
+ "\x94\x7A\xDF\x4C\x7C\xD9\xF9\xA8\x8A\x82\x25\x27\xAD\x41\xC1\x56\x6C\x54\xDB\xC2\xB2\xD5\xF1\x7A\x0B"
+ "\xCD\x56\x53\x5A\x37\x6D\x0B\xDD\x51\x69\x1F\xEA\x23\x14\x1B\x43\x96\x24\x6A\x0B\xFD\x5C\x50\xBB\x10"
+ "\x97\xCB\x85\xAA\xAA\x29\xB3\x07\x08\x8E\x85\xB9\xFE\xF1\xBB\x68\x39\x72\x90\x35\xE7\x5F\xC1\xA2\x59"
+ "\x8D\xE8\xAA\x86\x4B\xD5\x71\xA9\x1A\x5F\x5E\x72\x19\x95\x85\xA5\x7C\xFF\x3F\x9F\x66\xF1\xF7\xD6\x8A"
+ "\x37\xBE\x75\x6C\x57\x28\x09\x21\x78\x78\xCB\x8B\x62\x77\xC7\x7E\xEE\xBF\xF2\x6B\x29\xF0\x49\x22\x92"
+ "\x31\xB5\x6D\xDB\x98\xA6\x89\xE3\x38\xF4\x0C\x05\x78\xA3\x75\x27\x9B\x0F\xEF\x22\x28\x1B\xF8\x0A\xBC"
+ "\x54\x15\x96\x51\x98\x91\x4B\xBA\xCB\x4D\x75\x61\x19\xB5\x3E\x3F\x39\xEE\x8C\xD4\xB4\xF8\xE3\x5A\xE1"
+ "\x60\x0B\x0B\xD3\x1A\xB7\x0E\x27\x51\xB7\xBF\xAF\x9D\xDE\xD1\x21\x24\xA0\xB6\xA0\x8C\xF3\x6B\x17\xA2"
+ "\x69\xDA\x14\xF0\x43\xE1\x20\x6B\x1F\xDF\x40\x6B\xD7\x61\xAE\x3F\xFF\x0A\xCE\xAE\x69\xC4\xA5\xE9\xE8"
+ "\x8A\x8A\x4B\x4D\x84\xEC\x09\x32\x34\xDE\x38\xD8\xCC\xB7\x5F\xFC\x17\x14\x59\xE6\xE2\xFA\xB3\xD8\x70"
+ "\xF9\xBA\x29\x44\xA4\xE2\x80\x6B\x1F\xBB\x43\x3C\x76\xED\x77\x71\x1C\x27\x55\x6C\xDB\x4E\x11\x90\x7C"
+ "\x4E\x24\x68\x2C\x16\x65\xD7\xA1\x7D\xFC\xAE\x75\x3B\xCD\x43\xED\xA8\x99\x2E\xAA\x8B\xFC\xD4\x7A\xFD"
+ "\x78\xF4\x34\xF2\xD2\xB3\xA9\xF1\x96\x51\x51\x50\x82\xAE\x68\x18\xB6\x99\xF2\x20\x29\xD7\xE9\xD8\xB4"
+ "\x74\xB7\xD1\x31\xD4\x07\x40\x6D\x41\x39\x4B\xAB\xE7\xE3\x72\xB9\x50\x14\x65\x12\xF8\xC1\x70\x90\xB5"
+ "\x4F\x6C\xE0\x40\x6F\x07\xEB\x97\xFF\x15\x8B\xAA\x1B\x52\xB1\x85\x26\x2B\xA8\x8A\x8A\xA6\x28\x68\x8A"
+ "\x06\x08\x0E\x0F\xF4\xF0\xC0\xA6\xE7\x18\x8C\x04\xE9\x09\x0E\xB0\xB4\x76\x01\x77\x5C\xBA\x76\xFA\x64"
+ "\x68\xF5\x4F\xBE\x23\x9E\xBA\x6E\x03\xB2\x24\x25\x36\x15\x93\xBE\x7C\x02\x11\x49\xE0\x49\xEB\x48\x16"
+ "\xC7\x71\xE8\x0C\xF4\xB2\x79\xCF\xBB\xFC\xBE\xBD\x85\x01\x31\x46\x69\x51\x31\x0D\xE5\x35\xE4\x7B\x72"
+ "\x40\x82\xD2\x9C\x42\x6A\xBC\xE5\xF8\xB2\xF2\x91\x24\x12\x41\x92\x23\xD8\xDE\xDE\xCA\xA1\x81\x44\xA8"
+ "\x5B\x5F\x34\x83\x25\x95\x0D\x29\x37\x37\x71\xCE\x0F\x84\x47\x58\xFB\xC4\x06\xDA\xFA\xBB\xF8\xEE\xCA"
+ "\xEB\x68\xAA\x9D\x8F\x2A\xAB\xE3\x79\x81\x82\x2A\x2B\xC8\x92\x44\x20\x32\x42\x73\xE7\xFB\xEC\xED\x39"
+ "\x4C\x30\x96\xD8\x08\x51\x91\x19\x0C\x0C\x10\xE8\xEA\xA1\xB4\xB8\x84\x7B\xFF\xFA\x5B\xD3\xA5\xC3\x12"
+ "\x31\xD3\xC0\xA3\xBB\x52\x3B\x3D\x42\x88\x44\xF2\xA1\x28\x93\x88\x38\x9A\x0C\xDB\xB6\xA9\x2C\xF5\x33"
+ "\xC3\x57\xCA\xE7\xA2\x17\xB2\xF3\xE0\x5E\x36\xED\xDB\xCE\x7F\xFD\x61\x2B\xF9\xDE\x02\x16\x54\xD6\x23"
+ "\x4B\x32\xDD\x23\x01\x74\x55\x63\x46\x5E\x31\x95\x05\x25\xEC\xEF\xEF\xA0\x7D\xA8\x17\x45\x96\xA9\x2F"
+ "\xAA\x60\xD1\xCC\xFA\x29\xE0\x01\xFA\x46\x87\x58\xBB\x71\x03\xED\x83\x7D\xDC\xB5\xEA\x46\x96\xD4\x34"
+ "\xA0\x48\x0A\x8A\xA2\xA0\x29\x0A\xA1\xD8\x18\xBB\x7A\x8F\xD0\xD2\xDD\x46\x7F\x68\x18\x49\x02\x09\x89"
+ "\x6C\xC5\x4D\x89\x2B\x1B\xAF\x9E\x89\x94\x51\xC9\x1B\xF6\x2E\xF6\x84\xBA\xA6\x2E\x82\x00\x65\x39\x85"
+ "\xBC\xBA\xE7\x4D\x2E\x9C\x7D\x26\x19\x69\xEE\x04\x25\x92\x84\x24\x49\x93\x88\x48\x5A\xC5\xB1\x2C\x43"
+ "\xD7\x75\xCE\x69\x38\x83\x25\x73\x17\x26\xAC\xA2\xE5\x6D\xB6\xBD\xF5\x16\x99\x05\x79\x2C\xAC\x9D\x8B"
+ "\x2C\xC9\x1C\x0C\x74\x72\xA0\xBF\x23\x31\x50\x49\xA2\xC1\x57\xC5\x99\x33\xEB\x50\xC7\x7D\xFC\x44\xF0"
+ "\x9D\xC3\xFD\xAC\xD9\x78\x37\xFD\xC1\x41\xEE\xBD\xE2\x26\x16\x55\xCD\x43\x95\x55\x6C\xC7\xE6\x60\xA0"
+ "\x8B\x9D\xED\xAD\x74\x05\x03\x48\x48\x08\x04\x4E\xDC\xC4\x63\x29\xF8\xD3\xF3\x29\x74\x67\xA1\x2A\x2A"
+ "\x32\x32\xBA\x5B\x27\xE4\xC4\xE9\x1F\x0B\x4E\x22\x60\x52\x2E\xB0\xFA\xD1\x5B\x45\xE7\x70\x1F\x17\xCE"
+ "\x3E\x93\x95\x0D\x4D\x34\x94\xD5\xA0\x29\x53\xB7\x0D\x27\x4E\x8F\x24\x01\xC9\xA8\xEC\xE8\x69\x92\x5C"
+ "\x2B\x76\xBC\xBF\x87\xAD\xAD\x3B\xC8\xCD\xCF\xC7\xEF\xF7\x63\x4B\x89\x3E\x1A\x4B\xAA\x38\xAD\x7C\x56"
+ "\x2A\xC0\x99\x08\xFE\xC8\x60\x0F\x6B\x36\xDE\xCD\x60\x64\x94\xFB\x56\x7D\x85\x45\x55\xF3\xE8\x1A\x09"
+ "\xB0\xBB\xA7\x8D\x43\x03\x3D\x89\xBC\xC3\x88\xD3\x3D\x12\x20\x36\x12\xA2\xCC\x95\x4B\x43\x51\x25\x65"
+ "\x05\x45\x68\x8A\x8A\x24\xCB\xA8\xAA\x8A\xAA\xAA\xE8\x9A\xCE\x8F\x36\x3F\x8B\x63\x5A\x3C\xF2\xD5\x3B"
+ "\x53\x2F\x99\xF6\x6C\x70\xE9\xFD\xEB\x84\x2C\x43\x9A\xE6\xE2\xF2\xC6\x73\xB9\x74\xDE\x12\xCA\x72\x8B"
+ "\xA6\x25\x22\xF9\x9C\x6E\xF1\x3C\x7A\xBD\x10\x42\x70\xA8\xA7\x83\xF6\x40\x0F\x8A\xC7\xC5\xCC\x32\x3F"
+ "\x0B\xCA\x6B\x51\x55\x15\xE5\xA8\x94\xFB\xF0\x60\x0F\x6B\x36\x6E\x60\x38\x1A\xE6\xB6\x15\x5F\x26\xD7"
+ "\x93\xC9\xBE\xDE\x23\x04\xA3\x61\x46\xA2\x21\x3A\x86\xFA\xE8\xEE\xEF\x25\xCB\xD2\x58\x5C\x52\x47\xC3"
+ "\x8C\x5A\xB2\x3C\x19\x28\x8A\x92\xF2\x1C\xC9\xA7\xA2\x28\xA4\xE9\x2E\xBE\xF3\x1F\x0F\x71\x96\x6F\x36"
+ "\x37\x5F\x79\xED\xF1\x09\x48\xCA\xAD\x2F\x3E\x28\xFE\xD0\xBE\x87\xE0\x58\x88\x7A\x5F\x05\xAB\x16\x2C"
+ "\xE3\xBC\xDA\x85\x64\xBB\xD3\x8F\x49\xC6\x44\x22\x26\x12\x72\xB4\x4B\x0D\x87\xC3\xF8\xFD\xFE\x54\x52"
+ "\x33\x51\xF3\x87\x06\xBA\x59\xFB\xE4\xDD\x0C\x47\xC3\x5C\x3A\xB7\x89\xBC\xF4\x4C\x82\xD1\x08\x07\x03"
+ "\x9D\xB4\xF5\x75\xE2\x84\x63\x34\xE6\xCE\xE4\xEC\x8A\xB9\x54\xFA\xCA\xD0\x35\x3D\x05\x5C\x51\x94\x54"
+ "\x91\x65\x39\x45\x80\xAA\xAA\xDC\xF0\xB3\x7F\xE4\xA5\x6F\xFE\xE8\xF8\x5B\x62\xC7\x92\xCB\xFE\xE5\x1B"
+ "\x42\x91\x64\xFA\x46\x07\x69\xAA\x9A\xCF\xAA\xD3\x96\xB1\xD0\x5F\x87\xAE\x1E\x7B\x8A\x4C\xB7\x5E\x24"
+ "\x89\x08\x87\xC3\xF8\x7C\x3E\x34\xED\x8F\xBB\x4D\x92\x24\xB1\xBF\xAF\x9D\x1B\x9E\xBC\x87\x90\x11\x65"
+ "\x79\xFD\xD9\x44\x8C\x31\xF6\x74\xB7\x31\x3C\x38\x44\xB9\x96\xCB\x62\xFF\x1C\x16\x54\xD6\x91\x93\x91"
+ "\x95\x02\x99\xD4\x74\x32\x5A\x4C\x12\x20\x49\x52\x8A\x04\x5B\x38\xAC\xFB\xD9\x3D\xBC\xF0\xF5\x1F\x7C"
+ "\x34\x02\x26\xCA\x97\x9F\xB8\x53\xEC\xED\x3D\x4C\xA6\xCB\xC3\x85\xB3\xCF\xE0\xB2\x86\x73\xA9\x2D\xF2"
+ "\x4F\x7B\x4E\xE0\x8C\x1F\x68\x1C\x3D\x35\xA2\xD1\x28\x39\x39\x39\x29\xED\x4B\x92\xC4\x9E\xEE\x36\x6E"
+ "\x78\xEA\x5E\x22\x66\x9C\xAA\x82\x12\xFA\x06\x03\x28\x61\x93\x05\xDE\x6A\x96\xD4\x34\x52\x5D\xEA\x47"
+ "\x91\x55\x64\x45\x9E\x56\xDB\x13\xB5\x9E\xEC\x33\x69\x59\x23\xD1\x30\xFF\xF0\xD2\xC3\x3C\xB6\x6E\xF2"
+ "\x11\xF9\x47\x3A\x1B\xFC\xD7\x2F\xDE\x26\x01\xAC\x7B\xEA\x5E\xB1\xAF\xF7\x08\xCF\xBC\x7B\x07\x35\xDE"
+ "\x32\x2E\x99\xBB\x98\x8B\xEA\x17\xE1\xCD\xCC\x4D\xB5\x4D\x0E\x20\xA9\x99\xE4\xA0\x54\x55\x4D\xC5\x1B"
+ "\xB2\x2C\xD3\xDC\x75\x90\xAF\x3C\x75\x2F\x21\x33\x4E\x8E\xAD\x42\x6F\x98\x2B\x2A\xCE\xE2\x8C\xDA\xB9"
+ "\xE4\x66\x66\x23\x8D\x03\x3C\xBA\x24\x01\x4F\x2C\x47\x8B\x24\x49\x84\x8D\x28\x06\x53\x77\xB4\x3F\xB1"
+ "\x0B\x12\x2B\x1F\x5C\x2F\x1C\xC7\xA2\x6F\x74\x88\xB3\x2B\xE6\x72\x79\xE3\xB9\x2C\xA9\x4A\x24\x28\x47"
+ "\x4F\x07\xC7\x71\x30\x0C\x23\x65\xFE\xBB\xBB\x0E\xF2\xB5\xE7\x7F\x48\xDC\x34\x59\x9A\x3F\x9B\xA6\xCA"
+ "\x79\xD4\x96\x57\xA2\x8F\x7B\x86\xA3\xE7\x77\xB2\x6E\xA2\x89\x1F\xEB\xE4\xA7\x27\x38\xC8\xAF\x5B\xB6"
+ "\xF1\xEA\xDE\xB7\x28\xCD\x2A\xE0\xE1\x2F\xDF\xFA\xF1\xA7\xC0\x07\xC9\x85\x3F\xB8\x59\x0C\x84\x87\xC9"
+ "\xF6\x64\xB0\xA2\xFE\x6C\x96\xCF\x39\x9B\x3A\xDF\xCC\x49\xAE\xD1\x34\x4D\x24\x49\x62\xE7\x91\x56\x6E"
+ "\x79\xF5\xA7\x68\xAA\xC6\x2D\x4D\x57\x53\x53\x50\x9A\x72\x5F\xC7\xD3\x76\x12\xFC\x74\x12\x89\x47\xD9"
+ "\x7C\x60\x07\xBF\x6A\xD9\xC6\xFE\xBE\x0E\x72\xD3\xB3\x68\xAA\x6C\x64\xFD\xA5\x53\x6F\x95\x7D\x6A\x77"
+ "\x84\x2E\xFA\xFE\x4D\x62\x20\x3C\x42\x75\x61\x19\x3D\xC1\x00\x39\x9E\x2C\x96\xD5\x2C\xE0\x82\x9A\xD3"
+ "\x29\xCE\xC8\x27\x6E\xC4\x79\xA3\x75\x07\xFF\xF4\xF6\x0B\xA4\x69\x3A\x1B\x2E\xBA\x8E\x99\x79\xBE\x49"
+ "\x80\x55\x55\x4D\x01\x9D\x38\x7D\xA6\xD3\xB6\xE5\xD8\xEC\xEA\x3C\xC0\xAF\xDE\xDB\xCA\x96\xF7\x77\x50"
+ "\x9A\xE3\x45\x57\x5D\x3C\x7E\xDD\x1D\x27\xFF\x8E\x50\x52\x3E\xF3\xFF\x6F\x16\x43\xE1\x20\x7F\x7F\xD9"
+ "\xF5\xB8\x54\x8D\x5F\xB6\xBC\xC1\xD6\xB6\x9D\x14\x7B\xF2\xA8\xC9\xF4\xF1\x5A\x57\x33\x19\xEE\x74\xBE"
+ "\xB7\xE2\x06\x66\xE6\x15\x4F\xD1\xF8\xD1\x26\x3E\x65\xAC\x92\x44\x5B\xA0\x8B\x5F\x37\x6F\xE3\xB5\xD6"
+ "\xB7\x19\x33\x62\x54\x15\x96\xF1\xC8\xB5\xB7\x7E\xA8\xDD\x20\x38\x09\xF7\x04\x97\xFF\xF0\xAB\xA2\x2F"
+ "\x38\xC4\x86\xCB\x6F\xE0\xE2\x39\x8B\x18\x19\x0B\xB1\xE9\xC0\x0E\x9E\xDB\xF1\x3A\x03\x91\x11\xEE\xBD"
+ "\x64\x1D\x95\x05\x25\xD3\x2E\x68\xD3\x69\x5A\x92\x24\x06\x23\xA3\x6C\xDA\xFF\x2E\xBF\x7C\x6F\x2B\xAD"
+ "\x7D\x87\xF1\x66\xE6\x71\x5A\x79\x1D\xB7\x5F\xBE\xE6\x84\xEF\x0A\x9E\x94\x9B\xA2\x2B\x7E\xFC\x75\xD1"
+ "\x35\xD4\xC7\x9D\x2B\xD7\xB2\xA2\xA1\x29\x75\x56\x3F\x16\x19\x43\x51\x27\x9B\xFB\x44\x13\x9F\x48\x40"
+ "\xDC\x32\x78\xFB\xF0\x1E\x9E\xDF\xFE\x1A\x7F\x38\xB4\x9B\xC2\xCC\x5C\x84\x2C\xF1\x1F\x5F\xF9\x78\x17"
+ "\xAB\x4F\xDA\x5D\xE1\xCB\x1E\xF8\xA6\x38\x32\xD0\xCD\x1D\x97\x5C\xC7\x5F\xCC\x5D\x8C\xE3\x38\xC4\xE3"
+ "\xF1\x54\xF6\x37\xDD\xC2\x26\x10\xEC\xEB\x6D\xE7\x57\xCD\x5B\x78\x65\xF7\xEF\x91\x24\xA8\x29\x9A\xC9"
+ "\xC2\xB2\xD9\xAC\x59\xFA\xD9\x4F\xE4\xDE\xF0\x49\xBD\x2C\x7D\xF9\x83\xDF\x14\x47\x06\x7A\x59\xBF\xF4"
+ "\x6A\x2E\x6D\x6C\xC2\xB4\xAC\x54\x12\x34\x31\xAA\xEB\x0F\x0D\xF3\x5A\xEB\xDB\xBC\xB8\x73\x13\x5D\x23"
+ "\xFD\x78\x33\x72\x99\x5B\x52\xCD\x5D\xAB\xA6\xEE\xE8\x7C\x5C\x39\xE9\xD7\xE5\x57\x3D\xB8\x5E\xB4\x0D"
+ "\x74\x71\x5D\xE3\x72\x56\x9D\xB6\x0C\x55\x55\x49\x73\xB9\x88\xD9\x26\xDB\x0E\x35\xF3\xEB\xE6\x6D\x34"
+ "\xF7\x1E\x64\x96\x6F\x06\xAA\xA4\xF0\xAF\x5F\xBA\xFD\x7F\xCF\x75\xF9\xA4\x7C\xEE\xA1\xFF\x27\x0E\x0E"
+ "\x74\x71\x79\xF9\xE9\xD4\xF9\xAB\xD9\xD6\xD9\xC2\x3B\x5D\xFB\xC9\x4B\xCF\xC6\x01\x5E\xB9\xF9\x83\x8F"
+ "\xB4\x3E\x29\x39\x25\x04\x00\x5C\xF9\xD0\xDF\x89\xFD\x81\x0E\xF2\xD3\xB3\xA8\x2A\x28\xE3\x8C\xF2\xD9"
+ "\x5C\xBF\xEC\x8A\x93\xFF\xB3\x99\x89\x99\xDB\xC9\x2E\x3F\xFE\xED\xCF\xC5\xA9\x7C\xBF\x10\xE2\xD4\x59"
+ "\xC0\xFF\x14\xF9\x93\xFF\xD9\xDC\x9F\x09\x38\xD5\x03\x38\xD5\xF2\x27\x4F\xC0\x7F\x03\x90\x91\x43\x51"
+ "\x9D\xE9\xB8\x2D\x00\x00\x00\x00\x49\x45\x4E\x44\xAE\x42\x60\x82"
+ };
+
+ if ( !m_iconApplication )
+ {
+ m_iconApplication = new QPixmap ();
+ if ( !m_iconApplication->loadFromData ((const uchar*)png_image_cr64_app_kchmviewer, sizeof(png_image_cr64_app_kchmviewer) - 1, "PNG") )
+ qFatal ("Could not load application icon");
+ }
+
+ return m_iconApplication;
+}
+
+
+const QPixmap * KCHMIconStorage::getCloseWindowIcon( )
+{
+ static const char png_image_cancel[] =
+ {
+ "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52\x00\x00\x00\x16\x00\x00\x00\x16\x08"
+ "\x06\x00\x00\x00\xC4\xB4\x6C\x3B\x00\x00\x00\x04\x67\x41\x4D\x41\x00\x00\xAF\xC8\x37\x05\x8A\xE9\x00"
+ "\x00\x00\x19\x74\x45\x58\x74\x53\x6F\x66\x74\x77\x61\x72\x65\x00\x41\x64\x6F\x62\x65\x20\x49\x6D\x61"
+ "\x67\x65\x52\x65\x61\x64\x79\x71\xC9\x65\x3C\x00\x00\x03\x49\x49\x44\x41\x54\x78\xDA\x62\xFC\xFF\xFF"
+ "\x3F\xC3\xB9\x4B\xF7\xFE\x33\x31\x31\x32\x60\x03\xBF\x7E\xFF\x61\xF8\xFD\xEB\x37\xC3\xDF\xBF\xFF\x18"
+ "\x3E\x7E\xFA\x0A\x16\xF3\xF5\x30\xC7\xAE\x18\x09\x00\x04\x10\x0B\x88\x00\x19\x6A\xA0\xA3\x88\x21\xF9"
+ "\x0F\x68\xE9\x8F\x9F\x7F\x18\xFE\xFC\xF9\x07\xC6\x8F\x9E\xBC\x60\x10\xE0\xE7\x65\xD8\xBC\xE3\xE4\x7F"
+ "\x42\x86\x03\x04\x10\x13\x21\x9B\x99\x81\x96\x82\x2C\x66\x66\x82\x28\x65\x67\x63\x65\x30\x35\xD2\x04"
+ "\x1B\x8E\x4F\x1F\x40\x00\xE1\x35\x98\x89\x11\x68\x20\x33\x13\x03\x0B\x10\x33\xB3\x40\x1C\xC8\xC5\xC5"
+ "\xC1\x20\x22\xCC\xC3\xA0\xA5\xA1\x88\xD7\x70\x80\x00\x22\xE8\x62\x10\x60\x44\xF2\x34\x07\x3B\x33\xD8"
+ "\x22\x29\x49\x41\xBC\x2E\x07\x08\x20\x16\xE2\x0C\x86\x04\xC7\xDE\x7D\x47\x81\x18\x53\xBE\xF7\xD6\xED"
+ "\xFF\xC5\x79\x31\x28\x61\x0E\x10\x40\x04\x0D\x06\x19\x08\x4A\x39\xA0\x60\x49\x8A\x0F\x01\x8B\xFD\xFD"
+ "\xFB\x97\xE1\xC9\xD3\x57\xE0\x14\x03\x92\x5B\xB3\x66\x0D\x86\x3E\x80\x00\x62\x22\xD6\xC5\xE0\x88\x64"
+ "\x66\x04\x1B\xFA\xE5\xEB\x77\x70\x8A\x01\x85\x3F\x13\x33\x76\x23\x00\x02\x08\xBB\xE8\xDB\x67\x0C\x0C"
+ "\x7F\x7E\x81\x99\xFF\xFF\xFD\x07\xBB\x0A\x64\xD0\xB7\x6F\x3F\x19\xFE\x9D\x39\xC8\xF0\xEF\xCB\x27\x06"
+ "\x0E\x0E\x36\x60\x78\xB3\x33\x70\x02\x31\x36\x00\x10\x40\x98\x41\xF1\xF2\x01\x03\xC3\xE5\xA3\x40\x67"
+ "\x32\x33\xFC\xB3\xF1\x67\xF8\xC3\xC8\xCA\xF0\x17\x68\x38\x28\x1D\x73\x9C\xD9\xC3\x20\xB0\xA8\x8B\x81"
+ "\x9F\x47\x8C\xE1\x71\x7E\x0F\xC3\x3F\x2E\x5E\xA0\xDC\x3F\xAC\x06\x03\x04\x10\xA6\x8B\xAF\x9F\x66\x60"
+ "\xF8\xF4\x9E\x81\xE1\xD9\x3D\x06\xA6\xF5\x33\x18\x7E\x7D\xFA\x02\x74\xE9\x2F\x06\xC6\xA3\xDB\xC1\x86"
+ "\x32\x7C\xF8\xC4\xC0\x7E\xE5\x1C\x03\xFF\x8D\x0B\x0C\x6C\xC0\x34\xCD\xC6\xCA\x8A\xD5\x60\x80\x00\xC2"
+ "\x34\xD8\xD0\x91\x01\x98\x87\x19\x18\x3E\x02\x0D\xBF\x77\x9D\x81\x6B\x71\x0B\x03\xD7\x91\x4D\x0C\xBC"
+ "\xF3\x3B\xC0\x86\x82\xF0\x87\xEC\x66\x86\xEF\x56\x2E\xC0\x88\x65\x02\x87\x33\x36\x00\x10\x40\x4C\xE8"
+ "\x59\xF8\x1F\x9F\x30\xC3\x3F\xA7\x70\x86\xFF\x3F\x81\x86\x7F\xFA\xC0\xC0\x7C\xF3\x12\x03\xD7\xB2\x89"
+ "\x70\x43\x3F\xE5\xB4\x30\xFC\x70\x0F\x06\xA6\x65\x66\x70\x8A\x61\x62\xC2\x6E\x30\x40\x00\xA1\x88\xFE"
+ "\xFC\xF5\x07\x82\xF9\xC4\x18\x7E\x06\xE7\x02\x0D\xFF\x0D\x37\x10\x84\xBF\x25\x57\x30\xFC\xF2\x0A\x05"
+ "\xE6\x42\x26\x88\xA1\x8C\x4C\x60\x0B\xB0\x01\x80\x00\x42\x31\x98\x11\x09\x32\x3D\xB8\xC9\xC0\xF8\xFC"
+ "\x39\xC2\xE0\x8F\x5F\x19\xD8\x97\x2D\x60\x60\xFC\xF4\x11\x98\x54\x10\x39\xF2\xDF\x7F\xEC\x91\x07\x10"
+ "\x40\x58\xFD\xC1\x7C\x7C\x27\x03\xDB\x8C\x66\xB8\xA1\xFF\xFF\x01\x13\xCF\x87\x6F\x0C\xCC\xA7\xCE\x32"
+ "\x08\xF8\x79\x32\x30\x7D\xFA\x04\x4E\xDB\xE0\x1C\xC9\x88\x3D\x28\x00\x02\x88\x09\x9B\xA1\xAC\x48\x86"
+ "\xFE\x2C\xEE\x60\xF8\x36\x75\x35\xC3\x7F\x46\x2E\x06\x86\x6F\x40\xF9\xCB\x97\x18\xF8\xFD\x3D\x19\x18"
+ "\x3F\x7E\xC4\x9B\xA9\x00\x02\x08\xD3\xE0\x6D\x2B\xE0\x86\xFE\x2A\xE9\x64\xF8\xED\x1D\xC6\xF0\x57\x53"
+ "\x8F\xE1\xDB\x9A\x9D\x0C\xFF\xF9\xF9\x21\x89\x1F\x68\x38\xDB\xB1\xC3\x78\x0D\x06\x08\x20\x0C\x83\x7F"
+ "\x57\x4C\x62\xF8\x27\x22\xC3\xF0\xAB\xB4\x93\xE1\x8F\x4F\x18\x5C\xFC\xAF\x9E\x3E\xC3\xA7\xCD\x10\xC3"
+ "\xBF\x4C\x99\xC1\xF0\xC3\xC3\x1B\xAF\xC1\x00\x01\xC4\x82\x9E\xDC\x18\xB8\x78\x18\xFE\xCE\xD9\x0A\x8E"
+ "\xA0\x7F\xC0\x1C\x07\xC2\x90\xBC\x0D\x34\x5C\x57\x8F\xE1\xED\xBD\xA7\x40\x26\x90\x03\xCC\x89\x90\xAC"
+ "\x8E\x3D\xF2\x00\x02\x08\xC5\x60\x36\x56\x44\xD2\x81\x19\x08\xCA\xB2\xFF\xA1\x96\xB0\x00\x23\xEA\xFF"
+ "\x7F\x26\x30\x1B\x58\x1C\x81\x2D\x60\xFC\x83\xBD\x86\x02\x08\x20\x16\x48\xA9\xC5\xC4\x50\x5A\xD9\xC6"
+ "\x40\x4D\x00\x10\x60\x00\x30\xC9\x4F\x14\xFB\x0B\x87\xFC\x00\x00\x00\x00\x49\x45\x4E\x44\xAE\x42\x60"
+ "\x82"
+ };
+
+ if ( !m_iconCloseWindow )
+ {
+ m_iconCloseWindow = new QPixmap ();
+
+ if ( !m_iconCloseWindow->loadFromData ((const uchar*)png_image_cancel, sizeof(png_image_cancel) - 1, "PNG") )
+ qFatal ("Could not load cancel icon");
+ }
+
+ return m_iconCloseWindow;
+}
+
+
+
+KCHMIconStorage::KCHMIconStorage( )
+{
+ m_iconApplication = 0;
+ m_iconCloseWindow = 0;
+}
+
+
+KCHMIconStorage gIconStorage;
+
+
+const QPixmap * KCHMIconStorage::getToolbarPixmap( pixmap_index_t pix )
+{
+ return returnOrLoadImage ( (unsigned int) pix, png_image_toolbakicons + (pix - KCHMIconStorage::back));
+}
+
+
+const QPixmap * KCHMIconStorage::returnOrLoadImage( unsigned int id, const png_memory_image_t * image )
+{
+ QMap<unsigned int, QPixmap*>::iterator it = m_iconMap.find (id);
+
+ if ( it == m_iconMap.end() )
+ {
+ m_iconMap[id] = new QPixmap ();
+ if ( !m_iconMap[id]->loadFromData ((const uchar*)image->data, image->size, "PNG") )
+ qFatal ("Could not load image %d", id);
+ }
+
+ return m_iconMap[id];
+}
diff --git a/src/iconstorage.h b/src/iconstorage.h
new file mode 100644
index 0000000..0a7a14e
--- /dev/null
+++ b/src/iconstorage.h
@@ -0,0 +1,71 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef ICON_STORAGE_H
+#define ICON_STORAGE_H
+
+#include <qmap.h>
+#include <qpixmap.h>
+
+
+class KCHMIconStorage
+{
+ public:
+ typedef struct
+ {
+ unsigned int size;
+ const char * data;
+ } png_memory_image_t;
+
+ enum pixmap_index_t
+ {
+ back = 1000,
+ bookmark_add,
+ fileopen,
+ print,
+ findnext,
+ findprev,
+ forward,
+ gohome,
+ viewsource,
+ view_decrease,
+ view_increase,
+ next_page,
+ prev_page,
+ locate_in_content
+ };
+
+ KCHMIconStorage();
+ const QPixmap * getToolbarPixmap (pixmap_index_t pix);
+ const QPixmap * getApplicationIcon();
+ const QPixmap * getCloseWindowIcon();
+
+ private:
+ const QPixmap * returnOrLoadImage (unsigned int id, const png_memory_image_t * image);
+
+ QMap<unsigned int, QPixmap*> m_iconMap;
+ QPixmap * m_iconApplication;
+ QPixmap * m_iconCloseWindow;
+};
+
+extern KCHMIconStorage gIconStorage;
+
+#endif /* ICON_STORAGE_H */
diff --git a/src/kchmbookmarkwindow.cpp b/src/kchmbookmarkwindow.cpp
new file mode 100644
index 0000000..2e332fa
--- /dev/null
+++ b/src/kchmbookmarkwindow.cpp
@@ -0,0 +1,239 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "kchmbookmarkwindow.h"
+#include "kchmmainwindow.h"
+#include "kchmviewwindow.h"
+#include "kchmlistitemtooltip.h"
+#include "kchmtreeviewitem.h"
+
+#include "kchmbookmarkwindow.moc"
+
+KCHMBookmarkWindow::KCHMBookmarkWindow(QWidget *parent, const char *name)
+ : QWidget(parent, name)
+{
+ QVBoxLayout * layout = new QVBoxLayout (this);
+ layout->setMargin (5);
+
+ m_bookmarkList = new KQListView (this);
+ m_bookmarkList->addColumn( "bookmark" ); // no need to i18n - the column is hidden
+ m_bookmarkList->header()->hide();
+ layout->addWidget (m_bookmarkList);
+
+ new KCHMListItemTooltip( m_bookmarkList );
+
+ QHBoxLayout * hlayout = new QHBoxLayout (layout);
+ QPushButton * add = new QPushButton ( i18n( "&Add" ), this);
+ QPushButton * edit = new QPushButton ( i18n( "&Edit" ), this);
+ QPushButton * del = new QPushButton ( i18n( "&Del" ), this);
+
+ hlayout->addWidget (add);
+ hlayout->addWidget (edit);
+ hlayout->addWidget (del);
+
+ connect( m_bookmarkList,
+ SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int) ),
+ this,
+ SLOT( onDoubleClicked ( QListViewItem *, const QPoint &, int) ) );
+
+ connect( add,
+ SIGNAL( clicked () ),
+ this,
+ SLOT( onAddBookmarkPressed( ) ) );
+
+ connect( del,
+ SIGNAL( clicked () ),
+ this,
+ SLOT( onDelBookmarkPressed( ) ) );
+
+ connect( edit,
+ SIGNAL( clicked () ),
+ this,
+ SLOT( onEditBookmarkPressed( ) ) );
+
+ connect( m_bookmarkList,
+ SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ),
+ this,
+ SLOT( slotContextMenuRequested ( QListViewItem *, const QPoint &, int ) ) );
+
+ m_menuBookmarks = 0;
+ m_contextMenu = 0;
+ m_listChanged = false;
+}
+
+void KCHMBookmarkWindow::onAddBookmarkPressed( )
+{
+ bool ok;
+ QString url = ::mainWindow->currentBrowser()->getOpenedPage();
+ QString title = ::mainWindow->chmFile()->getTopicByUrl(url);
+ QString name = QInputDialog::getText(
+ i18n( "%1 - add a bookmark") . arg(APP_NAME),
+ i18n( "Enter the name for this bookmark:" ),
+ QLineEdit::Normal,
+ title,
+ &ok,
+ this);
+
+ if ( !ok || name.isEmpty() )
+ return;
+
+ KCHMBookmarkTreeViewItem * item = new KCHMBookmarkTreeViewItem (
+ m_bookmarkList,
+ name,
+ url,
+ ::mainWindow->currentBrowser()->getScrollbarPosition() );
+
+ item->menuid = m_menuBookmarks->insertItem( name );
+ m_listChanged = true;
+}
+
+
+void KCHMBookmarkWindow::onDelBookmarkPressed( )
+{
+ KCHMBookmarkTreeViewItem * item = (KCHMBookmarkTreeViewItem *) m_bookmarkList->selectedItem();
+
+ if ( item )
+ {
+ m_menuBookmarks->removeItem( item->menuid );
+ delete item;
+ m_listChanged = true;
+ }
+}
+
+
+void KCHMBookmarkWindow::onEditBookmarkPressed( )
+{
+ KCHMBookmarkTreeViewItem * item = (KCHMBookmarkTreeViewItem *) m_bookmarkList->selectedItem();
+
+ if ( item )
+ {
+ bool ok;
+ QString name = QInputDialog::getText(
+ i18n( "%1 - edit the bookmark name") . arg(APP_NAME),
+ i18n( "Enter the name for this bookmark:" ),
+ QLineEdit::Normal,
+ item->name,
+ &ok,
+ this);
+
+ if ( !ok || name.isEmpty() )
+ return;
+
+ item->setText (0, name);
+ m_menuBookmarks->changeItem( item->menuid, name );
+ m_listChanged = true;
+ }
+}
+
+
+void KCHMBookmarkWindow::onDoubleClicked( QListViewItem * item, const QPoint &, int )
+{
+ if ( !item )
+ return;
+
+ KCHMBookmarkTreeViewItem * treeitem = (KCHMBookmarkTreeViewItem *) item;
+
+ if ( ::mainWindow->currentBrowser()->getOpenedPage() != treeitem->url )
+ ::mainWindow->openPage( treeitem->url, OPF_CONTENT_TREE | OPF_ADD2HISTORY );
+
+ ::mainWindow->currentBrowser()->setScrollbarPosition(treeitem->scroll_y);
+}
+
+
+void KCHMBookmarkWindow::restoreSettings( const KCHMSettings::bookmark_saved_settings_t & settings )
+{
+ for ( unsigned int i = 0; i < settings.size(); i++ )
+ {
+ KCHMBookmarkTreeViewItem * item = new KCHMBookmarkTreeViewItem (m_bookmarkList, settings[i].name, settings[i].url, settings[i].scroll_y);
+
+ item->menuid = m_menuBookmarks->insertItem( settings[i].name );
+ }
+}
+
+
+void KCHMBookmarkWindow::saveSettings( KCHMSettings::bookmark_saved_settings_t & settings )
+{
+ QListViewItemIterator it (m_bookmarkList);
+
+ settings.clear();
+
+ for ( ; it.current(); it++ )
+ {
+ KCHMBookmarkTreeViewItem * treeitem = (KCHMBookmarkTreeViewItem *) it.current();
+ settings.push_back (KCHMSettings::SavedBookmark(treeitem->name, treeitem->url, treeitem->scroll_y));
+ }
+}
+
+void KCHMBookmarkWindow::invalidate( )
+{
+ QListViewItemIterator it( m_bookmarkList );
+
+ for ( ; it.current(); it++ )
+ m_menuBookmarks->removeItem( ((KCHMBookmarkTreeViewItem *) it.current())->menuid );
+
+ m_bookmarkList->clear();
+}
+
+void KCHMBookmarkWindow::createMenu( KCHMMainWindow * parent )
+{
+ // Create the main Bookmark menu
+ m_menuBookmarks = new KQPopupMenu( parent );
+ parent->menuBar()->insertItem( i18n( "&Bookmarks"), m_menuBookmarks );
+
+ m_menuBookmarks->insertItem( i18n( "&Add bookmark"), this, SLOT(onAddBookmarkPressed()), CTRL+Key_B );
+ m_menuBookmarks->insertSeparator();
+
+ connect( m_menuBookmarks, SIGNAL( activated(int) ), this, SLOT ( onBookmarkSelected(int) ));
+}
+
+void KCHMBookmarkWindow::onBookmarkSelected( int bookmark )
+{
+ QListViewItemIterator it( m_bookmarkList );
+
+ for ( ; it.current(); it++ )
+ {
+ if ( ((KCHMBookmarkTreeViewItem *) it.current())->menuid == bookmark )
+ {
+ KCHMBookmarkTreeViewItem * treeitem = (KCHMBookmarkTreeViewItem *) it.current();
+
+ if ( ::mainWindow->currentBrowser()->getOpenedPage() != treeitem->url )
+ ::mainWindow->openPage( treeitem->url, OPF_CONTENT_TREE | OPF_ADD2HISTORY );
+
+ ::mainWindow->currentBrowser()->setScrollbarPosition(treeitem->scroll_y);
+ break;
+ }
+ }
+}
+
+void KCHMBookmarkWindow::slotContextMenuRequested( QListViewItem * item, const QPoint & point, int )
+{
+ if ( !m_contextMenu )
+ m_contextMenu = ::mainWindow->currentBrowser()->createListItemContextMenu( this );
+
+ if( item )
+ {
+ KCHMBookmarkTreeViewItem * treeitem = (KCHMBookmarkTreeViewItem *) item;
+
+ ::mainWindow->currentBrowser()->setTabKeeper( treeitem->url );
+ m_contextMenu->popup( point );
+ }
+}
+
diff --git a/src/kchmbookmarkwindow.h b/src/kchmbookmarkwindow.h
new file mode 100644
index 0000000..20057f4
--- /dev/null
+++ b/src/kchmbookmarkwindow.h
@@ -0,0 +1,63 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMBOOKMARKWINDOW_H
+#define KCHMBOOKMARKWINDOW_H
+
+#include "kde-qt.h"
+#include "forwarddeclarations.h"
+#include "kchmsettings.h"
+
+/**
+@author Georgy Yunaev
+*/
+class KCHMBookmarkWindow : public QWidget
+{
+ Q_OBJECT
+ public:
+ KCHMBookmarkWindow(QWidget *parent = 0, const char *name = 0);
+ virtual ~KCHMBookmarkWindow() {};
+
+ void createMenu( KCHMMainWindow * parent );
+
+ void restoreSettings (const KCHMSettings::bookmark_saved_settings_t& settings);
+ void saveSettings (KCHMSettings::bookmark_saved_settings_t& settings);
+ void invalidate();
+
+ public slots:
+ void onAddBookmarkPressed ();
+ void slotContextMenuRequested ( QListViewItem *item, const QPoint &point, int column );
+
+ private slots:
+ void onBookmarkSelected( int );
+ void onDelBookmarkPressed( );
+ void onEditBookmarkPressed( );
+ void onDoubleClicked ( QListViewItem *, const QPoint &, int );
+
+ private:
+ KQPopupMenu * m_menuBookmarks;
+ KQListView * m_bookmarkList;
+ QString m_bookmarkFileName;
+ bool m_listChanged;
+ KQPopupMenu * m_contextMenu;
+};
+
+#endif
diff --git a/src/kchmconfig.cpp b/src/kchmconfig.cpp
new file mode 100644
index 0000000..f5058f3
--- /dev/null
+++ b/src/kchmconfig.cpp
@@ -0,0 +1,215 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "kde-qt.h"
+#include "kchmconfig.h"
+#include "kchmsettings.h"
+#include "kchmmainwindow.h"
+
+
+KCHMConfig appConfig;
+
+const char * APP_PATHINUSERDIR = ".kchmviewer";
+
+
+KCHMConfig::KCHMConfig()
+{
+ QDir dir;
+ m_datapath = QDir::homeDirPath() + "/" + APP_PATHINUSERDIR;
+
+ dir.setPath (m_datapath);
+
+ if ( !dir.exists() && !dir.mkdir(m_datapath) )
+ qWarning ("Could not create directory %s", m_datapath.ascii());
+
+ m_LoadLatestFileOnStartup = false;
+ m_onNewChmClick = ACTION_ASK_USER;
+ m_onExternalLinkClick = ACTION_ASK_USER;
+ m_HistorySize = 10;
+ m_HistoryStoreExtra = true;
+ m_useSearchEngine = SEARCH_USE_MINE;
+
+ m_QtBrowserPath = "viewurl-netscape.sh '%s'";
+ m_kdeUseQTextBrowser = false;
+ m_kdeEnableJS = false;
+ m_kdeEnableJava = false;
+ m_kdeEnablePlugins = true;
+ m_kdeEnableRefresh = false;
+
+ m_advUseInternalEditor = true;
+ m_advExternalEditorPath = "kate '%s'";
+
+ m_lastOpenedDir = "";
+}
+
+
+KCHMConfig::~KCHMConfig()
+{
+}
+
+bool KCHMConfig::load()
+{
+ QFile file (m_datapath + "/config");
+ if ( !file.open (IO_ReadOnly) )
+ return false; // no error message - not actually a problem
+
+ QString line;
+ char readbuf[4096];
+ bool getting_history = false;
+ m_History.clear();
+
+ while ( file.readLine( readbuf, sizeof(readbuf) - 1 ) > 0 )
+ {
+ line = QString::fromUtf8( readbuf ).stripWhiteSpace();
+
+ // skip empty lines and comments
+ if ( line.isEmpty() || line[0] == '#' )
+ continue;
+
+ QRegExp rxsection ("^\\[(\\w+)\\]$"), rxkeypair ("^(\\w+)\\s*=\\s*(.*)$");
+
+ if ( rxsection.search ( line ) != -1 )
+ {
+ if ( rxsection.cap (1) == "settings" )
+ getting_history = false;
+ else if ( rxsection.cap (1) == "history" )
+ getting_history = true;
+ else
+ qWarning ("Unknown configuration section: %s", rxsection.cap (1).ascii());
+
+ continue;
+ }
+ else if ( !getting_history && rxkeypair.search ( line ) != -1 )
+ {
+ QString key (rxkeypair.cap (1)), value (rxkeypair.cap(2));
+
+ if ( key == "LoadLatestFileOnStartup" )
+ m_LoadLatestFileOnStartup = value.toInt() ? true : false;
+ else if ( key == "onNewChmClick" )
+ m_onNewChmClick = (choose_action_t) value.toInt();
+ else if ( key == "onExternalLinkClick" )
+ m_onExternalLinkClick = (choose_action_t) value.toInt();
+ else if ( key == "HistorySize" )
+ m_HistorySize = value.toInt();
+ else if ( key == "HistoryStoreExtra" )
+ m_HistoryStoreExtra = value.toInt() ? true : false;
+ else if ( key == "QtBrowserPath" )
+ m_QtBrowserPath = value;
+ else if ( key == "kdeUseQTextBrowser" )
+ m_kdeUseQTextBrowser = value.toInt() ? true : false;
+ else if ( key == "kdeEnableJS" )
+ m_kdeEnableJS = value.toInt() ? true : false;
+ else if ( key == "kdeEnableJava" )
+ m_kdeEnableJava = value.toInt() ? true : false;
+ else if ( key == "kdeEnablePlugins" )
+ m_kdeEnablePlugins = value.toInt() ? true : false;
+ else if ( key == "kdeEnableRefresh" )
+ m_kdeEnableRefresh = value.toInt() ? true : false;
+ else if ( key == "LastOpenedDir" )
+ m_lastOpenedDir = value;
+ else if ( key == "advUseInternalEditor" )
+ m_advUseInternalEditor = value.toInt() ? true : false;
+ else if ( key == "advExternalEditorPath" )
+ m_advExternalEditorPath = value;
+ else if ( key == "useSearchEngine" )
+ m_useSearchEngine = (use_search_engine) value.toInt();
+ else
+ qWarning ("Unknown key=value pair: %s", line.ascii());
+ }
+ else if ( getting_history )
+ {
+ if ( m_History.size() < m_HistorySize )
+ addFileToHistory( line );
+ }
+ else
+ qWarning ("Unknown line in configuration: %s", line.ascii());
+ }
+
+ return true;
+}
+
+bool KCHMConfig::save( )
+{
+ QFile file (m_datapath + "/config");
+ if ( !file.open (IO_WriteOnly) )
+ {
+ qWarning ("Could not write settings into file %s: %s", file.name().ascii(), file.errorString().ascii());
+ return false;
+ }
+
+ QTextStream stream( &file );
+ stream.setEncoding( QTextStream::UnicodeUTF8 );
+ stream << "[settings]\n";
+ stream << "LoadLatestFileOnStartup=" << m_LoadLatestFileOnStartup << "\n";
+
+ stream << "onNewChmClick=" << m_onNewChmClick << "\n";
+ stream << "onExternalLinkClick=" << m_onExternalLinkClick << "\n";
+ stream << "HistorySize=" << m_HistorySize << "\n";
+ stream << "HistoryStoreExtra=" << m_HistoryStoreExtra << "\n";
+
+ stream << "QtBrowserPath=" << m_QtBrowserPath << "\n";
+ stream << "kdeUseQTextBrowser=" << m_kdeUseQTextBrowser << "\n";
+ stream << "kdeEnableJS=" << m_kdeEnableJS << "\n";
+ stream << "kdeEnableJava=" << m_kdeEnableJava << "\n";
+ stream << "kdeEnablePlugins=" << m_kdeEnablePlugins << "\n";
+ stream << "kdeEnableRefresh=" << m_kdeEnableRefresh << "\n";
+ stream << "advUseInternalEditor=" << m_advUseInternalEditor << "\n";
+ stream << "advExternalEditorPath=" << m_advExternalEditorPath << "\n";
+ stream << "useSearchEngine=" << m_useSearchEngine << "\n";
+
+ stream << "LastOpenedDir=" << m_lastOpenedDir << "\n";
+
+ stream << "\n[history]\n";
+
+ // Do not write all the history, but only the needed amount
+ for ( unsigned int i = 0; i < m_History.size(); i++ )
+ stream << m_History[m_History.size() - 1 - i] << "\n";
+
+ // m_History
+ return true;
+}
+
+void KCHMConfig::addFileToHistory( const QString & file )
+{
+ QStringList::Iterator itr = m_History.find( file );
+
+ // check whether file already exists in history - more it forward
+ if ( itr != m_History.end() )
+ {
+ m_History.erase( itr );
+ m_History.push_back(file);
+ return;
+ }
+
+ if ( m_History.size() < m_HistorySize )
+ {
+ m_History.push_back( file );
+ return;
+ }
+
+ // Remove a file from the front
+ QString filetoremove = m_History[0];
+ m_History.erase( m_History.begin() );
+ m_History.push_back( file );
+
+ // And remove the appropriate history file
+ mainWindow->currentSettings()->removeSettings ( filetoremove );
+}
diff --git a/src/kchmconfig.h b/src/kchmconfig.h
new file mode 100644
index 0000000..c87ad48
--- /dev/null
+++ b/src/kchmconfig.h
@@ -0,0 +1,84 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMCONFIG_H
+#define KCHMCONFIG_H
+
+#include <qstring.h>
+#include <qstringlist.h>
+
+extern const char * APP_PATHINUSERDIR;
+
+
+/**
+@author Georgy Yunaev
+*/
+class KCHMConfig
+{
+public:
+ enum choose_action_t
+ {
+ ACTION_ALWAYS_OPEN,
+ ACTION_ASK_USER,
+ ACTION_DONT_OPEN
+ };
+
+ enum use_search_engine
+ {
+ SEARCH_USE_CHM,
+ SEARCH_USE_MINE,
+ };
+
+ KCHMConfig();
+ ~KCHMConfig();
+
+ bool load();
+ bool save();
+
+ void addFileToHistory ( const QString& file );
+
+public:
+ QString m_datapath;
+ QString m_lastOpenedDir;
+
+ bool m_LoadLatestFileOnStartup;
+ choose_action_t m_onNewChmClick;
+ choose_action_t m_onExternalLinkClick;
+ unsigned int m_HistorySize;
+ bool m_HistoryStoreExtra;
+ use_search_engine m_useSearchEngine;
+
+ QString m_QtBrowserPath;
+ bool m_kdeUseQTextBrowser;
+ bool m_kdeEnableJS;
+ bool m_kdeEnableJava;
+ bool m_kdeEnablePlugins;
+ bool m_kdeEnableRefresh;
+
+ bool m_advUseInternalEditor;
+ QString m_advExternalEditorPath;
+
+ QStringList m_History;
+};
+
+extern KCHMConfig appConfig;
+
+#endif
diff --git a/src/kchmcontentswindow.cpp b/src/kchmcontentswindow.cpp
new file mode 100644
index 0000000..d145d41
--- /dev/null
+++ b/src/kchmcontentswindow.cpp
@@ -0,0 +1,95 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "kde-qt.h"
+
+#include "libchmfile.h"
+
+#include "kchmcontentswindow.h"
+#include "kchmlistitemtooltip.h"
+#include "kchmmainwindow.h"
+#include "kchmtreeviewitem.h"
+
+#include "kchmcontentswindow.moc"
+
+KCHMContentsWindow::KCHMContentsWindow(QWidget *parent, const char *name)
+ : KQListView(parent, name)
+{
+ m_contextMenu = 0;
+
+ addColumn( "Contents" ); // no i18n - this column is hidden
+ setSorting(-1);
+ setFocus();
+ setRootIsDecorated(true);
+ header()->hide();
+ setShowToolTips( false );
+
+ connect( this, SIGNAL( onItem ( QListViewItem * ) ), this, SLOT( slotOnItem( QListViewItem * ) ) );
+ connect( this,
+ SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ),
+ this,
+ SLOT( slotContextMenuRequested ( QListViewItem *, const QPoint &, int ) ) );
+
+
+ new KCHMListItemTooltip( this );
+}
+
+KCHMContentsWindow::~KCHMContentsWindow()
+{
+}
+
+void KCHMContentsWindow::slotContextMenuRequested( QListViewItem * item, const QPoint & point, int )
+{
+ if ( !m_contextMenu )
+ m_contextMenu = ::mainWindow->currentBrowser()->createListItemContextMenu( this );
+
+ if( item )
+ {
+ KCHMIndTocItem * treeitem = (KCHMIndTocItem*) item;
+ ::mainWindow->currentBrowser()->setTabKeeper( treeitem->getUrl() );
+ m_contextMenu->popup( point );
+ }
+}
+
+void KCHMContentsWindow::refillTableOfContents( )
+{
+ QValueVector< LCHMParsedEntry > data;
+
+ if ( !::mainWindow->chmFile()->parseTableOfContents( &data )
+ || data.size() == 0 )
+ {
+ qWarning ("CHM toc present but is empty; wrong parsing?");
+ return;
+ }
+
+ kchmFillListViewWithParsedData( this, data, &m_urlListMap );
+}
+
+KCHMIndTocItem * KCHMContentsWindow::getTreeItem( const QString & url )
+{
+ QString fixedstr = ::mainWindow->chmFile()->normalizeUrl( url );
+ QMap<QString, KCHMIndTocItem*>::const_iterator it = m_urlListMap.find( fixedstr );
+
+ if ( it == m_urlListMap.end() )
+ return 0;
+
+ return *it;
+}
diff --git a/src/kchmcontentswindow.h b/src/kchmcontentswindow.h
new file mode 100644
index 0000000..5860041
--- /dev/null
+++ b/src/kchmcontentswindow.h
@@ -0,0 +1,52 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef INCLUDE_KCHMCONTENTSWINDOW_H
+#define INCLUDE_KCHMCONTENTSWINDOW_H
+
+#include "kde-qt.h"
+#include "kchmtreeviewitem.h"
+
+/**
+@author tim
+*/
+class KCHMContentsWindow : public KQListView
+{
+ Q_OBJECT
+ public:
+ KCHMContentsWindow( QWidget *parent = 0, const char *name = 0 );
+ ~KCHMContentsWindow();
+
+ QRect tip( const QPoint & p );
+
+ void refillTableOfContents();
+
+ KCHMIndTocItem * getTreeItem( const QString& url );
+
+ public slots:
+ void slotContextMenuRequested ( QListViewItem *item, const QPoint &point, int column );
+
+ private:
+ KQPopupMenu * m_contextMenu;
+ QMap<QString, KCHMIndTocItem*> m_urlListMap;
+};
+
+#endif /* INCLUDE_KCHMCONTENTSWINDOW_H */
diff --git a/src/kchmdialogchooseurlfromlist.cpp b/src/kchmdialogchooseurlfromlist.cpp
new file mode 100644
index 0000000..de33fc3
--- /dev/null
+++ b/src/kchmdialogchooseurlfromlist.cpp
@@ -0,0 +1,70 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "kde-qt.h"
+
+#include "kchmdialogchooseurlfromlist.h"
+#include "kchmtreeviewitem.h"
+
+KCHMDialogChooseUrlFromList::KCHMDialogChooseUrlFromList(const QStringList& urls, const QStringList& titles, QWidget* parent)
+ : QDialog(parent, 0, true)
+{
+ QVBoxLayout * layout = new QVBoxLayout (this);
+ layout->setMargin (5);
+
+ QListView * m_urlsList = new QListView (this);
+ m_urlsList->addColumn( i18n( "Topics" ) );
+
+ for ( unsigned int i = 0; i < urls.size(); i++ )
+ new KCHMSingleTreeViewItem (m_urlsList, titles[i], urls[i]);
+
+ layout->addWidget ( new QLabel( i18n( "Please select one of the topics below:"), this) );
+ layout->addWidget ( m_urlsList );
+
+ QHBoxLayout * hlayout = new QHBoxLayout (layout);
+ QPushButton * bok = new QPushButton( i18n( "&Ok" ), this);
+ QPushButton * bcancel = new QPushButton( i18n( "&Cancel" ), this);
+
+ hlayout->addWidget (bok);
+ hlayout->addWidget (bcancel);
+
+ connect( m_urlsList, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int) ), this, SLOT( onDoubleClicked ( QListViewItem *, const QPoint &, int) ) );
+ connect( m_urlsList, SIGNAL( currentChanged ( QListViewItem *) ), this, SLOT( onCurrentChanged ( QListViewItem *) ) );
+
+ connect( bok, SIGNAL( clicked () ), this, SLOT( accept() ) );
+ connect( bcancel, SIGNAL( clicked () ), this, SLOT( reject() ) );
+ m_acceptedurl = QString::null;
+}
+
+void KCHMDialogChooseUrlFromList::onDoubleClicked( QListViewItem * , const QPoint &, int )
+{
+ accept();
+}
+
+void KCHMDialogChooseUrlFromList::onCurrentChanged( QListViewItem * item )
+{
+ if ( item )
+ m_acceptedurl = ((KCHMSingleTreeViewItem *) item)->getUrl();
+ else
+ m_acceptedurl = QString::null;
+}
+
+#include "kchmdialogchooseurlfromlist.moc"
diff --git a/src/kchmdialogchooseurlfromlist.h b/src/kchmdialogchooseurlfromlist.h
new file mode 100644
index 0000000..c7f2898
--- /dev/null
+++ b/src/kchmdialogchooseurlfromlist.h
@@ -0,0 +1,47 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMDIALOGCHOOSEURLFROMLIST_H
+#define KCHMDIALOGCHOOSEURLFROMLIST_H
+
+#include <qdialog.h>
+#include <qlistview.h>
+
+/**
+@author tim
+*/
+class KCHMDialogChooseUrlFromList : public QDialog
+{
+Q_OBJECT
+public:
+ KCHMDialogChooseUrlFromList (const QStringList& urls, const QStringList& titles, QWidget* parent);
+ QString getSelectedItemUrl() { return m_acceptedurl; }
+
+private slots:
+ void onDoubleClicked( QListViewItem * item, const QPoint &, int );
+ void onCurrentChanged ( QListViewItem * item);
+
+private:
+ QListView * m_urlsList;
+ QString m_acceptedurl;
+};
+
+#endif
diff --git a/src/kchmindexwindow.cpp b/src/kchmindexwindow.cpp
new file mode 100644
index 0000000..6cc2a92
--- /dev/null
+++ b/src/kchmindexwindow.cpp
@@ -0,0 +1,179 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <qlayout.h>
+#include <qheader.h>
+
+#include "libchmfile.h"
+
+#include "kchmmainwindow.h"
+#include "kchmindexwindow.h"
+#include "kchmlistitemtooltip.h"
+#include "kchmtreeviewitem.h"
+
+#include "kchmindexwindow.moc"
+
+KCHMIndexWindow::KCHMIndexWindow ( QWidget * parent, const char * name, WFlags f )
+ : QWidget (parent, name, f)
+{
+ QVBoxLayout * layout = new QVBoxLayout (this);
+ layout->setMargin (5);
+
+ m_indexFinder = new QLineEdit (this);
+ m_indexFinder->setFocus();
+
+ m_indexList = new KQListView (this);
+ m_indexList->addColumn( "idx" ); // it is hidden anyway
+ m_indexList->header()->hide();
+ m_indexList->setTreeStepSize (10);
+ m_indexList->setShowToolTips(true);
+ //m_indexList->setSorting( 0, true );
+
+ layout->addWidget (m_indexFinder);
+ layout->addSpacing (10);
+ layout->addWidget (m_indexList);
+
+ connect( m_indexFinder,
+ SIGNAL( textChanged (const QString &) ),
+ this,
+ SLOT( onTextChanged(const QString &) ) );
+
+ connect( m_indexFinder,
+ SIGNAL( returnPressed() ),
+ this,
+ SLOT( onReturnPressed() ) );
+
+ connect( m_indexList,
+ SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int) ),
+ this,
+ SLOT( onDoubleClicked ( QListViewItem *, const QPoint &, int) ) );
+
+ connect( m_indexList,
+ SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ),
+ this,
+ SLOT( slotContextMenuRequested ( QListViewItem *, const QPoint &, int ) ) );
+
+ m_indexListFilled = false;
+ m_lastSelectedItem = 0;
+ m_contextMenu = 0;
+
+ new KCHMListItemTooltip( m_indexList );
+}
+
+void KCHMIndexWindow::onTextChanged ( const QString & newvalue)
+{
+ m_lastSelectedItem = m_indexList->findItem (newvalue, 0, Qt::BeginsWith);
+
+ if ( m_lastSelectedItem )
+ {
+ m_indexList->ensureItemVisible (m_lastSelectedItem);
+ m_indexList->setCurrentItem (m_lastSelectedItem);
+ }
+}
+
+void KCHMIndexWindow::showEvent( QShowEvent * )
+{
+ if ( !::mainWindow->chmFile() || m_indexListFilled )
+ return;
+
+ m_indexListFilled = true;
+ refillIndex();
+}
+
+void KCHMIndexWindow::onReturnPressed( )
+{
+ emit ::mainWindow->slotOnTreeClicked ( m_lastSelectedItem );
+}
+
+
+void KCHMIndexWindow::invalidate( )
+{
+ m_indexList->clear();
+ m_indexListFilled = false;
+}
+
+void KCHMIndexWindow::onDoubleClicked( QListViewItem *item, const QPoint &, int )
+{
+ if ( !item )
+ return;
+
+ KCHMIndTocItem * treeitem = (KCHMIndTocItem*) item;
+
+ QString url = treeitem->getUrl();
+
+ if ( !url )
+ return;
+
+ if ( url[0] == ':' ) // 'see also' link
+ {
+ m_lastSelectedItem = m_indexList->findItem (url.mid(1), 0);
+ if ( m_lastSelectedItem )
+ {
+ m_indexList->ensureItemVisible (m_lastSelectedItem);
+ m_indexList->setCurrentItem (m_lastSelectedItem);
+ }
+ }
+ else
+ ::mainWindow->openPage( url, OPF_CONTENT_TREE | OPF_ADD2HISTORY );
+}
+
+void KCHMIndexWindow::slotContextMenuRequested( QListViewItem * item, const QPoint & point, int )
+{
+ if ( !m_contextMenu )
+ m_contextMenu = ::mainWindow->currentBrowser()->createListItemContextMenu( this );
+
+ if( item )
+ {
+ KCHMIndTocItem * treeitem = (KCHMIndTocItem*) item;
+
+ ::mainWindow->currentBrowser()->setTabKeeper( treeitem->getUrl() );
+ m_contextMenu->popup( point );
+ }
+}
+
+void KCHMIndexWindow::refillIndex( )
+{
+ QValueVector< LCHMParsedEntry > data;
+
+ if ( !::mainWindow->chmFile()->parseIndex( &data )
+ || data.size() == 0 )
+ {
+ qWarning ("CHM index present but is empty; wrong parsing?");
+ return;
+ }
+
+ kchmFillListViewWithParsedData( m_indexList, data, 0 );
+}
+
+void KCHMIndexWindow::search( const QString & index )
+{
+ if ( !::mainWindow->chmFile() )
+ return;
+
+ if ( !m_indexListFilled )
+ {
+ m_indexListFilled = true;
+ refillIndex();
+ }
+
+ m_indexFinder->setText( index );
+ onTextChanged( index );
+}
diff --git a/src/kchmindexwindow.h b/src/kchmindexwindow.h
new file mode 100644
index 0000000..1067c4e
--- /dev/null
+++ b/src/kchmindexwindow.h
@@ -0,0 +1,62 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMINDEXWINDOW_H
+#define KCHMINDEXWINDOW_H
+
+
+#include <qlineedit.h>
+#include <qlistview.h>
+
+
+/**
+@author Georgy Yunaev
+*/
+class KCHMIndexWindow : public QWidget
+{
+ Q_OBJECT
+ public:
+ KCHMIndexWindow ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+
+ void invalidate();
+ void search( const QString& index );
+
+ public slots:
+ void slotContextMenuRequested ( QListViewItem *item, const QPoint &point, int column );
+
+ private slots:
+ void onTextChanged ( const QString & newvalue);
+ void onReturnPressed ();
+ void onDoubleClicked ( QListViewItem *, const QPoint &, int);
+
+ private:
+ virtual void showEvent ( QShowEvent * );
+
+ void refillIndex();
+
+ QLineEdit * m_indexFinder;
+ KQListView * m_indexList;
+ KQPopupMenu * m_contextMenu;
+ QListViewItem * m_lastSelectedItem;
+ bool m_indexListFilled;
+};
+
+#endif
diff --git a/src/kchmkeyeventfilter.cpp b/src/kchmkeyeventfilter.cpp
new file mode 100644
index 0000000..67d4cc6
--- /dev/null
+++ b/src/kchmkeyeventfilter.cpp
@@ -0,0 +1,53 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "kchmkeyeventfilter.h"
+
+KCHMKeyEventFilter gKeyEventFilter;
+
+KCHMKeyEventFilter::KCHMKeyEventFilter()
+ : QObject()
+{
+ m_shiftPressed = false;
+ m_ctrlPressed = false;
+}
+
+bool KCHMKeyEventFilter::eventFilter( QObject *, QEvent *e )
+{
+ // Handle KeyPress and KeyRelease events
+ if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease )
+ {
+ bool * ptr = 0;
+ QKeyEvent *k = (QKeyEvent *) e;
+
+ // We're interested only in Shift and Control
+ if ( k->key() == Qt::Key_Shift )
+ ptr = &m_shiftPressed;
+ else if ( k->key() == Qt::Key_Control )
+ ptr = &m_ctrlPressed;
+
+ // Set it
+ if ( ptr )
+ *ptr = e->type() == QEvent::KeyPress ? true : false;
+ }
+
+ return FALSE; // Standard event processing
+}
diff --git a/src/kchmkeyeventfilter.h b/src/kchmkeyeventfilter.h
new file mode 100644
index 0000000..7375293
--- /dev/null
+++ b/src/kchmkeyeventfilter.h
@@ -0,0 +1,49 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef INCLUDE_KCHMKEYEVENTFILTER_H
+#define INCLUDE_KCHMKEYEVENTFILTER_H
+
+#include <qobject.h>
+
+/*!*
+ * This class must be installed as a global event handler. Its responsibility
+ * is to intercept keyboard events, and store the Shift and Ctrl keys state information.
+ * Unfortunately it seems to be the only way to do it in Qt.
+ */
+class KCHMKeyEventFilter : public QObject
+{
+ public:
+ KCHMKeyEventFilter();
+
+ bool isShiftPressed() const { return m_shiftPressed; }
+ bool isCtrlPressed() const { return m_ctrlPressed; }
+
+ private:
+ bool eventFilter( QObject *, QEvent *e );
+
+ bool m_shiftPressed;
+ bool m_ctrlPressed;
+};
+
+extern KCHMKeyEventFilter gKeyEventFilter;
+
+#endif /* INCLUDE_KCHMKEYEVENTFILTER_H */
diff --git a/src/kchmlistitemtooltip.h b/src/kchmlistitemtooltip.h
new file mode 100644
index 0000000..07014c8
--- /dev/null
+++ b/src/kchmlistitemtooltip.h
@@ -0,0 +1,72 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef INCLUDE_KCHMLISTITEMTOOLTIP_H
+#define INCLUDE_KCHMLISTITEMTOOLTIP_H
+
+#include "kde-qt.h"
+#include "forwarddeclarations.h"
+
+/**
+@author tim
+*/
+class KCHMListItemTooltip : public QToolTip
+{
+ public:
+ KCHMListItemTooltip( KQListView *parent )
+ : QToolTip( parent->viewport() ) { m_pParent = parent; }
+
+ virtual ~KCHMListItemTooltip() {};
+
+ void maybeTip ( const QPoint & pos )
+ {
+ QListViewItem *it = m_pParent->itemAt( pos );
+
+ if ( !it )
+ return;
+
+ // Get the section the mouse is in
+ int section = m_pParent->header()->sectionAt (pos.x ());
+
+ // Get the rect of the whole item (the row for the tip)
+ QRect itemRect = m_pParent->itemRect( it );
+
+ // Get the rect of the whole section (the column for the tip)
+ QRect headerRect = m_pParent->header ()->sectionRect (section);
+
+ // "Intersect" row and column to get exact rect for the tip
+ QRect destRect( headerRect.left (), itemRect.top(), headerRect.width(), itemRect.height() );
+
+ int item_width = it->width( m_pParent->fontMetrics(), m_pParent, 0 )
+ + it->depth() * m_pParent->treeStepSize();
+
+ if ( m_pParent->rootIsDecorated() )
+ item_width += m_pParent->treeStepSize();
+
+ if ( item_width > m_pParent->viewport()->width() )
+ tip( destRect, it->text(0) );
+ }
+
+ private:
+ KQListView * m_pParent;
+};
+
+#endif /* INCLUDE_KCHMLISTITEMTOOLTIP_H */
diff --git a/src/kchmmainwindow.cpp b/src/kchmmainwindow.cpp
new file mode 100644
index 0000000..13417f1
--- /dev/null
+++ b/src/kchmmainwindow.cpp
@@ -0,0 +1,1298 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <stdlib.h>
+#include <signal.h>
+#include <string.h>
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+
+#include "kde-qt.h"
+
+#include <qaccel.h>
+#include <qevent.h>
+
+#include "libchmfile.h"
+#include "libchmfileimpl.h"
+#include "libchmurlfactory.h"
+
+#include "kchmmainwindow.h"
+#include "kchmconfig.h"
+#include "kchmindexwindow.h"
+#include "kchmsearchwindow.h"
+#include "kchmbookmarkwindow.h"
+#include "kchmtreeviewitem.h"
+#include "kchmsearchtoolbar.h"
+#include "kchmsettings.h"
+#include "kchmsetupdialog.h"
+#include "iconstorage.h"
+#include "kchmnavtoolbar.h"
+#include "kchmviewwindow.h"
+#include "kchmviewwindowmgr.h"
+#include "kchmkeyeventfilter.h"
+#include "kchmcontentswindow.h"
+
+#if !defined (USE_KDE)
+ #include "kqrunprocess.h"
+#endif
+
+#include "kchmmainwindow.moc"
+
+
+KCHMMainWindow::KCHMMainWindow()
+ : KQMainWindow ( 0, "KCHMMainWindow", WDestructiveClose )
+{
+ const unsigned int WND_X_SIZE = 700;
+ const unsigned int WND_Y_SIZE = 500;
+ const unsigned int SPLT_X_SIZE = 200;
+
+ m_FirstTimeShow = true;
+ m_chmFile = 0;
+
+ m_indexWindow = 0;
+ m_searchWindow = 0;
+ m_contentsWindow = 0;
+ m_viewWindowMgr = 0;
+
+ m_tabContextPage = -1;
+ m_tabIndexPage = -1;
+ m_tabSearchPage = -1;
+ m_tabBookmarkPage = -1;
+
+ setupSignals();
+
+ m_currentSettings = new KCHMSettings;
+
+ // Create the initial layout - a splitter with tab window in left, and text browser in right
+ m_windowSplitter = new QSplitter(this);
+ m_tabWidget = new KQTabWidget( m_windowSplitter );
+ m_viewWindowMgr = new KCHMViewWindowMgr( m_windowSplitter );
+
+ m_bookmarkWindow = new KCHMBookmarkWindow (m_tabWidget);
+
+ // Add the tabs
+ m_tabWidget->addTab( m_bookmarkWindow, i18n("Bookmarks") );
+
+ setupToolbarsAndMenu();
+
+ setCentralWidget( m_windowSplitter );
+
+ QValueList<int> sizes;
+ sizes.push_back (SPLT_X_SIZE);
+ sizes.push_back (WND_X_SIZE - SPLT_X_SIZE);
+ m_windowSplitter->setSizes (sizes);
+
+ resize (WND_X_SIZE, WND_Y_SIZE);
+
+#if defined (ENABLE_AUTOTEST_SUPPORT)
+ m_autoteststate = STATE_OFF;
+ m_useShortAutotest = false;
+#endif /* defined (ENABLE_AUTOTEST_SUPPORT) */
+
+ QAccel * accel = new QAccel( this );
+ accel->connectItem ( accel->insertItem ( Key_F11 ), this, SLOT ( slotToggleFullScreenMode() ) );
+ accel->connectItem ( accel->insertItem ( CTRL + Key_1), this, SLOT ( slotActivateContentTab() ) );
+ accel->connectItem ( accel->insertItem ( CTRL + Key_2), this, SLOT ( slotActivateIndexTab() ) );
+ accel->connectItem ( accel->insertItem ( CTRL + Key_3), this, SLOT ( slotActivateSearchTab() ) );
+ accel->connectItem ( accel->insertItem ( CTRL + Key_4), this, SLOT ( slotActivateBookmarkTab() ) );
+ accel->connectItem ( accel->insertItem ( Key_F3 ), m_searchToolbar, SLOT ( onBtnNextSearchResult() ) );
+
+ statusBar()->show();
+ setIcon( *gIconStorage.getApplicationIcon() );
+
+ m_aboutDlgMenuText = i18n( "%1 version %2\n\nCopyright (C) George Yunaev,"
+ "gyunaev@ulduzsoft.com, 2004-2007\nhttp://www.kchmviewer.net\n\n"
+ "Licensed under GNU GPL license.\n\n"
+ "Please check my another project, http://www.transientmail.com - temporary "
+ "e-mail address, which expires automatically." )
+ . arg(APP_NAME) . arg(APP_VERSION);
+}
+
+
+KCHMMainWindow::~KCHMMainWindow()
+{
+}
+
+
+void KCHMMainWindow::slotOpenMenuItemActivated()
+{
+#if defined (USE_KDE)
+ QString fn = KFileDialog::getOpenFileName( appConfig.m_lastOpenedDir, i18n("*.chm|Compressed Help Manual (*.chm)"), this);
+#else
+ QString fn = QFileDialog::getOpenFileName( appConfig.m_lastOpenedDir, i18n("Compressed Help Manual (*.chm)"), this);
+#endif
+
+ if ( !fn.isEmpty() )
+ loadChmFile( fn );
+ else
+ {
+ if ( !m_chmFile )
+ exit (1);
+
+ statusBar()->message( i18n("Loading aborted"), 2000 );
+ }
+}
+
+
+bool KCHMMainWindow::loadChmFile ( const QString &fileName, bool call_open_page )
+{
+ LCHMFile * new_chmfile = new LCHMFile();
+
+ if ( new_chmfile->loadFile( fileName ) )
+ {
+ // The new file is opened, so we can close the old one
+ if ( m_chmFile )
+ {
+ closeChmFile( );
+ delete m_chmFile;
+ }
+
+ m_chmFile = new_chmfile;
+
+ // Show current encoding in status bar
+ showInStatusBar( tr("Detected chm file charset: %1") . arg(m_chmFile->currentEncoding()->language) );
+
+ // Make the file name absolute; we'll need it later
+ QDir qd;
+ qd.setPath (fileName);
+ m_chmFilename = qd.absPath();
+
+ // Qt's 'dirname' does not work well
+ QFileInfo qf ( m_chmFilename );
+ appConfig.m_lastOpenedDir = qf.dirPath(true);
+
+ // Order the tabulations
+ int number_of_pages = 0;
+
+ if ( m_chmFile->hasTableOfContents() )
+ m_tabContextPage = number_of_pages++;
+ else
+ m_tabContextPage = -1;
+
+ if ( m_chmFile->hasIndexTable() )
+ m_tabIndexPage = number_of_pages++;
+ else
+ m_tabIndexPage = -1;
+
+ // We always show search
+ m_tabSearchPage = number_of_pages++;
+
+ m_tabBookmarkPage = number_of_pages;
+
+ showOrHideContextWindow( m_tabContextPage );
+ showOrHideIndexWindow( m_tabIndexPage );
+ showOrHideSearchWindow( m_tabSearchPage );
+
+ m_bookmarkWindow->invalidate();
+ m_navToolbar->updateIconStatus( false, false );
+ m_viewWindowMgr->invalidate();
+ refreshCurrentBrowser();
+
+ if ( m_currentSettings->loadSettings (fileName) )
+ {
+ const LCHMTextEncoding * encoding =
+ m_chmFile->impl()->lookupByLCID( m_currentSettings->m_activeencodinglcid );
+
+ m_tabWidget->setCurrentPage( m_currentSettings->m_activetabsystem );
+
+ if ( encoding )
+ {
+ m_chmFile->setCurrentEncoding( encoding );
+ m_searchToolbar->setChosenEncodingInMenu( encoding );
+ }
+
+ if ( m_searchWindow )
+ m_searchWindow->restoreSettings (m_currentSettings->m_searchhistory);
+
+ m_bookmarkWindow->restoreSettings (m_currentSettings->m_bookmarks);
+
+ if ( call_open_page )
+ {
+ m_viewWindowMgr->restoreSettings( m_currentSettings->m_viewwindows );
+ m_viewWindowMgr->setCurrentPage( m_currentSettings->m_activetabwindow );
+ }
+
+ // Restore the main window size
+ QValueList<int> sizes;
+ sizes.push_back( m_currentSettings->m_window_size_splitter );
+ sizes.push_back( m_currentSettings->m_window_size_x - m_currentSettings->m_window_size_splitter );
+
+ m_windowSplitter->setSizes( sizes );
+ resize( m_currentSettings->m_window_size_x, m_currentSettings->m_window_size_y );
+ }
+ else
+ {
+ m_tabWidget->setCurrentPage (0);
+ m_searchToolbar->setChosenEncodingInMenu( m_chmFile->currentEncoding() );
+
+ if ( call_open_page )
+ openPage( m_chmFile->homeUrl() );
+ }
+
+ m_searchToolbar->setEnabled (true);
+ appConfig.addFileToHistory( m_chmFilename );
+ updateHistoryMenu();
+ return true;
+ }
+ else
+ {
+ QMessageBox mbox(
+ i18n("%1 - failed to load the chm file") . arg(APP_NAME),
+ i18n("Unable to load the chm file %1") . arg(fileName),
+ QMessageBox::Critical,
+ QMessageBox::Ok,
+ QMessageBox::NoButton,
+ QMessageBox::NoButton);
+ mbox.exec();
+
+ statusBar()->message(
+ i18n("Could not load file %1").arg(fileName),
+ 2000 );
+ delete new_chmfile;
+ return false;
+ }
+}
+
+
+void KCHMMainWindow::slotPrintMenuItemActivated()
+{
+ currentBrowser()->printCurrentPage();
+}
+
+
+void KCHMMainWindow::slotAboutMenuItemActivated()
+{
+ QString caption = i18n( "About %1" ) . arg(APP_NAME);
+ QString text = m_aboutDlgMenuText;
+
+ // It is quite funny that the argument order differs
+#if defined (USE_KDE)
+ KMessageBox::about( this, text, caption );
+#else
+ QMessageBox::about( this, caption, text );
+#endif
+}
+
+
+void KCHMMainWindow::slotAboutQtMenuItemActivated()
+{
+ QMessageBox::aboutQt( this, APP_NAME);
+}
+
+void KCHMMainWindow::refreshCurrentBrowser( )
+{
+ QString title = m_chmFile->title();
+
+ if ( !title )
+ title = APP_NAME;
+ // KDE adds application name automatically, so we don't need it here
+#if !defined (USE_KDE)
+ else
+ title = (QString) APP_NAME + " - " + title;
+#endif
+
+ setCaption ( title );
+
+ currentBrowser()->invalidate();
+
+ if ( m_contentsWindow )
+ m_contentsWindow->refillTableOfContents();
+}
+
+void KCHMMainWindow::slotOnTreeClicked( QListViewItem * item )
+{
+ bool unused;
+
+ if ( !item )
+ return;
+
+ KCHMIndTocItem * treeitem = (KCHMIndTocItem*) item;
+ slotLinkClicked( treeitem->getUrl(), unused );
+}
+
+
+void KCHMMainWindow::slotLinkClicked ( const QString & link, bool& follow_link )
+{
+ if ( link.isEmpty() )
+ return;
+
+ if ( gKeyEventFilter.isShiftPressed() )
+ {
+ openPage( link, OPF_NEW_TAB | OPF_CONTENT_TREE );
+ follow_link = false;
+ }
+ else if ( gKeyEventFilter.isCtrlPressed() )
+ {
+ openPage( link, OPF_NEW_TAB | OPF_BACKGROUND );
+ follow_link = false;
+ }
+ else
+ // If the openPage failed, we do not need to follow the link.
+ follow_link = openPage( link, OPF_CONTENT_TREE | OPF_ADD2HISTORY );
+}
+
+
+bool KCHMMainWindow::openPage( const QString & srcurl, unsigned int flags )
+{
+ QString p1, p2, url = srcurl;
+
+ if ( url == "/" )
+ url = m_chmFile->homeUrl();
+
+ if ( LCHMUrlFactory::isRemoteURL (url, p1) )
+ {
+ switch ( appConfig.m_onExternalLinkClick )
+ {
+ case KCHMConfig::ACTION_DONT_OPEN:
+ break;
+
+ case KCHMConfig::ACTION_ASK_USER:
+ if ( QMessageBox::question(this,
+ i18n("%1 - remote link clicked - %2") . arg(APP_NAME) . arg(p1),
+ i18n("A remote link %1 will start the external program to open it.\n\nDo you want to continue?").arg( url ),
+ i18n("&Yes"), i18n("&No"),
+ QString::null, 0, 1 ) )
+ return false;
+
+ // no break! should continue to open.
+
+ case KCHMConfig::ACTION_ALWAYS_OPEN:
+ {
+#if defined (USE_KDE)
+ new KRun ( url );
+#else
+ run_process( appConfig.m_QtBrowserPath, url );
+#endif
+ }
+ break;
+ }
+
+ return false; // do not change the current page.
+ }
+
+ // Filter the URLs which do not need to be opened at all by Qt version
+ if ( LCHMUrlFactory::isJavascriptURL (url) )
+ {
+ QMessageBox::information( this,
+ i18n( "%1 - JavsScript link clicked") . arg(APP_NAME),
+ i18n( "You have clicked a JavaScript link.\nTo prevent security-related issues JavaScript URLs are disabled in CHM files.") );
+
+ return false;
+ }
+
+ if ( LCHMUrlFactory::isNewChmURL (url, p1, p2) && p1 != m_chmFilename )
+ {
+ if ( QMessageBox::question( this,
+ i18n( "%1 - link to a new CHM file clicked"). arg(APP_NAME),
+ i18n( "You have clicked a link, which leads to a new CHM file %1.\nThe current file will be closed.\n\nDo you want to continue?").arg( p1 ),
+ i18n( "&Yes" ), i18n( "&No" ),
+ QString::null, 0, 1 ) )
+ return false;
+
+ // Because chm file always contain relative link, and current filename is not changed,
+ // we need to form a new path
+ QFileInfo qfi( m_chmFilename );
+ QString newfilename = qfi.dirPath(true) + "/" + p1;
+
+ QStringList event_args;
+ event_args.push_back( newfilename );
+ event_args.push_back( p2 ); // url
+
+ qApp->postEvent( this, new KCHMUserEvent( "loadAndOpen", event_args ) );
+ return false;
+ }
+
+ KCHMViewWindow * vwnd = currentBrowser();
+ if ( flags & OPF_NEW_TAB )
+ vwnd = m_viewWindowMgr->addNewTab( !(flags & OPF_BACKGROUND) );
+
+ // Store current page and position to add it to history if we change it
+ int hist_scrollpos = currentBrowser()->getScrollbarPosition();
+ QString hist_url = currentBrowser()->getOpenedPage();
+
+ if ( vwnd->openUrl (url) )
+ {
+ // Open all the tree items to show current item (if needed)
+ if ( (flags & OPF_CONTENT_TREE) != 0 )
+ locateInContentTree( vwnd->getOpenedPage() );
+
+ if ( flags & OPF_ADD2HISTORY )
+ currentBrowser()->addNavigationHistory( hist_url, hist_scrollpos );
+ }
+
+ return true;
+}
+
+
+void KCHMMainWindow::showEvent( QShowEvent * )
+{
+ if ( !m_FirstTimeShow )
+ return;
+
+ m_FirstTimeShow = false;
+
+ if ( !parseCmdLineArgs( ) )
+ {
+ if ( appConfig.m_LoadLatestFileOnStartup && appConfig.m_History.size() > 0 )
+ {
+ if ( loadChmFile ( appConfig.m_History[0] ) )
+ return;
+ }
+
+ emit slotOpenMenuItemActivated();
+ }
+}
+
+void KCHMMainWindow::setupToolbarsAndMenu( )
+{
+ // Create a 'file' toolbar
+ QToolBar * toolbar = new QToolBar(this);
+
+ toolbar->setLabel( i18n( "File Operations") );
+
+ QPixmap iconFileOpen (*gIconStorage.getToolbarPixmap(KCHMIconStorage::fileopen));
+ QToolButton * fileOpen = new QToolButton (iconFileOpen,
+ i18n( "Open File" ),
+ QString::null,
+ this,
+ SLOT( slotOpenMenuItemActivated() ),
+ toolbar);
+
+ QString fileOpenText = i18n( "Click this button to open an existing chm file." );
+ QWhatsThis::add( fileOpen, fileOpenText );
+
+ QPixmap iconFilePrint (*gIconStorage.getToolbarPixmap(KCHMIconStorage::print));
+ QToolButton * filePrint = new QToolButton (iconFilePrint,
+ i18n( "Print File" ),
+ QString::null,
+ this,
+ SLOT( slotPrintMenuItemActivated() ),
+ toolbar);
+
+ QString filePrintText = i18n( "Click this button to print the current page");
+ QWhatsThis::add( filePrint, filePrintText );
+
+ // Setup the menu
+ KQPopupMenu * file = new KQPopupMenu( this );
+ menuBar()->insertItem( i18n( "&File"), file );
+
+ int id;
+ id = file->insertItem ( iconFileOpen, i18n( "&Open..."), this, SLOT( slotOpenMenuItemActivated() ), CTRL+Key_O );
+ file->setWhatsThis( id, fileOpenText );
+
+ id = file->insertItem( iconFilePrint, i18n( "&Print..."), this, SLOT( slotPrintMenuItemActivated() ), CTRL+Key_P );
+ file->setWhatsThis( id, filePrintText );
+
+ file->insertSeparator();
+ id = file->insertItem ( i18n( "E&xtract CHM content..."), this, SLOT( slotExtractCHM() ) );
+ file->setWhatsThis( id, i18n( "Click this button to extract the whole CHM file content into a specific directory") );
+ file->insertSeparator();
+
+ m_menuHistory = new KQPopupMenu( file );
+ connect ( m_menuHistory, SIGNAL( activated(int) ), this, SLOT ( slotHistoryMenuItemActivated(int) ));
+
+ file->insertItem( i18n( "&Recent files"), m_menuHistory );
+
+ file->insertSeparator();
+ file->insertItem( i18n( "&Quit"), qApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
+
+ KQPopupMenu * menu_edit = new KQPopupMenu( this );
+ menuBar()->insertItem( i18n( "&Edit"), menu_edit );
+
+ menu_edit->insertItem ( i18n( "&Copy"), this, SLOT( slotBrowserCopy()), CTRL+Key_C );
+ menu_edit->insertItem ( i18n( "&Select all"), this, SLOT( slotBrowserSelectAll()), CTRL+Key_A );
+
+ menu_edit->insertSeparator();
+
+ // KCHMNavToolbar
+ m_navToolbar = new KCHMNavToolbar( this );
+
+ // KCHMSearchToolbar also adds 'view' menu
+ m_searchToolbar = new KCHMSearchAndViewToolbar (this);
+
+ // m_bookmarkWindow adds 'Bookmarks' menu
+ m_bookmarkWindow->createMenu( this );
+
+ // m_viewWindowMgr creates 'Window' menu
+ m_viewWindowMgr->createMenu( this );
+
+ KQPopupMenu * settings = new KQPopupMenu( this );
+ menuBar()->insertItem( i18n( "&Settings"), settings );
+ settings->insertItem( i18n( "&Change settings..."), this, SLOT( slotChangeSettingsMenuItemActivated() ));
+
+#if defined(USE_KDE)
+ QPopupMenu *help = helpMenu( m_aboutDlgMenuText );
+#else
+ KQPopupMenu * help = new KQPopupMenu( this );
+ help->insertItem( i18n( "&About"), this, SLOT( slotAboutMenuItemActivated() ), Key_F1 );
+ help->insertItem( i18n( "About &Qt"), this, SLOT( slotAboutQtMenuItemActivated() ));
+ help->insertSeparator();
+ help->insertItem( i18n( "What's &This"), this, SLOT(whatsThis()), SHIFT+Key_F1 );
+#endif
+
+ menuBar()->insertItem( i18n( "&Help"), help );
+ updateHistoryMenu();
+}
+
+void KCHMMainWindow::slotAddBookmark( )
+{
+ emit m_bookmarkWindow->onAddBookmarkPressed ();
+}
+
+void KCHMMainWindow::setTextEncoding( const LCHMTextEncoding * encoding )
+{
+ m_chmFile->setCurrentEncoding( encoding );
+ m_searchToolbar->setChosenEncodingInMenu( encoding );
+
+ // Because updateView() will call view->invalidate(), which clears the view->getOpenedPage(),
+ // we have to make a copy of it.
+ QString url = currentBrowser()->getOpenedPage();
+
+ // Regenerate the content and index trees
+ refreshCurrentBrowser();
+
+ currentBrowser()->openUrl( url );
+}
+
+void KCHMMainWindow::closeChmFile( )
+{
+ // Prepare the settings
+ if ( appConfig.m_HistoryStoreExtra )
+ {
+ m_currentSettings->m_activeencodinglcid = m_chmFile->currentEncoding()->winlcid;
+ m_currentSettings->m_activetabsystem = m_tabWidget->currentPageIndex( );
+ m_currentSettings->m_activetabwindow = m_viewWindowMgr->currentPageIndex( );
+
+ m_currentSettings->m_window_size_x = width();
+ m_currentSettings->m_window_size_y = height();
+ m_currentSettings->m_window_size_splitter = m_windowSplitter->sizes()[0];
+
+ if ( m_searchWindow )
+ m_searchWindow->saveSettings (m_currentSettings->m_searchhistory);
+
+ m_bookmarkWindow->saveSettings( m_currentSettings->m_bookmarks );
+
+ m_viewWindowMgr->saveSettings( m_currentSettings->m_viewwindows );
+
+ m_currentSettings->saveSettings( );
+ }
+
+ appConfig.save();
+}
+
+
+void KCHMMainWindow::closeEvent ( QCloseEvent * e )
+{
+ // Save the settings if we have something opened
+ if ( m_chmFile )
+ {
+ closeChmFile( );
+ delete m_chmFile;
+ m_chmFile = 0;
+ }
+
+ QMainWindow::closeEvent ( e );
+}
+
+bool KCHMMainWindow::parseCmdLineArgs( )
+{
+ QString filename = QString::null, search_query = QString::null;
+ QString search_index = QString::null, search_bookmark = QString::null;
+ bool do_autotest = false;
+
+#if defined (USE_KDE)
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+
+ if ( args->isSet("autotestmode") )
+ do_autotest = true;
+
+ if ( args->isSet("shortautotestmode") )
+ do_autotest = m_useShortAutotest = true;
+
+ search_query = args->getOption ("search");
+ search_index = args->getOption ("sindex");
+
+ if ( args->count() > 0 )
+ filename = args->arg(0);
+#else
+ // argv[0] in Qt is still a program name
+ for ( int i = 1; i < qApp->argc(); i++ )
+ {
+ if ( !strcmp (qApp->argv()[i], "--autotestmode") )
+ do_autotest = m_useShortAutotest = true;
+ else if ( !strcmp (qApp->argv()[i], "--shortautotestmode") )
+ do_autotest = true;
+ else if ( !strcmp (qApp->argv()[i], "--search") )
+ search_query = qApp->argv()[++i];
+ else if ( !strcmp (qApp->argv()[i], "--sindex") )
+ search_index = qApp->argv()[++i];
+ else if ( !strcmp (qApp->argv()[i], "-h") || !strcmp (qApp->argv()[i], "--help") )
+ {
+ fprintf (stderr, "Usage: %s [chmfile]\n", qApp->argv()[0]);
+ exit (1);
+ }
+ else
+ filename = qApp->argv()[i];
+ }
+#endif
+
+ if ( !filename.isEmpty() )
+ {
+ if ( !loadChmFile( QString::fromLocal8Bit( filename )) )
+ return true; // skip the latest checks, but do not exit from the program
+
+ if ( !search_index.isEmpty() )
+ {
+ QStringList event_args;
+ event_args.push_back( search_index );
+ qApp->postEvent( this, new KCHMUserEvent( "findInIndex", event_args ) );
+ }
+
+ if ( !search_query.isEmpty() )
+ {
+ QStringList event_args;
+ event_args.push_back( search_query );
+ qApp->postEvent( this, new KCHMUserEvent( "searchQuery", event_args ) );
+ }
+
+ if ( do_autotest )
+ {
+#if defined (ENABLE_AUTOTEST_SUPPORT)
+ if ( filename.isEmpty() )
+ qFatal ("Could not use Auto Test mode without a chm file!");
+
+ m_autoteststate = STATE_INITIAL;
+ showMinimized ();
+ runAutoTest();
+#else
+ qFatal ("Auto Test mode support is not compiled in.");
+#endif /* defined (ENABLE_AUTOTEST_SUPPORT) */
+ }
+ return true;
+ }
+
+ return false;
+}
+
+void KCHMMainWindow::slotBrowserSelectAll( )
+{
+ currentBrowser()->clipSelectAll();
+}
+
+void KCHMMainWindow::slotBrowserCopy( )
+{
+ currentBrowser()->clipCopy();
+}
+
+void KCHMMainWindow::slotChangeSettingsMenuItemActivated()
+{
+ KCHMSetupDialog dlg ( this );
+
+ // Set up the parameters
+ dlg.m_radioOnBeginOpenDialog->setChecked ( !appConfig.m_LoadLatestFileOnStartup );
+ dlg.m_radioOnBeginOpenLast->setChecked ( appConfig.m_LoadLatestFileOnStartup );
+ dlg.m_historySize->setValue ( appConfig.m_HistorySize );
+ dlg.m_rememberHistoryInfo->setChecked ( appConfig.m_HistoryStoreExtra );
+
+ dlg.m_radioExtLinkOpenAlways->setChecked ( appConfig.m_onExternalLinkClick == KCHMConfig::ACTION_ALWAYS_OPEN );
+ dlg.m_radioExtLinkAsk->setChecked ( appConfig.m_onExternalLinkClick == KCHMConfig::ACTION_ASK_USER );
+ dlg.m_radioExtLinkOpenNever->setChecked ( appConfig.m_onExternalLinkClick == KCHMConfig::ACTION_DONT_OPEN );
+
+ dlg.m_radioNewChmOpenAlways->setChecked ( appConfig.m_onNewChmClick == KCHMConfig::ACTION_ALWAYS_OPEN );
+ dlg.m_radioNewChmAsk->setChecked ( appConfig.m_onNewChmClick == KCHMConfig::ACTION_ASK_USER );
+ dlg.m_radioNewChmOpenNever->setChecked ( appConfig.m_onNewChmClick == KCHMConfig::ACTION_DONT_OPEN );
+
+#if defined (USE_KDE)
+ dlg.m_groupQtsettings->setEnabled ( false );
+ dlg.m_groupKDEsettings->setEnabled ( true );
+#else
+ dlg.m_groupQtsettings->setEnabled ( true );
+ dlg.m_groupKDEsettings->setEnabled ( false );
+#endif
+
+ dlg.m_qtBrowserPath->setText ( appConfig.m_QtBrowserPath );
+ dlg.m_radioUseQtextBrowser->setChecked ( appConfig.m_kdeUseQTextBrowser );
+ dlg.m_radioUseKHTMLPart->setChecked ( !appConfig.m_kdeUseQTextBrowser );
+
+ dlg.m_enableJS->setChecked ( appConfig.m_kdeEnableJS );
+ dlg.m_enablePlugins->setChecked ( appConfig.m_kdeEnablePlugins );
+ dlg.m_enableJava->setChecked ( appConfig.m_kdeEnableJava );
+ dlg.m_enableRefresh->setChecked ( appConfig.m_kdeEnableRefresh );
+
+ dlg.m_advExternalProgramName->setText( appConfig.m_advExternalEditorPath );
+ dlg.m_advViewSourceExternal->setChecked ( !appConfig.m_advUseInternalEditor );
+ dlg.m_advViewSourceInternal->setChecked ( appConfig.m_advUseInternalEditor );
+
+ // Search engine
+ dlg.m_useSearchEngineInternal->setChecked( appConfig.m_useSearchEngine == KCHMConfig::SEARCH_USE_CHM );
+ dlg.m_useSearchEngineNew->setChecked( appConfig.m_useSearchEngine == KCHMConfig::SEARCH_USE_MINE );
+
+ // Connect buddies
+ dlg.m_labelUseSearchEngineInternal->setBuddy( dlg.m_useSearchEngineInternal );
+ dlg.m_labelUseSearchEngineNew->setBuddy( dlg.m_useSearchEngineNew );
+
+ if ( dlg.exec() == QDialog::Accepted )
+ {
+ appConfig.m_LoadLatestFileOnStartup = dlg.m_radioOnBeginOpenLast->isChecked();
+ appConfig.m_HistorySize = dlg.m_historySize->value();
+ appConfig.m_HistoryStoreExtra = dlg.m_rememberHistoryInfo->isChecked();
+
+ if ( dlg.m_radioExtLinkOpenAlways->isChecked () )
+ appConfig.m_onExternalLinkClick = KCHMConfig::ACTION_ALWAYS_OPEN;
+ else if ( dlg.m_radioExtLinkAsk->isChecked () )
+ appConfig.m_onExternalLinkClick = KCHMConfig::ACTION_ASK_USER;
+ else
+ appConfig.m_onExternalLinkClick = KCHMConfig::ACTION_DONT_OPEN;
+
+ if ( dlg.m_radioNewChmOpenAlways->isChecked () )
+ appConfig.m_onNewChmClick = KCHMConfig::ACTION_ALWAYS_OPEN;
+ else if ( dlg.m_radioNewChmAsk->isChecked () )
+ appConfig.m_onNewChmClick = KCHMConfig::ACTION_ASK_USER;
+ else
+ appConfig.m_onNewChmClick = KCHMConfig::ACTION_DONT_OPEN;
+
+ appConfig.m_QtBrowserPath = dlg.m_qtBrowserPath->text();
+
+ // Check the changes
+ bool need_restart = false;
+
+ if ( appConfig.m_kdeEnableJS != dlg.m_enableJS->isChecked() )
+ {
+ need_restart = true;
+ appConfig.m_kdeEnableJS = dlg.m_enableJS->isChecked();
+ }
+
+ if ( appConfig.m_kdeEnablePlugins != dlg.m_enablePlugins->isChecked() )
+ {
+ need_restart = true;
+ appConfig.m_kdeEnablePlugins = dlg.m_enablePlugins->isChecked();
+ }
+
+ if ( appConfig.m_kdeEnableJava != dlg.m_enableJava->isChecked() )
+ {
+ need_restart = true;
+ appConfig.m_kdeEnableJava = dlg.m_enableJava->isChecked();
+ }
+
+ if ( appConfig.m_kdeEnableRefresh != dlg.m_enableRefresh->isChecked() )
+ {
+ need_restart = true;
+ appConfig.m_kdeEnableRefresh = dlg.m_enableRefresh->isChecked();
+ }
+
+ if ( appConfig.m_kdeUseQTextBrowser != dlg.m_radioUseQtextBrowser->isChecked() )
+ {
+ need_restart = true;
+ appConfig.m_kdeUseQTextBrowser = dlg.m_radioUseQtextBrowser->isChecked();
+ }
+
+ if ( dlg.m_useSearchEngineNew->isChecked()
+ && appConfig.m_useSearchEngine == KCHMConfig::SEARCH_USE_CHM )
+ {
+ appConfig.m_useSearchEngine = KCHMConfig::SEARCH_USE_MINE;
+ m_searchWindow->invalidate();
+ }
+
+ if ( dlg.m_useSearchEngineInternal->isChecked()
+ && appConfig.m_useSearchEngine == KCHMConfig::SEARCH_USE_MINE )
+ {
+ appConfig.m_useSearchEngine = KCHMConfig::SEARCH_USE_CHM;
+ m_searchWindow->invalidate();
+ }
+
+ appConfig.m_advExternalEditorPath = dlg.m_advExternalProgramName->text();
+ appConfig.m_advUseInternalEditor = dlg.m_advViewSourceExternal->isChecked();
+ appConfig.m_advUseInternalEditor = dlg.m_advViewSourceInternal->isChecked();
+
+ appConfig.save();
+
+ if ( need_restart )
+ QMessageBox::information(
+ this,
+ APP_NAME,
+ i18n( "Changing browser view options or search engine used\n"
+ "requires restarting the application to take effect." ) );
+ }
+}
+
+
+void KCHMMainWindow::setupSignals( )
+{
+#if defined(HAVE_SIGACTION)
+ struct sigaction sa;
+ memset ((char *)&sa, 0, sizeof(sa));
+ sigemptyset (&sa.sa_mask);
+ sigaddset (&sa.sa_mask, SIGCHLD);
+
+#ifdef SA_RESTART
+ sa.sa_flags = SA_RESTART;
+#endif
+
+ sa.sa_handler = SIG_IGN;
+ sigaction (SIGCHLD, &sa, (struct sigaction *)0);
+#else /* !HAVE_SIGACTION */
+ signal (SIGCHLD, SIG_IGN);
+#endif /* HAVE_SIGACTION */
+}
+
+void KCHMMainWindow::slotHistoryMenuItemActivated( int item )
+{
+ if ( item < 0 || item >= (signed) appConfig.m_History.size() )
+ qFatal ("KCHMMainWindow::slotHistoryMenuItemActivated: bad history menu id %d", item);
+
+ QString filename = appConfig.m_History[item];
+
+ // remove it, so it will be added again at the history top, and will not shitf anything.
+// appConfig.m_History.remove ( appConfig.m_History.begin() + item);
+ loadChmFile ( filename );
+}
+
+void KCHMMainWindow::updateHistoryMenu()
+{
+ m_menuHistory->clear ();
+
+ for ( int i = appConfig.m_History.size() - 1; i >= 0; i-- )
+ m_menuHistory->insertItem( appConfig.m_History[i], i );
+}
+
+void KCHMMainWindow::slotActivateContentTab( )
+{
+ if ( m_tabContextPage != -1 )
+ m_tabWidget->setCurrentPage( m_tabContextPage );
+}
+
+void KCHMMainWindow::slotActivateIndexTab( )
+{
+ if ( m_tabIndexPage != -1 )
+ m_tabWidget->setCurrentPage( m_tabIndexPage );
+}
+
+void KCHMMainWindow::slotActivateSearchTab( )
+{
+ if ( m_tabSearchPage != -1 )
+ m_tabWidget->setCurrentPage( m_tabSearchPage );
+}
+
+void KCHMMainWindow::slotActivateBookmarkTab( )
+{
+ m_tabWidget->setCurrentPage( m_tabBookmarkPage );
+}
+
+void KCHMMainWindow::showOrHideContextWindow( int tabindex )
+{
+ if ( tabindex == -1 )
+ {
+ if ( m_contentsWindow )
+ {
+ m_tabWidget->removePage (m_contentsWindow);
+ delete m_contentsWindow;
+ m_contentsWindow = 0;
+ }
+ }
+ else
+ {
+ if ( !m_contentsWindow )
+ {
+ m_contentsWindow = new KCHMContentsWindow( m_tabWidget );
+
+ // Handle clicking on m_contentsWindow element
+ connect( m_contentsWindow,
+ SIGNAL( clicked( QListViewItem* ) ),
+ this,
+ SLOT( slotOnTreeClicked( QListViewItem* ) ) );
+
+ connect( m_contentsWindow,
+ SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int ) ),
+ this,
+ SLOT( slotOnTreeDoubleClicked ( QListViewItem *, const QPoint &, int ) ) );
+
+ m_tabWidget->insertTab (m_contentsWindow, i18n( "Contents" ), tabindex);
+ }
+ }
+}
+
+void KCHMMainWindow::showOrHideIndexWindow( int tabindex )
+{
+ // Test whether to show/invalidate the index window
+ if ( tabindex == -1 )
+ {
+ if ( m_indexWindow )
+ {
+ m_tabWidget->removePage (m_indexWindow);
+ delete m_indexWindow;
+ m_indexWindow = 0;
+ }
+ }
+ else
+ {
+ if ( !m_indexWindow )
+ {
+ m_indexWindow = new KCHMIndexWindow (m_tabWidget);
+ m_tabWidget->insertTab (m_indexWindow, i18n( "Index" ), tabindex);
+ }
+ else
+ m_indexWindow->invalidate();
+ }
+}
+
+void KCHMMainWindow::showOrHideSearchWindow( int tabindex )
+{
+ if ( tabindex == -1 )
+ {
+ if ( m_searchWindow )
+ {
+ m_tabWidget->removePage (m_searchWindow);
+ delete m_searchWindow;
+ m_searchWindow = 0;
+ }
+ }
+ else
+ {
+ if ( !m_searchWindow )
+ {
+ m_searchWindow = new KCHMSearchWindow (m_tabWidget);
+ m_tabWidget->insertTab (m_searchWindow, i18n( "Search" ), tabindex);
+ }
+ else
+ m_searchWindow->invalidate();
+ }
+}
+
+void KCHMMainWindow::slotEnableFullScreenMode( bool enable )
+{
+ if ( enable )
+ {
+ if ( !isFullScreen() )
+ {
+ showFullScreen ();
+ menuBar()->hide();
+ statusBar()->hide();
+ }
+ }
+ else
+ {
+ if ( isFullScreen() )
+ {
+ showNormal ();
+ menuBar()->show();
+ statusBar()->show();
+ }
+ }
+}
+
+void KCHMMainWindow::slotShowContentsWindow( bool show )
+{
+ if ( show )
+ m_tabWidget->show();
+ else
+ m_tabWidget->hide();
+}
+
+void KCHMMainWindow::slotToggleFullScreenMode( )
+{
+ slotEnableFullScreenMode( !isFullScreen() );
+}
+
+void KCHMMainWindow::slotLocateInContentWindow( )
+{
+ // There may be no content tab at all
+ if ( !m_contentsWindow || m_tabContextPage == -1 )
+ return;
+
+ // Activate a content tab
+ m_tabWidget->setCurrentPage( m_tabContextPage );
+
+ if ( m_contentsWindow )
+ {
+ // Open all the tree items to show current item (if needed)
+ KCHMIndTocItem * treeitem = m_contentsWindow->getTreeItem( currentBrowser()->getOpenedPage() );
+
+ if ( treeitem )
+ {
+ KCHMIndTocItem * itemparent = treeitem;
+
+ while ( (itemparent = (KCHMIndTocItem*) itemparent->parent()) != 0 )
+ itemparent->setOpen(true);
+
+ m_contentsWindow->setCurrentItem (treeitem);
+ m_contentsWindow->ensureItemVisible (treeitem);
+ }
+ else
+ statusBar()->message( i18n( "Could not locate opened topic in content window"), 2000 );
+ }
+}
+
+void KCHMMainWindow::slotExtractCHM( )
+{
+ QStringList files;
+
+#if defined (USE_KDE)
+ QString outdir = KFileDialog::getExistingDirectory (
+ QString::null,
+ this,
+ i18n("Choose a directory to store CHM content") );
+#else
+ QString outdir = QFileDialog::getExistingDirectory (
+ QString::null,
+ this,
+ 0,
+ i18n("Choose a directory to store CHM content"),
+ TRUE );
+#endif
+
+ if ( outdir.isEmpty() )
+ return;
+
+ outdir += "/";
+
+ // Enumerate all the files in archive
+ if ( !m_chmFile || !m_chmFile->enumerateFiles( &files ) )
+ return;
+
+ KQProgressModalDialog progress( i18n("Extracting CHM content"), i18n("Extracting files..."), i18n("Abort"), files.size(), this );
+
+ for ( unsigned int i = 0; i < files.size(); i++ )
+ {
+ progress.setProgress( i );
+
+ if ( (i % 3) == 0 )
+ {
+ qApp->processEvents();
+
+ if ( progress.wasCancelled() )
+ break;
+ }
+
+ // Extract the file
+ QByteArray buf;
+
+ if ( m_chmFile->getFileContentAsBinary( &buf, files[i] ) )
+ {
+ // Split filename to get the list of subdirectories
+ QStringList dirs = QStringList::split( '/', files[i] );
+
+ // Walk through the list of subdirectories, and create them if needed
+ // dirlevel is used to detect extra .. and prevent overwriting files
+ // outside the directory (like creating the file images/../../../../../etc/passwd
+ unsigned int i, dirlevel = 0;
+ QStringList dirlist;
+
+ for ( i = 0; i < dirs.size() - 1; i++ )
+ {
+ // Skip .. which lead too far above
+ if ( dirs[i] == ".." )
+ {
+ if ( dirlevel > 0 )
+ {
+ dirlevel--;
+ dirlist.pop_back();
+ }
+ }
+ else
+ {
+ dirlist.push_back( dirs[i] );
+
+ QDir dir ( outdir + dirlist.join( "/" ) );
+ if ( !dir.exists() )
+ {
+ if ( !dir.mkdir( dir.path() ) )
+ qWarning( "Could not create subdir %s\n", dir.path().ascii() );
+ }
+ }
+ }
+
+ QString filename = outdir + dirlist.join( "/" ) + "/" + dirs[i];
+ QFile wf( filename );
+ if ( !wf.open( IO_WriteOnly ) )
+ {
+ qWarning( "Could not write file %s\n", filename.ascii() );
+ continue;
+ }
+
+ wf. writeBlock( buf );
+ wf.close();
+ }
+ else
+ qWarning( "Could not get file %s\n", files[i].ascii() );
+ }
+
+ progress.setProgress( files.size() );
+}
+
+KCHMViewWindow * KCHMMainWindow::currentBrowser( ) const
+{
+ return m_viewWindowMgr->current();
+}
+
+void KCHMMainWindow::slotOpenPageInNewTab( )
+{
+ openPage( currentBrowser()->getNewTabLink(), OPF_NEW_TAB | OPF_CONTENT_TREE );
+}
+
+void KCHMMainWindow::slotOpenPageInNewBackgroundTab( )
+{
+ openPage( currentBrowser()->getNewTabLink(), OPF_NEW_TAB | OPF_BACKGROUND );
+}
+
+void KCHMMainWindow::slotBrowserChanged( KCHMViewWindow * newbrowser )
+{
+ locateInContentTree( newbrowser->getOpenedPage() );
+}
+
+void KCHMMainWindow::locateInContentTree( const QString & url )
+{
+ if ( !m_contentsWindow )
+ return;
+
+ KCHMIndTocItem * treeitem = m_contentsWindow->getTreeItem( url );
+
+ if ( treeitem )
+ {
+ KCHMIndTocItem * itemparent = treeitem;
+ while ( (itemparent = (KCHMIndTocItem*) itemparent->parent()) != 0 )
+ itemparent->setOpen(true);
+
+ m_contentsWindow->setCurrentItem (treeitem);
+ m_contentsWindow->ensureItemVisible (treeitem);
+ }
+}
+
+void KCHMMainWindow::slotOnTreeDoubleClicked( QListViewItem * item, const QPoint &, int )
+{
+ // Open/close only existing item which have children
+ if ( !item || item->childCount() == 0 )
+ return;
+
+ item->setOpen( !item->isOpen() );
+ item->repaint();
+}
+
+bool KCHMMainWindow::event( QEvent * e )
+{
+ if ( e->type() == QEvent::User )
+ return handleUserEvent( (KCHMUserEvent*) e );
+
+ return QWidget::event( e );
+}
+
+bool KCHMMainWindow::handleUserEvent( const KCHMUserEvent * event )
+{
+ if ( event->m_action == "loadAndOpen" )
+ {
+ if ( event->m_args.size() != 1 && event->m_args.size() != 2 )
+ qFatal("handleUserEvent: event loadAndOpen must receive 1 or 2 args");
+
+ QString chmfile = event->m_args[0];
+ QString openurl = event->m_args.size() > 1 ? event->m_args[1] : "/";
+
+ return loadChmFile( chmfile, false ) && openPage( openurl );
+ }
+ else if ( event->m_action == "openPage" )
+ {
+ if ( event->m_args.size() != 1 )
+ qFatal("handleUserEvent: event openPage must receive 1 arg");
+
+ return openPage( event->m_args[0] );
+ }
+ else if ( event->m_action == "findInIndex" )
+ {
+ if ( event->m_args.size() != 1 )
+ qFatal( "handleUserEvent: event searchQuery must receive 1 arg" );
+
+ if ( m_tabIndexPage == -1 )
+ return false;
+
+ slotActivateIndexTab();
+ m_indexWindow->search( event->m_args[0] );
+ return true;
+ }
+ else if ( event->m_action == "searchQuery" )
+ {
+ if ( event->m_args.size() != 1 )
+ qFatal( "handleUserEvent: event searchQuery must receive 1 arg" );
+
+ if ( m_tabSearchPage == -1 )
+ return false;
+
+ slotActivateSearchTab();
+ m_searchWindow->execSearchQueryInGui( event->m_args[0] );
+ return true;
+ }
+ else
+ qWarning( "Unknown user event received: %s", event->m_action.ascii() );
+
+ return false;
+}
+
+
+#if defined (ENABLE_AUTOTEST_SUPPORT)
+void KCHMMainWindow::runAutoTest()
+{
+ KCHMIndTocItem * item;
+
+ switch (m_autoteststate)
+ {
+ case STATE_INITIAL:
+ if ( m_contentsWindow && !m_useShortAutotest )
+ {
+ m_autotestlistiterator = QListViewItemIterator (m_contentsWindow);
+ m_autoteststate = STATE_CONTENTS_OPENNEXTPAGE;
+ }
+ else
+ m_autoteststate = STATE_OPEN_INDEX;
+
+ QTimer::singleShot (500, this, SLOT(runAutoTest()) );
+ break; // allow to finish the initialization sequence
+
+ case STATE_CONTENTS_OPENNEXTPAGE:
+ if ( (item = (KCHMIndTocItem *) m_autotestlistiterator.current()) != 0 )
+ {
+ openPage( item->getUrl(), OPF_CONTENT_TREE | OPF_ADD2HISTORY );
+ m_autotestlistiterator++;
+ }
+ else
+ m_autoteststate = STATE_OPEN_INDEX;
+
+ QTimer::singleShot (50, this, SLOT(runAutoTest()) );
+ break;
+
+ case STATE_OPEN_INDEX:
+ if ( m_indexWindow )
+ m_tabWidget->setCurrentPage (1);
+
+ m_autoteststate = STATE_SHUTDOWN;
+ QTimer::singleShot (500, this, SLOT(runAutoTest()) );
+ break;
+
+ case STATE_SHUTDOWN:
+ qApp->quit();
+ break;
+
+ default:
+ break;
+ }
+}
+#endif /* defined (ENABLE_AUTOTEST_SUPPORT) */
+
+
+//TODO: KDE: xmlgui
+//TODO: Search result highlighting
diff --git a/src/kchmmainwindow.h b/src/kchmmainwindow.h
new file mode 100644
index 0000000..7381567
--- /dev/null
+++ b/src/kchmmainwindow.h
@@ -0,0 +1,191 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMMAINWINDOW_H
+#define KCHMMAINWINDOW_H
+
+#include "kde-qt.h"
+
+#include "libchmfile.h"
+
+#include "forwarddeclarations.h"
+#include "kchmviewwindow.h"
+
+
+#define ENABLE_AUTOTEST_SUPPORT
+
+//! OpenPage extra flags, specifying extra behavior
+
+//! Locate this page in the content tree, and move the cursor there
+static const unsigned int OPF_CONTENT_TREE = 1 << 0;
+//! Add the previous page into the history
+static const unsigned int OPF_ADD2HISTORY = 1 << 1;
+//! Open the page in a new tab
+static const unsigned int OPF_NEW_TAB = 1 << 2;
+//! Open the page in a new tab in background
+static const unsigned int OPF_BACKGROUND = 1 << 3;
+
+//! Those events could be sent to main window to do useful things. See handleUserEvents()
+class KCHMUserEvent : public QEvent
+{
+ public:
+ KCHMUserEvent( const QString& action, const QStringList& args = QStringList())
+ : QEvent( QEvent::User ), m_action(action), m_args(args) {};
+
+ QString m_action;
+ QStringList m_args;
+};
+
+
+class KCHMMainWindow : public KQMainWindow
+{
+ Q_OBJECT
+
+ public:
+ KCHMMainWindow();
+ ~KCHMMainWindow();
+
+ bool openPage ( const QString &url, unsigned int flags = OPF_CONTENT_TREE );
+
+ LCHMFile * chmFile() const { return m_chmFile; }
+ const QString& getOpenedFileName () { return m_chmFilename; }
+
+ KCHMViewWindow * currentBrowser() const;
+ KCHMContentsWindow * contentsWindow() const { return m_contentsWindow; }
+ KCHMSettings * currentSettings() const { return m_currentSettings; }
+ KCHMViewWindowMgr* viewWindowMgr() const { return m_viewWindowMgr; }
+ KCHMNavToolbar * navigationToolbar() const { return m_navToolbar; }
+ KCHMSearchWindow * searchWindow() const { return m_searchWindow; }
+
+ void showInStatusBar (const QString& text) { statusBar()->message( text, 2000 ); }
+ void setTextEncoding (const LCHMTextEncoding * enc);
+
+ public slots:
+ void slotOnTreeClicked( QListViewItem *item );
+ void slotOnTreeDoubleClicked( QListViewItem *item, const QPoint &, int );
+
+ void slotAddBookmark ( );
+ void slotOpenPageInNewTab( );
+ void slotOpenPageInNewBackgroundTab( );
+ void slotEnableFullScreenMode( bool enable );
+ void slotShowContentsWindow( bool show );
+ void slotLocateInContentWindow( );
+ void slotBrowserChanged( KCHMViewWindow * newbrowser );
+
+ private slots:
+ void slotLinkClicked ( const QString & link, bool& follow_link );
+
+ void slotOpenMenuItemActivated();
+ void slotPrintMenuItemActivated();
+
+ void slotAboutMenuItemActivated();
+ void slotAboutQtMenuItemActivated();
+
+ void slotActivateContentTab();
+ void slotActivateIndexTab();
+ void slotActivateSearchTab();
+ void slotActivateBookmarkTab();
+
+ void slotBrowserSelectAll();
+ void slotBrowserCopy();
+ void slotExtractCHM();
+
+ void slotChangeSettingsMenuItemActivated();
+ void slotHistoryMenuItemActivated ( int );
+
+ void slotToggleFullScreenMode( );
+
+ void slotNavigateBack() { currentBrowser()->navigateBack(); }
+ void slotNavigateHome() { currentBrowser()->navigateHome(); }
+ void slotNavigateForward(){ currentBrowser()->navigateForward(); }
+
+ private:
+ bool parseCmdLineArgs();
+ void showEvent( QShowEvent * );
+ void closeEvent ( QCloseEvent * e );
+ void setupSignals ();
+
+ void setupToolbarsAndMenu ( );
+ bool loadChmFile ( const QString &fileName, bool call_open_page = true );
+ void closeChmFile();
+ void refreshCurrentBrowser();
+ void updateHistoryMenu();
+
+ void showOrHideContextWindow( int tabindex );
+ void showOrHideIndexWindow( int tabindex );
+ void showOrHideSearchWindow( int tabindex );
+
+ // User events
+ bool event ( QEvent * e );
+ bool handleUserEvent( const KCHMUserEvent * event );
+
+ void locateInContentTree( const QString& url );
+
+ QString m_chmFilename;
+ QString m_aboutDlgMenuText; // to show in KDE or Qt about dialogs
+
+ KCHMViewWindowMgr * m_viewWindowMgr;
+ KCHMIndexWindow * m_indexWindow;
+ KCHMSearchWindow * m_searchWindow;
+ KCHMBookmarkWindow * m_bookmarkWindow;
+ KCHMContentsWindow * m_contentsWindow;
+
+ KQTabWidget * m_tabWidget;
+ QSplitter * m_windowSplitter;
+
+ KCHMSearchAndViewToolbar * m_searchToolbar;
+ KCHMNavToolbar * m_navToolbar;
+
+ KCHMSettings * m_currentSettings;
+
+ LCHMFile * m_chmFile;
+ bool m_FirstTimeShow;
+
+ KQPopupMenu * m_menuHistory;
+
+ int m_tabContextPage;
+ int m_tabIndexPage;
+ int m_tabSearchPage;
+ int m_tabBookmarkPage;
+
+#if defined (ENABLE_AUTOTEST_SUPPORT)
+ enum auto_test_state_t
+ {
+ STATE_OFF,
+ STATE_INITIAL,
+ STATE_CONTENTS_OPENNEXTPAGE,
+ STATE_OPEN_INDEX,
+ STATE_SHUTDOWN
+ };
+
+ bool m_useShortAutotest;
+ auto_test_state_t m_autoteststate;
+ QListViewItemIterator m_autotestlistiterator;
+
+ private slots:
+ void runAutoTest();
+#endif /* defined (ENABLE_AUTOTEST_SUPPORT) */
+
+};
+
+extern KCHMMainWindow * mainWindow;
+
+#endif // KCHMMAINWINDOW_H
diff --git a/src/kchmnavtoolbar.cpp b/src/kchmnavtoolbar.cpp
new file mode 100644
index 0000000..f0f004f
--- /dev/null
+++ b/src/kchmnavtoolbar.cpp
@@ -0,0 +1,75 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "kde-qt.h"
+#include "kchmnavtoolbar.h"
+#include "kchmmainwindow.h"
+#include "kchmviewwindow.h"
+#include "iconstorage.h"
+
+
+KCHMNavToolbar::KCHMNavToolbar( KCHMMainWindow *parent )
+ : QToolBar( parent )
+{
+ // Initialize toolbar
+ setLabel( i18n( "Navigation") );
+
+ QPixmap iconBackward (*gIconStorage.getToolbarPixmap(KCHMIconStorage::back));
+ m_toolbarIconBackward = new QToolButton (iconBackward,
+ i18n( "Move backward in history"),
+ QString::null,
+ parent,
+ SLOT( slotNavigateBack() ),
+ this);
+ QWhatsThis::add( m_toolbarIconBackward, i18n( "Click this button to move backward in browser history") );
+
+ QPixmap iconForward (*gIconStorage.getToolbarPixmap(KCHMIconStorage::forward));
+ m_toolbarIconForward = new QToolButton (iconForward,
+ i18n( "Move forward in history"),
+ QString::null,
+ parent,
+ SLOT( slotNavigateForward() ),
+ this);
+ QWhatsThis::add( m_toolbarIconForward, i18n( "Click this button to move forward in browser history") );
+
+ QPixmap iconHome = (*gIconStorage.getToolbarPixmap(KCHMIconStorage::gohome));
+ QToolButton * hb = new QToolButton (iconHome,
+ i18n( "Go to the home page"),
+ QString::null,
+ parent,
+ SLOT( slotNavigateHome() ),
+ this);
+ QWhatsThis::add( hb, i18n( "Click this button to move to the home page") );
+}
+
+
+KCHMNavToolbar::~KCHMNavToolbar()
+{
+}
+
+void KCHMNavToolbar::updateIconStatus( bool enable_backward, bool enable_forward )
+{
+ m_toolbarIconBackward->setEnabled( enable_backward );
+ m_toolbarIconForward->setEnabled ( enable_forward );
+}
+
+
+#include "kchmnavtoolbar.moc"
diff --git a/src/kchmnavtoolbar.h b/src/kchmnavtoolbar.h
new file mode 100644
index 0000000..ea10c84
--- /dev/null
+++ b/src/kchmnavtoolbar.h
@@ -0,0 +1,42 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef INCLUDE_KCHMNAVHISTORY_H
+#define INCLUDE_KCHMNAVHISTORY_H
+
+#include "forwarddeclarations.h"
+
+class KCHMNavToolbar : public QToolBar
+{
+Q_OBJECT
+public:
+ KCHMNavToolbar( KCHMMainWindow *parent );
+ ~KCHMNavToolbar();
+
+public slots:
+ void updateIconStatus( bool enable_backward, bool enable_forward );
+
+private:
+ QToolButton * m_toolbarIconBackward;
+ QToolButton * m_toolbarIconForward;
+};
+
+#endif /* INCLUDE_KCHMNAVHISTORY_H */
diff --git a/src/kchmsearchengine.cpp b/src/kchmsearchengine.cpp
new file mode 100644
index 0000000..6bd6c5e
--- /dev/null
+++ b/src/kchmsearchengine.cpp
@@ -0,0 +1,257 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <qapplication.h>
+
+#include "kchmmainwindow.h"
+#include "kchmsearchengine.h"
+#include "kchmconfig.h"
+#include "kchmsettings.h"
+#include "libchmurlfactory.h"
+
+#include "kchmsearchengine_impl.h"
+
+#include "kchmsearchengine.moc"
+
+
+
+KCHMSearchEngine::KCHMSearchEngine()
+{
+ m_Index = 0;
+ m_progressDlg = 0;
+}
+
+
+KCHMSearchEngine::~KCHMSearchEngine()
+{
+ delete m_Index;
+ delete m_progressDlg;
+}
+
+void KCHMSearchEngine::processEvents( )
+{
+ // Do it twice; some events generate other events
+ qApp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput );
+ qApp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput );
+}
+
+
+void KCHMSearchEngine::cancelButtonPressed( )
+{
+ m_Index->setLastWinClosed();
+}
+
+
+bool KCHMSearchEngine::loadOrGenerateIndex( )
+{
+ if ( m_Index )
+ return true;
+
+ QString indexfiledict = ::mainWindow->currentSettings()->searchIndexDictFilename();
+ QString indexfiledoc = ::mainWindow->currentSettings()->searchIndexDocFilename();
+ QStringList documents;
+
+ m_Index = new QtAs::Index( documents, appConfig.m_datapath );
+ m_Index->setDictionaryFile( indexfiledict );
+ m_Index->setDocListFile( indexfiledoc );
+
+ m_progressDlg = new QProgressDialog( 0 );
+ connect( m_progressDlg, SIGNAL( canceled() ), this, SLOT( cancelButtonPressed() ) );
+
+ connect( m_Index, SIGNAL( indexingProgress( int ) ), this, SLOT( setIndexingProgress( int ) ) );
+ KCHMShowWaitCursor waitcursor;
+
+ QFile f( indexfiledict );
+ if ( !f.exists() )
+ {
+ ::mainWindow->statusBar()->message( tr( "Generating search index..." ) );
+
+ // Get the list of files in CHM archive
+ QStringList alldocuments;
+
+ m_progressDlg->setCaption( tr( "Generating search index..." ) );
+ m_progressDlg->setLabelText( tr( "Generating search index..." ) );
+ m_progressDlg->setTotalSteps( 100 );
+ m_progressDlg->reset();
+ m_progressDlg->show();
+ processEvents();
+
+ if ( !::mainWindow->chmFile()->enumerateFiles( &alldocuments ) )
+ {
+ delete m_progressDlg;
+ m_progressDlg = 0;
+ return false;
+ }
+
+ // Process the list keeping only HTML documents there
+ for ( unsigned int i = 0; i < alldocuments.size(); i++ )
+ if ( alldocuments[i].endsWith( ".html", false ) || alldocuments[i].endsWith( ".htm", false ) )
+ documents.push_back( LCHMUrlFactory::makeURLabsoluteIfNeeded( alldocuments[i] ) );
+
+ m_Index->setDocList( documents );
+
+ if ( m_Index->makeIndex() != -1 )
+ {
+ m_Index->writeDict();
+ m_keywordDocuments.clear();
+ }
+ else
+ return false;
+ }
+ else
+ {
+ ::mainWindow->statusBar()->message( tr( "Reading dictionary..." ) );
+ processEvents();
+
+ m_Index->readDict();
+ }
+
+ ::mainWindow->statusBar()->message( tr( "Done" ), 3000 );
+ delete m_progressDlg;
+ m_progressDlg = 0;
+
+ return true;
+}
+
+
+void KCHMSearchEngine::setIndexingProgress( int progress )
+{
+ if ( progress <= 100 )
+ m_progressDlg->setProgress( progress );
+
+ processEvents();
+}
+
+// Helper class to simplity state management and data keeping
+class SearchDataKeeper
+{
+ public:
+ SearchDataKeeper() { m_inPhrase = false; }
+
+ void beginPhrase()
+ {
+ phrase_terms.clear();
+ m_inPhrase = true;
+ }
+
+ void endPhrase()
+ {
+ m_inPhrase = false;
+ phrasewords += phrase_terms;
+ phrases.push_back( phrase_terms.join(" ") );
+ }
+
+ bool isInPhrase() const { return m_inPhrase; }
+
+ void addTerm( const QString& term )
+ {
+ if ( !term.isEmpty() )
+ {
+ terms.push_back( term );
+
+ if ( m_inPhrase )
+ phrase_terms.push_back( term );
+ }
+ }
+
+ // Should contain all the search terms present in query, includind those from phrases. One element - one term .
+ QStringList terms;
+
+ // Should contain phrases present in query without quotes. One element - one phrase.
+ QStringList phrases;
+
+ // Should contain all the terms present in all the phrases (but not outside).
+ QStringList phrasewords;
+
+ private:
+ bool m_inPhrase;
+ QStringList phrase_terms;
+};
+
+
+bool KCHMSearchEngine::searchQuery( const QString & query, QStringList * results, unsigned int limit )
+{
+ // Characters which split the words. We need to make them separate tokens
+ QString splitChars = m_Index->getCharsSplit();
+
+ // Characters which are part of the word. We should keep them apart.
+ QString partOfWordChars = m_Index->getCharsPartOfWord();
+
+ SearchDataKeeper keeper;
+
+ // State machine variables
+ QString term;
+
+ for ( unsigned int i = 0; i < query.length(); i++ )
+ {
+ QChar ch = query[i].lower();
+
+ // a quote either begins or ends the phrase
+ if ( ch == '"' )
+ {
+ keeper.addTerm( term );
+
+ if ( keeper.isInPhrase() )
+ keeper.endPhrase();
+ else
+ keeper.beginPhrase();
+
+ continue;
+ }
+
+ // If new char does not stop the word, add ot and continue
+ if ( ch.isLetterOrNumber() || partOfWordChars.find( ch ) != -1 )
+ {
+ term.append( ch );
+ continue;
+ }
+
+ // If it is a split char, add this term and split char as separate term
+ if ( splitChars.find( ch ) != -1 )
+ {
+ // Add existing term if present
+ keeper.addTerm( term );
+
+ // Change the term variable, so it will be added when we exit this block
+ term = ch;
+ }
+
+ // Just add the word; it is most likely a space or terminated by tokenizer.
+ keeper.addTerm( term );
+ term = QString::null;
+ }
+
+ keeper.addTerm( term );
+
+ if ( keeper.isInPhrase() )
+ {
+ QMessageBox::warning( 0, i18n( "Search" ), i18n( "A closing quote character is missing." ) );
+ return false;
+ }
+
+ KCHMShowWaitCursor waitcursor;
+ QStringList foundDocs = m_Index->query( keeper.terms, keeper.phrases, keeper.phrasewords );
+
+ for ( QStringList::iterator it = foundDocs.begin(); it != foundDocs.end() && limit > 0; ++it, limit-- )
+ results->push_back( *it );
+
+ return true;
+}
diff --git a/src/kchmsearchengine.h b/src/kchmsearchengine.h
new file mode 100644
index 0000000..8aab6e5
--- /dev/null
+++ b/src/kchmsearchengine.h
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMSEARCHENGINE_H
+#define KCHMSEARCHENGINE_H
+
+#include <qobject.h>
+#include <qmap.h>
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qprogressdialog.h>
+
+#include "libchmfile.h"
+
+namespace QtAs { class Index; };
+
+
+class KCHMSearchEngine : public QObject
+{
+ Q_OBJECT
+
+ public:
+ KCHMSearchEngine();
+ ~KCHMSearchEngine();
+
+ bool loadOrGenerateIndex();
+ bool searchQuery ( const QString& query, QStringList * results, unsigned int limit = 100 );
+
+
+ private slots:
+ void setIndexingProgress( int progress );
+ void cancelButtonPressed();
+
+ private:
+ void processEvents();
+
+ // Used during the index generation
+ QProgressDialog * m_progressDlg;
+ QStringList m_keywordDocuments;
+ QtAs::Index * m_Index;
+};
+
+#endif
diff --git a/src/kchmsearchengine_impl.cpp b/src/kchmsearchengine_impl.cpp
new file mode 100644
index 0000000..286832a
--- /dev/null
+++ b/src/kchmsearchengine_impl.cpp
@@ -0,0 +1,572 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Portions Copyright (C) 2000-2005 Trolltech AS. *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+
+#include <qfile.h>
+#include <qdir.h>
+#include <qstringlist.h>
+#include <qdict.h>
+#include <qapplication.h>
+
+#include <ctype.h>
+
+#include "kchmsearchengine_impl.h"
+#include "kchmmainwindow.h"
+#include "libchmfileimpl.h"
+
+
+namespace QtAs {
+
+// Those characters are splitters (i.e. split the word), but added themselves into dictionary too.
+// This makes the dictionary MUCH larger, but ensure that for the piece of "window->print" both
+// search for "print" and "->print" will find it.
+static const char SPLIT_CHARACTERS[] = "!()*&^%#@[]{}':;,.?/|/?<>\\-+=~`";
+
+// Those characters are parts of word - for example, '_' is here, and search for _debug will find only _debug.
+static const char WORD_CHARACTERS[] = "$_";
+
+
+int TermList::compareItems( QPtrCollection::Item i1, QPtrCollection::Item i2 )
+{
+ if( ( (Term*)i1 )->frequency == ( (Term*)i2 )->frequency )
+ return 0;
+ if( ( (Term*)i1 )->frequency < ( (Term*)i2 )->frequency )
+ return -1;
+ return 1;
+}
+
+QDataStream &operator>>( QDataStream &s, Document &l )
+{
+ s >> l.docNumber;
+ s >> l.frequency;
+ return s;
+}
+
+QDataStream &operator<<( QDataStream &s, const Document &l )
+{
+ s << (Q_INT16)l.docNumber;
+ s << (Q_INT16)l.frequency;
+ return s;
+}
+
+Index::Index( const QString &dp, const QString & )
+ : QObject( 0, 0 ), dict( 8999 ), docPath( dp )
+{
+ lastWindowClosed = false;
+ connect( qApp, SIGNAL( lastWindowClosed() ),
+ this, SLOT( setLastWinClosed() ) );
+}
+
+Index::Index( const QStringList &dl, const QString & )
+ : QObject( 0, 0 ), dict( 20011 )
+{
+ docList = dl;
+ lastWindowClosed = false;
+ connect( qApp, SIGNAL( lastWindowClosed() ),
+ this, SLOT( setLastWinClosed() ) );
+}
+
+void Index::setLastWinClosed()
+{
+ lastWindowClosed = true;
+}
+
+void Index::setDictionaryFile( const QString &f )
+{
+ dictFile = f;
+}
+
+void Index::setDocListFile( const QString &f )
+{
+ docListFile = f;
+}
+
+void Index::setDocList( const QStringList &lst )
+{
+ docList = lst;
+}
+
+bool Index::makeIndex()
+{
+ if ( docList.isEmpty() )
+ return false;
+
+ QStringList::Iterator it = docList.begin();
+ int steps = docList.count() / 100;
+
+ if ( !steps )
+ steps++;
+
+ int prog = 0;
+
+ for ( int i = 0; it != docList.end(); ++it, ++i )
+ {
+ if ( lastWindowClosed )
+ return false;
+
+ parseDocument( *it, i );
+
+ if ( i%steps == 0 )
+ {
+ prog++;
+ emit indexingProgress( prog );
+ }
+ }
+
+ return true;
+}
+
+
+void Index::insertInDict( const QString &str, int docNum )
+{
+ Entry *e = 0;
+ if ( dict.count() )
+ e = dict[ str ];
+
+ if ( e )
+ {
+ if ( e->documents.first().docNumber != docNum )
+ e->documents.prepend( Document( docNum, 1 ) );
+ else
+ e->documents.first().frequency++;
+ }
+ else
+ {
+ dict.insert( str, new Entry( docNum ) );
+ }
+}
+
+
+bool Index::parseDocumentToStringlist( const QString & filename, QStringList & tokenlist )
+{
+ QString parsedbuf, parseentity;
+ QString text;
+
+ if ( !::mainWindow->chmFile()->getFileContentAsString( &text, filename ) )
+ {
+ qWarning( "Index::parseDocument: Could not retrieve the content at %s", filename.ascii() );
+ return false;
+ }
+
+ if ( text.isNull() )
+ {
+ qWarning( "Index::parseDocument: Retrieved content for %s is empty", filename.ascii() );
+ return false;
+ }
+
+ m_charssplit = SPLIT_CHARACTERS;
+ m_charsword = WORD_CHARACTERS;
+
+ tokenlist.clear();
+
+ // State machine states
+ enum state_t
+ {
+ STATE_OUTSIDE_TAGS, // outside HTML tags; parse text
+ STATE_IN_HTML_TAG, // inside HTML tags; wait for end tag
+ STATE_IN_QUOTES, // inside HTML tags and inside quotes; wait for end quote (in var QuoteChar)
+ STATE_IN_HTML_ENTITY, // inside HTML entity; parse the entity
+ };
+
+ state_t state = STATE_OUTSIDE_TAGS;
+ QChar QuoteChar; // used in STATE_IN_QUOTES
+
+ for ( unsigned int j = 0; j < text.length(); j++ )
+ {
+ QChar ch = text[j];
+
+ if ( (j % 20000) == 0 )
+ qApp->processEvents( QEventLoop::ExcludeUserInput );
+
+ if ( state == STATE_IN_HTML_TAG )
+ {
+ // We are inside HTML tag.
+ // Ignore everything until we see '>' (end of HTML tag) or quote char (quote start)
+ if ( ch == '"' || ch == '\'' )
+ {
+ state = STATE_IN_QUOTES;
+ QuoteChar = ch;
+ }
+ else if ( ch == '>' )
+ state = STATE_OUTSIDE_TAGS;
+
+ continue;
+ }
+ else if ( state == STATE_IN_QUOTES )
+ {
+ // We are inside quoted text inside HTML tag.
+ // Ignore everything until we see the quote character again
+ if ( ch == QuoteChar )
+ state = STATE_IN_HTML_TAG;
+
+ continue;
+ }
+ else if ( state == STATE_IN_HTML_ENTITY )
+ {
+ // We are inside encoded HTML entity (like &nbsp;).
+ // Collect to parsedbuf everything until we see ;
+ if ( ch.isLetterOrNumber() )
+ {
+ // get next character of this entity
+ parseentity.append( ch );
+ continue;
+ }
+
+ // The entity ended
+ state = STATE_OUTSIDE_TAGS;
+
+ // Some shitty HTML does not terminate entities correctly. Screw it.
+ if ( ch != ';' && ch != '<' )
+ {
+ if ( parseentity.isEmpty() )
+ {
+ // straight '&' symbol. Add and continue.
+ parsedbuf += "&";
+ }
+ else
+ qWarning( "Index::parseDocument: incorrectly terminated HTML entity '&%s%c', ignoring", parseentity.ascii(), ch.latin1() );
+
+ j--; // parse this character again, but in different state
+ continue;
+ }
+
+ // Don't we have a space?
+ if ( parseentity.lower() != "nbsp" )
+ {
+ QString entity = ::mainWindow->chmFile()->impl()->decodeEntity( parseentity );
+
+ if ( entity.isNull() )
+ {
+ // decodeEntity() already printed error message
+ //qWarning( "Index::parseDocument: failed to decode entity &%s;", parsedbuf.ascii() );
+ continue;
+ }
+
+ parsedbuf += entity;
+ continue;
+ }
+ else
+ ch = ' '; // We got a space, so treat it like it, and not add it to parsebuf
+ }
+
+ //
+ // Now process STATE_OUTSIDE_TAGS
+ //
+
+ // Check for start of HTML tag, and switch to STATE_IN_HTML_TAG if it is
+ if ( ch == '<' )
+ {
+ state = STATE_IN_HTML_TAG;
+ goto tokenize_buf;
+ }
+
+ // Check for start of HTML entity
+ if ( ch == '&' )
+ {
+ state = STATE_IN_HTML_ENTITY;
+ parseentity = QString::null;
+ continue;
+ }
+
+ // Replace quote by ' - quotes are used in search window to set the phrase
+ if ( ch == '"' )
+ ch = '\'';
+
+ // Ok, we have a valid character outside HTML tags, and probably some in buffer already.
+ // If it is char or letter, add it and continue
+ if ( ch.isLetterOrNumber() || m_charsword.find( ch ) != -1 )
+ {
+ parsedbuf.append( ch );
+ continue;
+ }
+
+ // If it is a split char, add the word to the dictionary, and then add the char itself.
+ if ( m_charssplit.find( ch ) != -1 )
+ {
+ if ( !parsedbuf.isEmpty() )
+ tokenlist.push_back( parsedbuf.lower() );
+
+ tokenlist.push_back( ch.lower() );
+ parsedbuf = QString::null;
+ continue;
+ }
+
+tokenize_buf:
+ // Just add the word; it is most likely a space or terminated by tokenizer.
+ if ( !parsedbuf.isEmpty() )
+ {
+ tokenlist.push_back( parsedbuf.lower() );
+ parsedbuf = QString::null;
+ }
+ }
+
+ // Add the last word if still here - for broken htmls.
+ if ( !parsedbuf.isEmpty() )
+ tokenlist.push_back( parsedbuf.lower() );
+
+ return true;
+}
+
+
+void Index::parseDocument( const QString &filename, int docNum )
+{
+ QStringList terms;
+
+ if ( !parseDocumentToStringlist( filename, terms ) )
+ return;
+
+ for ( QStringList::Iterator it = terms.begin(); it != terms.end(); ++it )
+ insertInDict( *it, docNum );
+}
+
+
+void Index::writeDict()
+{
+ QDictIterator<Entry> it( dict );
+ QFile f( dictFile );
+
+ if ( !f.open( IO_WriteOnly ) )
+ {
+ qWarning( "Index::writeDict: could not write dictionary file %s", dictFile.ascii() );
+ return;
+ }
+
+ QDataStream s( &f );
+ s << (int) 1; // version
+ s << m_charssplit;
+ s << m_charsword;
+
+ for( ; it.current(); ++it )
+ {
+ Entry *e = it.current();
+ s << it.currentKey();
+ s << e->documents;
+ }
+
+ f.close();
+ writeDocumentList();
+}
+
+void Index::writeDocumentList()
+{
+ QFile f( docListFile );
+ if ( !f.open( IO_WriteOnly ) )
+ {
+ qWarning( "Index::writeDocumentList: could not write dictionary file %s", docListFile.ascii() );
+ return;
+ }
+ QDataStream s( &f );
+ s << docList;
+}
+
+bool Index::readDict()
+{
+ QFile f( dictFile );
+ if ( !f.open( IO_ReadOnly ) )
+ return false;
+
+ dict.clear();
+ QDataStream s( &f );
+ QString key;
+ int version;
+ QValueList<Document> docs;
+
+ s >> version;
+ s >> m_charssplit;
+ s >> m_charsword;
+
+ while ( !s.atEnd() )
+ {
+ s >> key;
+ s >> docs;
+ dict.insert( key, new Entry( docs ) );
+ }
+
+ f.close();
+ return dict.size() > 0 && readDocumentList();
+}
+
+bool Index::readDocumentList()
+{
+ QFile f( docListFile );
+ if ( !f.open( IO_ReadOnly ) )
+ return false;
+ QDataStream s( &f );
+ s >> docList;
+ return true;
+}
+
+QStringList Index::query( const QStringList &terms, const QStringList &termSeq, const QStringList &seqWords )
+{
+ TermList termList;
+
+ QStringList::ConstIterator it = terms.begin();
+ for ( it = terms.begin(); it != terms.end(); ++it )
+ {
+ Entry *e = 0;
+
+ if ( dict[ *it ] )
+ {
+ e = dict[ *it ];
+ termList.append( new Term( *it, e->documents.count(), e->documents ) );
+ }
+ else
+ {
+ return QStringList();
+ }
+ }
+
+ termList.sort();
+
+ Term *minTerm = termList.first();
+
+ if ( !termList.count() )
+ return QStringList();
+
+ termList.removeFirst();
+
+ QValueList<Document> minDocs = minTerm->documents;
+ QValueList<Document>::iterator C;
+ QValueList<Document>::ConstIterator It;
+ Term *t = termList.first();
+
+ for ( ; t; t = termList.next() )
+ {
+ QValueList<Document> docs = t->documents;
+ C = minDocs.begin();
+
+ while ( C != minDocs.end() )
+ {
+ bool found = false;
+
+ for ( It = docs.begin(); It != docs.end(); ++It )
+ {
+ if ( (*C).docNumber == (*It).docNumber )
+ {
+ (*C).frequency += (*It).frequency;
+ found = true;
+ break;
+ }
+ }
+
+ if ( !found )
+ C = minDocs.remove( C );
+ else
+ ++C;
+ }
+ }
+
+ QStringList results;
+ qHeapSort( minDocs );
+
+ if ( termSeq.isEmpty() )
+ {
+ for ( C = minDocs.begin(); C != minDocs.end(); ++C )
+ results << docList[ (int)(*C).docNumber ];
+
+ return results;
+ }
+
+ QString fileName;
+
+ for ( C = minDocs.begin(); C != minDocs.end(); ++C )
+ {
+ fileName = docList[ (int)(*C).docNumber ];
+
+ if ( searchForPhrases( termSeq, seqWords, fileName ) )
+ results << fileName;
+ }
+
+ return results;
+}
+
+
+bool Index::searchForPhrases( const QStringList &phrases, const QStringList &words, const QString &filename )
+{
+ QStringList parsed_document;
+
+ if ( !parseDocumentToStringlist( filename, parsed_document ) )
+ return false;
+
+ miniDict.clear();
+
+ // Initialize the dictionary with the words in phrase(s)
+ for ( QStringList::ConstIterator cIt = words.begin(); cIt != words.end(); ++cIt )
+ miniDict.insert( *cIt, new PosEntry( 0 ) );
+
+ // Fill the dictionary with the words from the document
+ unsigned int word_offset = 3;
+ for ( QStringList::ConstIterator it = parsed_document.begin(); it != parsed_document.end(); it++, word_offset++ )
+ {
+ PosEntry * entry = miniDict[ *it ];
+
+ if ( entry )
+ entry->positions.append( word_offset );
+ }
+
+ // Dump it
+/*
+ QDictIterator<PosEntry> it( miniDict );
+ for( ; it.current(); ++it )
+ {
+ QString text( it.currentKey() );
+ QValueList<uint> pos = miniDict[text]->positions;
+ for ( unsigned int i = 1; i < pos.size(); i++ )
+ text += " " + QString::number( pos[i] );
+
+ qDebug( "%s", text.ascii());
+ }
+*/
+
+ QValueList<uint> first_word_positions;
+
+ for ( QStringList::ConstIterator phrase_it = phrases.begin(); phrase_it != phrases.end(); phrase_it++ )
+ {
+ QStringList phrasewords = QStringList::split( ' ', *phrase_it );
+ first_word_positions = miniDict[ phrasewords[0] ]->positions;
+
+ for ( unsigned int j = 1; j < phrasewords.count(); ++j )
+ {
+ QValueList<uint> next_word_it = miniDict[ phrasewords[j] ]->positions;
+ QValueList<uint>::iterator dict_it = first_word_positions.begin();
+
+ while ( dict_it != first_word_positions.end() )
+ {
+ if ( next_word_it.find( *dict_it + 1 ) != next_word_it.end() )
+ {
+ (*dict_it)++;
+ ++dict_it;
+ }
+ else
+ dict_it = first_word_positions.remove( dict_it );
+ }
+ }
+ }
+
+ if ( first_word_positions.count() )
+ return true;
+
+ return false;
+}
+
+
+};
diff --git a/src/kchmsearchengine_impl.h b/src/kchmsearchengine_impl.h
new file mode 100644
index 0000000..b8a9fe6
--- /dev/null
+++ b/src/kchmsearchengine_impl.h
@@ -0,0 +1,151 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Portions Copyright (C) 2000-2005 Trolltech AS. *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef QASSISTANTINDEX_H
+#define QASSISTANTINDEX_H
+
+#include <qstringlist.h>
+#include <qdict.h>
+#include <qdatastream.h>
+#include <qobject.h>
+
+namespace QtAs
+{
+
+struct Document
+{
+ Document( int d, int f ) : docNumber( d ), frequency( f ) {}
+ Document() : docNumber( -1 ), frequency( 0 ) {}
+ bool operator==( const Document &doc ) const
+ {
+ return docNumber == doc.docNumber;
+ }
+
+ bool operator<( const Document &doc ) const
+ {
+ return frequency > doc.frequency;
+ }
+
+ bool operator<=( const Document &doc ) const
+ {
+ return frequency >= doc.frequency;
+ }
+
+ bool operator>( const Document &doc ) const
+ {
+ return frequency < doc.frequency;
+ }
+
+ Q_INT16 docNumber;
+ Q_INT16 frequency;
+};
+
+QDataStream &operator>>( QDataStream &s, Document &l );
+QDataStream &operator<<( QDataStream &s, const Document &l );
+
+class Index : public QObject
+{
+ Q_OBJECT
+ public:
+ struct Entry
+ {
+ Entry( int d ) { documents.append( Document( d, 1 ) ); }
+ Entry( QValueList<Document> l ) : documents( l ) {}
+ QValueList<Document> documents;
+ };
+
+ struct PosEntry
+ {
+ PosEntry( int p ) { positions.append( p ); }
+ QValueList<uint> positions;
+ };
+
+ Index( const QString &dp, const QString &hp );
+ Index( const QStringList &dl, const QString &hp );
+
+ void writeDict();
+ bool readDict();
+ bool makeIndex();
+ QStringList query( const QStringList&, const QStringList&, const QStringList& );
+
+ void setDictionaryFile( const QString& );
+ void setDocListFile( const QString& );
+ void setDocList( const QStringList & );
+ QString getCharsSplit() const { return m_charssplit; }
+ QString getCharsPartOfWord() const { return m_charsword; }
+
+ signals:
+ void indexingProgress( int );
+
+ public slots:
+ void setLastWinClosed();
+
+ private:
+ void setupDocumentList();
+ bool parseDocumentToStringlist( const QString& filename, QStringList& tokenlist );
+ void parseDocument( const QString& filename, int docnum );
+ void insertInDict( const QString&, int );
+
+ void writeDocumentList();
+ bool readDocumentList();
+
+ QStringList getWildcardTerms( const QString& );
+ QStringList split( const QString& );
+ QValueList<Document> setupDummyTerm( const QStringList& );
+ bool searchForPhrases( const QStringList &phrases, const QStringList &words, const QString &filename );
+
+ QStringList docList;
+ QDict<Entry> dict;
+ QDict<PosEntry> miniDict;
+ QString docPath;
+ QString dictFile;
+ QString docListFile;
+ bool lastWindowClosed;
+
+ // Those characters are splitters (i.e. split the word), but added themselves into dictionary too.
+ // This makes the dictionary MUCH larger, but ensure that for the piece of "window->print" both
+ // search for "print" and "->print" will find it.
+ QString m_charssplit;
+
+ // Those characters are parts of word - for example, '_' is here, and search for _debug will find only _debug.
+ QString m_charsword;
+};
+
+struct Term
+{
+ Term( const QString &t, int f, QValueList<Document> l ) : term( t ), frequency( f ), documents( l ) {}
+
+ QString term;
+ int frequency;
+ QValueList<Document> documents;
+};
+
+class TermList : public QPtrList<Term>
+{
+ public:
+ TermList() : QPtrList<Term>() {}
+ int compareItems( QPtrCollection::Item i1, QPtrCollection::Item i2 );
+};
+
+};
+
+#endif /* QASSISTANTINDEX_H */
diff --git a/src/kchmsearchtoolbar.cpp b/src/kchmsearchtoolbar.cpp
new file mode 100644
index 0000000..617cf7b
--- /dev/null
+++ b/src/kchmsearchtoolbar.cpp
@@ -0,0 +1,438 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <qtoolbutton.h>
+#include <qcombobox.h>
+#include <qlineedit.h>
+#include <qtextedit.h>
+#include <qaccel.h>
+#include <qpopupmenu.h>
+#include <qmenubar.h>
+
+#include "libchmfile.h"
+#include "libchmfileimpl.h"
+
+#include "kchmmainwindow.h"
+#include "kchmviewwindow.h"
+#include "kchmconfig.h"
+#include "kchmsearchtoolbar.h"
+#include "kqrunprocess.h"
+#include "kchmtreeviewitem.h"
+#include "kchmcontentswindow.h"
+#include "iconstorage.h"
+
+#include "kchmsearchtoolbar.moc"
+
+static KQPopupMenu *menu_langlist, *menu_enclist;
+
+KCHMSearchAndViewToolbar::KCHMSearchAndViewToolbar( KCHMMainWindow * parent )
+ : QToolBar (parent)
+{
+ // Toolbar label
+ setLabel( i18n( "Find in page") );
+
+ // Load the pixmaps
+ QPixmap iconPrev (*gIconStorage.getToolbarPixmap(KCHMIconStorage::findprev));
+ QPixmap iconNext (*gIconStorage.getToolbarPixmap(KCHMIconStorage::findnext));
+ QPixmap iconFontInc (*gIconStorage.getToolbarPixmap(KCHMIconStorage::view_increase));
+ QPixmap iconFontDec (*gIconStorage.getToolbarPixmap(KCHMIconStorage::view_decrease));
+ QPixmap iconViewSource (*gIconStorage.getToolbarPixmap(KCHMIconStorage::viewsource));
+ QPixmap iconAddBookmark (*gIconStorage.getToolbarPixmap(KCHMIconStorage::bookmark_add));
+ QPixmap iconNextPage (*gIconStorage.getToolbarPixmap(KCHMIconStorage::next_page));
+ QPixmap iconPrevPage (*gIconStorage.getToolbarPixmap(KCHMIconStorage::prev_page));
+ QPixmap iconLocateInContent (*gIconStorage.getToolbarPixmap(KCHMIconStorage::locate_in_content));
+
+ // Create the combobox to enter the find text
+ m_findBox = new QComboBox (TRUE, this);
+ m_findBox->setMinimumWidth (200);
+ connect( m_findBox->lineEdit(), SIGNAL( returnPressed() ), this, SLOT( onReturnPressed() ) );
+ QWhatsThis::add( m_findBox, i18n( "Enter here the text to search in the current page.") );
+
+ QAccel *acc = new QAccel( this );
+ acc->connectItem( acc->insertItem(Key_F+CTRL), this, SLOT( onAccelFocusSearchField() ) );
+
+ // Button 'prevous search result'
+ m_buttonPrev = new QToolButton (iconPrev,
+ i18n( "Previous search result"),
+ QString::null,
+ this,
+ SLOT(onBtnPrevSearchResult()),
+ this);
+ QWhatsThis::add( m_buttonPrev, i18n( "Click this button to find previous search result.") );
+
+ // Button 'next search result'
+ m_buttonNext = new QToolButton (iconNext,
+ i18n( "Next search result"),
+ QString::null,
+ this,
+ SLOT(onBtnNextSearchResult()),
+ this);
+ QWhatsThis::add( m_buttonNext, i18n( "Click this button to find next search result.") );
+
+ // Button 'locate in content'
+ m_buttonLocateInContent = new QToolButton( iconLocateInContent,
+ i18n( "Locate this topic in content window"),
+ QString::null,
+ this,
+ SLOT( onBtnLocateInContentWindow() ),
+ this );
+ QWhatsThis::add( m_buttonLocateInContent, i18n( "Click this button to find current topic in the content window, and open it.") );
+
+ // Button 'increase font size'
+ m_buttonFontInc = new QToolButton (iconFontInc,
+ i18n( "Increase font size"),
+ QString::null,
+ this,
+ SLOT(onBtnFontInc()),
+ this);
+ QWhatsThis::add( m_buttonFontInc, i18n( "Click this button to increase the font size.") );
+
+ // Button 'decrease font size'
+ m_buttonFontDec = new QToolButton (iconFontDec,
+ i18n( "Decrease font size"),
+ QString::null,
+ this,
+ SLOT(onBtnFontDec()),
+ this);
+ QWhatsThis::add( m_buttonFontDec, i18n( "Click this button to decrease the font size.") );
+
+ // Button 'view HTML source'
+ m_buttonViewSource = new QToolButton (iconViewSource,
+ i18n( "View HTML source"),
+ QString::null,
+ this,
+ SLOT(onBtnViewSource()),
+ this);
+ QWhatsThis::add( m_buttonViewSource, i18n( "Click this button to open a separate window with the page HTML source.") );
+
+ // Button 'add a bookmark'
+ m_buttonAddBookmark = new QToolButton (iconAddBookmark,
+ i18n( "Add to bookmarks"),
+ QString::null,
+ this,
+ SLOT(onBtnAddBookmark()),
+ this);
+ QWhatsThis::add( m_buttonAddBookmark, i18n( "Click this button to add the current page to the bookmarks list.") );
+
+ m_buttonPrevPageInTOC = new QToolButton( iconPrevPage,
+ i18n( "Prev page in TOC"),
+ QString::null,
+ this,
+ SLOT(onBtnPrevPageInToc()),
+ this);
+ QWhatsThis::add( m_buttonAddBookmark, i18n( "Click this button to go to previous page in Table Of Content.") );
+
+ m_buttonNextPageInTOC = new QToolButton (iconNextPage,
+ i18n( "Next page in TOC"),
+ QString::null,
+ this,
+ SLOT(onBtnNextPageInToc()),
+ this);
+ QWhatsThis::add( m_buttonAddBookmark, i18n( "Click this button to go to next page in Table of Content.") );
+
+ // Create the approptiate menu entries in 'View' main menu
+ m_MenuView = new KQPopupMenu( parent );
+ parent->menuBar()->insertItem( i18n( "&View"), m_MenuView );
+
+ m_MenuView->insertItem( i18n( "&Increase font"), this, SLOT(onBtnFontInc()), CTRL+Key_Plus );
+ m_MenuView->insertItem( i18n( "&Decrease font"), this, SLOT(onBtnFontDec()), CTRL+Key_Minus );
+ m_MenuView->insertItem( i18n( "&View HTML source"), this, SLOT(onBtnViewSource()), CTRL+Key_U );
+
+ m_MenuView->insertSeparator();
+ m_MenuView->insertItem( i18n( "&Bookmark this page"), this, SLOT(onBtnAddBookmark()), CTRL+Key_T );
+ m_MenuView->insertSeparator();
+
+ m_menuShowFullscreenMenuID = m_MenuView->insertItem( i18n( "&Full screen"), this,
+ SLOT(onBtnFullScreen()), Key_F11 );
+ m_menuShowContentWindowMenuID = m_MenuView->insertItem( i18n( "&Show contents window"), this,
+ SLOT(onBtnToggleContentWindow()), Key_F9 );
+ m_MenuView->insertItem( i18n( "&Locate in contents window"), this,
+ SLOT(onBtnLocateInContentWindow()), CTRL+Key_L );
+
+ m_MenuView->setItemChecked( m_menuShowFullscreenMenuID, false );
+ m_MenuView->setItemChecked( m_menuShowContentWindowMenuID, true );
+ m_MenuView->insertSeparator();
+
+ // Create the language selection menu.
+ menu_langlist = new KQPopupMenu( parent );
+ KQPopupMenu * menu_sublang = 0;
+
+ // Because the encoding menu is very large, it is not reasonable to have a slot for every item.
+ // It is simplier just to use a single slot for any menu item of this submenu.
+ connect (menu_langlist, SIGNAL( activated(int) ), this, SLOT ( onMenuActivated(int) ));
+
+ // Add the language entries
+ const LCHMTextEncoding * enctable = LCHMFileImpl::getTextEncodingTable();
+ int idx;
+
+ for ( idx = 0; (enctable + idx)->language; idx++ )
+ {
+ // See the next item; does is have the same charset as current?
+ const LCHMTextEncoding * item = enctable + idx;
+ const LCHMTextEncoding * nextitem = enctable + idx + 1;
+
+ if ( nextitem->language
+ && !strcmp( item->language, nextitem->language) )
+ {
+ // If charset is the same as next one, create a new popup menu.
+ // If the menu is already created, add to it
+ if ( !menu_sublang )
+ {
+ menu_sublang = new KQPopupMenu( menu_langlist );
+ connect (menu_sublang, SIGNAL( activated(int) ), this, SLOT ( onMenuActivated(int) ));
+ }
+
+ menu_sublang->insertItem( item->sublanguage, idx );
+ continue;
+ }
+
+ // If the next charset differs from this one,
+ // add a submenu if menu_sublang is already created.
+ // otherwise, just add an item
+ if ( menu_sublang )
+ {
+ menu_sublang->insertItem( item->sublanguage, idx );
+ menu_langlist->insertItem( item->language, menu_sublang );
+ menu_sublang = 0;
+ }
+ else
+ menu_langlist->insertItem( item->language, idx );
+ }
+
+ m_MenuView->insertItem( i18n( "&Set language"), menu_langlist );
+ m_checkedEncodingInMenu = -1;
+ m_checkedLanguageInMenu = -1;
+
+ // Special menu for very smart people just to select codepage
+ QMap<QString,bool> addedCharsets;
+ menu_enclist = new KQPopupMenu( parent );
+
+ connect (menu_enclist, SIGNAL( activated(int) ), this, SLOT ( onMenuActivated(int) ));
+
+ // Add the codepage entries
+ for ( idx = 0; (enctable + idx)->language; idx++ )
+ {
+ const LCHMTextEncoding * item = enctable + idx;
+
+ // This menu is only for charsets, so we won't add duplicate charset twice
+ if ( addedCharsets.find( item->qtcodec ) != addedCharsets.end() )
+ continue;
+
+ addedCharsets[ item->qtcodec ] = true;
+ menu_enclist->insertItem( item->qtcodec, idx );
+ }
+
+ m_MenuView->insertItem( i18n( "&Set codepage"), menu_enclist );
+
+ QWhatsThis::whatsThisButton( this );
+}
+
+void KCHMSearchAndViewToolbar::setEnabled( bool enable )
+{
+ m_findBox->setEnabled (enable);
+ m_buttonPrev->setEnabled (enable);
+ m_buttonNext->setEnabled (enable);
+ m_buttonFontInc->setEnabled (enable);
+ m_buttonFontDec->setEnabled (enable);
+ m_buttonViewSource->setEnabled (enable);
+ m_buttonAddBookmark->setEnabled (enable);
+
+ bool enable_toc_nav_buttons = ::mainWindow->contentsWindow() && enable;
+ m_buttonNextPageInTOC->setEnabled( enable_toc_nav_buttons );
+ m_buttonPrevPageInTOC->setEnabled( enable_toc_nav_buttons );
+}
+
+void KCHMSearchAndViewToolbar::onReturnPressed( )
+{
+ search( true );
+}
+
+void KCHMSearchAndViewToolbar::onBtnPrevSearchResult( )
+{
+ search( false );
+}
+
+void KCHMSearchAndViewToolbar::onBtnNextSearchResult( )
+{
+ search( true );
+}
+
+void KCHMSearchAndViewToolbar::search( bool search_forward )
+{
+ QString searchexpr = m_findBox->lineEdit()->text();
+
+ if ( searchexpr.isEmpty() )
+ return;
+
+ ::mainWindow->currentBrowser()->searchWord( searchexpr, search_forward, false );
+}
+
+void KCHMSearchAndViewToolbar::onBtnFontInc( )
+{
+ ::mainWindow->currentBrowser()->addZoomFactor(1);
+}
+
+void KCHMSearchAndViewToolbar::onBtnFontDec( )
+{
+ ::mainWindow->currentBrowser()->addZoomFactor(-1);
+}
+
+void KCHMSearchAndViewToolbar::onBtnViewSource( )
+{
+ QString text;
+
+ if ( !::mainWindow->chmFile()->getFileContentAsString( &text, ::mainWindow->currentBrowser()->getOpenedPage() ) )
+ return;
+
+ if ( appConfig.m_advUseInternalEditor )
+ {
+ QTextEdit * editor = new QTextEdit ( 0 );
+ editor->setTextFormat ( Qt::PlainText );
+ editor->setText (text);
+ editor->setCaption ( QString(APP_NAME) + " - view HTML source of " + ::mainWindow->currentBrowser()->getOpenedPage() );
+ editor->resize (800, 600);
+ editor->show();
+ }
+ else
+ {
+ QFile file;
+ m_tempFileKeeper.generateTempFile( file );
+
+ file.writeBlock( text.utf8() );
+ run_process( appConfig.m_advExternalEditorPath, file.name() );
+ }
+}
+
+void KCHMSearchAndViewToolbar::onBtnAddBookmark( )
+{
+ emit ::mainWindow->slotAddBookmark();
+}
+
+void KCHMSearchAndViewToolbar::onMenuActivated( int id )
+{
+ const LCHMTextEncoding * enc = LCHMFileImpl::getTextEncodingTable() + id;
+ ::mainWindow->setTextEncoding( enc );
+}
+
+void KCHMSearchAndViewToolbar::setChosenEncodingInMenu( const LCHMTextEncoding * enc)
+{
+ if ( m_checkedEncodingInMenu != -1 )
+ menu_enclist->setItemChecked( m_checkedEncodingInMenu, false );
+
+ if ( m_checkedLanguageInMenu != -1 )
+ menu_langlist->setItemChecked( m_checkedLanguageInMenu, false );
+
+ int idx = LCHMFileImpl::getEncodingIndex( enc );
+ if ( idx == -1 )
+ return;
+
+ menu_langlist->setItemChecked( idx, true );
+ m_checkedLanguageInMenu = idx;
+
+ // For encoding, we need to set up charset!
+ const LCHMTextEncoding * enctable = LCHMFileImpl::getTextEncodingTable();
+ for ( idx = 0; (enctable + idx)->language; idx++ )
+ {
+ // See the next item; does is have the same charset as current?
+ const LCHMTextEncoding * item = enctable + idx;
+
+ // This menu is only for charsets, so we won't add duplicate charset twice
+ if ( !strcmp( item->qtcodec, enc->qtcodec ) )
+ {
+ menu_enclist->setItemChecked ( idx, true);
+ m_checkedEncodingInMenu = idx;
+ break;
+ }
+ }
+}
+
+void KCHMSearchAndViewToolbar::onBtnNextPageInToc()
+{
+ KCHMContentsWindow * cwnd = ::mainWindow->contentsWindow();
+
+ if ( !cwnd )
+ return;
+
+ // Try to find current list item
+ KCHMIndTocItem * current = cwnd->getTreeItem( ::mainWindow->currentBrowser()->getOpenedPage() );
+
+ if ( !current )
+ return;
+
+ QListViewItemIterator lit( current );
+ lit++;
+
+ if ( lit.current() )
+ ::mainWindow->openPage( ((KCHMIndTocItem *) lit.current() )->getUrl(), OPF_CONTENT_TREE | OPF_ADD2HISTORY );
+}
+
+void KCHMSearchAndViewToolbar::onBtnPrevPageInToc()
+{
+ KCHMContentsWindow * cwnd = ::mainWindow->contentsWindow();
+
+ if ( !cwnd )
+ return;
+
+ // Try to find current list item
+ KCHMIndTocItem * current = cwnd->getTreeItem( ::mainWindow->currentBrowser()->getOpenedPage() );
+
+ if ( !current )
+ return;
+
+ QListViewItemIterator lit( current );
+ lit--;
+
+ if ( lit.current() )
+ ::mainWindow->openPage( ((KCHMIndTocItem *) lit.current() )->getUrl(), OPF_CONTENT_TREE | OPF_ADD2HISTORY );
+}
+
+void KCHMSearchAndViewToolbar::onAccelFocusSearchField( )
+{
+ m_findBox->setFocus();
+}
+
+void KCHMSearchAndViewToolbar::onBtnToggleContentWindow( )
+{
+ showContentsWindow( !m_MenuView->isItemChecked( m_menuShowContentWindowMenuID ) );
+}
+
+void KCHMSearchAndViewToolbar::onBtnFullScreen( )
+{
+ setFullScreen( !m_MenuView->isItemChecked( m_menuShowFullscreenMenuID ) );
+}
+
+void KCHMSearchAndViewToolbar::setFullScreen( bool enable )
+{
+ ::mainWindow->slotEnableFullScreenMode( enable );
+ m_MenuView->setItemChecked( m_menuShowFullscreenMenuID, enable );
+}
+
+void KCHMSearchAndViewToolbar::showContentsWindow( bool enable )
+{
+ ::mainWindow->slotShowContentsWindow( enable );
+ m_MenuView->setItemChecked( m_menuShowContentWindowMenuID, enable );
+}
+
+void KCHMSearchAndViewToolbar::onBtnLocateInContentWindow( )
+{
+ ::mainWindow->slotLocateInContentWindow( );
+}
+
diff --git a/src/kchmsearchtoolbar.h b/src/kchmsearchtoolbar.h
new file mode 100644
index 0000000..be0cd99
--- /dev/null
+++ b/src/kchmsearchtoolbar.h
@@ -0,0 +1,87 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMSEARCHTOOLBAR_H
+#define KCHMSEARCHTOOLBAR_H
+
+#include "kde-qt.h"
+
+#include "forwarddeclarations.h"
+
+#include "kqtempfile.h"
+
+/**
+@author Georgy Yunaev
+*/
+class KCHMSearchAndViewToolbar : public QToolBar
+{
+ Q_OBJECT
+ public:
+ KCHMSearchAndViewToolbar (KCHMMainWindow *parent);
+
+ void setEnabled (bool enable);
+ void setChosenEncodingInMenu( const LCHMTextEncoding * encoding );
+
+ private slots:
+ void onReturnPressed();
+ void onBtnPrevSearchResult();
+ void onBtnNextSearchResult();
+ void onAccelFocusSearchField();
+
+ void onBtnFontInc();
+ void onBtnFontDec();
+ void onBtnViewSource();
+ void onBtnAddBookmark();
+ void onBtnNextPageInToc();
+ void onBtnPrevPageInToc();
+ void onMenuActivated ( int id );
+ void onBtnFullScreen();
+ void onBtnLocateInContentWindow();
+ void onBtnToggleContentWindow();
+
+ void setFullScreen( bool enable );
+ void showContentsWindow( bool enable );
+
+ private:
+ void search (bool forward);
+
+ KQPopupMenu * m_MenuView;
+ QComboBox * m_findBox;
+ QToolButton * m_buttonPrev;
+ QToolButton * m_buttonNext;
+ QToolButton * m_buttonFontInc;
+ QToolButton * m_buttonFontDec;
+ QToolButton * m_buttonViewSource;
+ QToolButton * m_buttonAddBookmark;
+ QToolButton * m_buttonNextPageInTOC;
+ QToolButton * m_buttonPrevPageInTOC;
+ QToolButton * m_buttonLocateInContent;
+
+ int m_checkedLanguageInMenu;
+ int m_checkedEncodingInMenu;
+
+ int m_menuShowFullscreenMenuID;
+ int m_menuShowContentWindowMenuID;
+
+ KQTempFileKeeper m_tempFileKeeper;
+};
+
+#endif
diff --git a/src/kchmsearchwindow.cpp b/src/kchmsearchwindow.cpp
new file mode 100644
index 0000000..790cc62
--- /dev/null
+++ b/src/kchmsearchwindow.cpp
@@ -0,0 +1,246 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "libchmfile.h"
+
+#include "kchmsearchwindow.h"
+#include "kchmmainwindow.h"
+#include "kchmconfig.h"
+#include "kchmlistitemtooltip.h"
+#include "kchmtreeviewitem.h"
+#include "kchmsearchengine.h"
+
+#include "kchmsearchwindow.moc"
+
+
+KCHMSearchWindow::KCHMSearchWindow( QWidget * parent, const char * name, WFlags f )
+ : QWidget (parent, name, f)
+{
+ QVBoxLayout * layout = new QVBoxLayout (this);
+ layout->setMargin(6);
+ layout->setSpacing(6);
+
+ // Labels <type words to search> and <help>
+ QHBoxLayout * labellayout = new QHBoxLayout();
+ labellayout->addWidget( new QLabel( i18n( "Type in word(s) to search for:"), this) );
+ labellayout->addStretch( 10 );
+
+ KCHMClickableLabel * helplink = new KCHMClickableLabel( i18n( "<a href=\"q\"><b>Help</b></a>"), this );
+ connect( helplink, SIGNAL( clicked() ), this, SLOT( onHelpClicked() ) );
+ helplink->setCursor( QCursor( Qt::PointingHandCursor ) );
+
+ labellayout->addWidget ( helplink );
+ layout->addLayout( labellayout );
+
+ m_searchQuery = new QComboBox (TRUE, this);
+ m_searchQuery->setFocus();
+ m_searchQuery->setMaxCount (10);
+ m_searchQuery->setSizePolicy ( QSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+
+ QPushButton * searchButton = new QPushButton ( i18n("Go"), this);
+ searchButton->setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Fixed ) );
+
+ QHBoxLayout * hlayout = new QHBoxLayout ( layout );
+ hlayout->addWidget ( m_searchQuery );
+ hlayout->addWidget ( searchButton );
+
+ m_searchList = new KQListView (this);
+ m_searchList->addColumn( i18n( "Title" ) );
+ m_searchList->addColumn( i18n( "Location" ) );
+ m_searchList->setShowToolTips(true);
+
+ connect( searchButton,
+ SIGNAL( clicked () ),
+ this,
+ SLOT( onReturnPressed() ) );
+
+ connect( m_searchQuery->lineEdit(),
+ SIGNAL( returnPressed() ),
+ this,
+ SLOT( onReturnPressed() ) );
+
+ connect( m_searchList,
+ SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int) ),
+ this,
+ SLOT( onDoubleClicked ( QListViewItem *, const QPoint &, int) ) );
+
+ connect( m_searchList,
+ SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ),
+ this,
+ SLOT( slotContextMenuRequested ( QListViewItem *, const QPoint &, int ) ) );
+
+ //layout->addSpacing (10);
+ layout->addWidget (m_searchList);
+
+ new KCHMListItemTooltip( m_searchList );
+ m_contextMenu = 0;
+ m_searchEngine = 0;
+}
+
+void KCHMSearchWindow::invalidate( )
+{
+ m_searchList->clear();
+ m_searchQuery->clear();
+ m_searchQuery->lineEdit()->clear();
+
+ delete m_searchEngine;
+ m_searchEngine = 0;
+}
+
+void KCHMSearchWindow::onReturnPressed( )
+{
+ QStringList results;
+ QString text = m_searchQuery->lineEdit()->text();
+
+ if ( text.isEmpty() )
+ return;
+
+ m_searchList->clear();
+
+ if ( searchQuery( text, &results ) )
+ {
+ if ( !results.empty() )
+ {
+ for ( unsigned int i = 0; i < results.size(); i++ )
+ {
+ new KCMSearchTreeViewItem ( m_searchList,
+ ::mainWindow->chmFile()->getTopicByUrl( results[i] ),
+ results[i],
+ results[i] );
+ }
+
+ ::mainWindow->showInStatusBar( i18n( "Search returned %1 result(s)" ) . arg(results.size()) );
+ }
+ else
+ ::mainWindow->showInStatusBar( i18n( "Search returned no results") );
+ }
+ else
+ ::mainWindow->showInStatusBar( i18n( "Search failed") );
+}
+
+
+void KCHMSearchWindow::onDoubleClicked( QListViewItem *item, const QPoint &, int)
+{
+ if ( !item )
+ return;
+
+ KCMSearchTreeViewItem * treeitem = (KCMSearchTreeViewItem *) item;
+ ::mainWindow->openPage( treeitem->getUrl(), OPF_ADD2HISTORY );
+}
+
+void KCHMSearchWindow::restoreSettings( const KCHMSettings::search_saved_settings_t & settings )
+{
+ for ( unsigned int i = 0; i < settings.size(); i++ )
+ m_searchQuery->insertItem (settings[i]);
+}
+
+void KCHMSearchWindow::saveSettings( KCHMSettings::search_saved_settings_t & settings )
+{
+ settings.clear();
+
+ for ( int i = 0; i < m_searchQuery->count(); i++ )
+ settings.push_back (m_searchQuery->text(i));
+}
+
+
+void KCHMSearchWindow::onHelpClicked( )
+{
+ if ( appConfig.m_useSearchEngine == KCHMConfig::SEARCH_USE_MINE )
+ {
+ QMessageBox::information ( this,
+ i18n( "How to use search"),
+ i18n( "<html><p>The improved search engine allows you to search for a word, symbol or phrase, which is set of words and symbols included in quotes. Only the documents which include all the terms speficide in th search query are shown; no prefixes needed.<p>Unlike MS CHM internal search index, my improved search engine indexes everything, including special symbols. Therefore it is possible to search (and find!) for something like <i>$q = new ChmFile();</i>. This search also fully supports Unicode, which means that you can search in non-English documents.<p>If you want to search for a quote symbol, use quotation mark instead. The engine treats a quote and a quotation mark as the same symbol, which allows to use them in phrases.</html>") );
+ }
+ else
+ {
+ QMessageBox::information ( this,
+ i18n( "How to use search"),
+ i18n( "The search query can contain a few prefixes.\nA set of words inside the quote marks mean that you are searching for exact phrase.\nA word with minus sign means that it should be absent in the search result.\nA word with plus mark or without any mark means that it must be present in the search result.\n\nNote that only letters and digits are indexed.\nYou cannot search for non-character symbols other than underscope, and those symbols will be removed from the search query.\nFor example, search for 'C' will give the same result as searching for 'C++'.") );
+ }
+}
+
+void KCHMSearchWindow::slotContextMenuRequested( QListViewItem * item, const QPoint & point, int )
+{
+ if ( !m_contextMenu )
+ m_contextMenu = ::mainWindow->currentBrowser()->createListItemContextMenu( this );
+
+ if( item )
+ {
+ KCMSearchTreeViewItem * treeitem = (KCMSearchTreeViewItem *) item;
+
+ ::mainWindow->currentBrowser()->setTabKeeper( treeitem->getUrl() );
+ m_contextMenu->popup( point );
+ }
+}
+
+bool KCHMSearchWindow::initSearchEngine( )
+{
+ m_searchEngine = new KCHMSearchEngine();
+
+ if ( !m_searchEngine->loadOrGenerateIndex() )
+ {
+ delete m_searchEngine;
+ m_searchEngine = 0;
+ return false;
+ }
+
+ return true;
+}
+
+
+void KCHMSearchWindow::execSearchQueryInGui( const QString & query )
+{
+ m_searchQuery->lineEdit()->setText( query );
+ onReturnPressed();
+}
+
+
+bool KCHMSearchWindow::searchQuery( const QString & query, QStringList * results )
+{
+ if ( appConfig.m_useSearchEngine == KCHMConfig::SEARCH_USE_MINE )
+ {
+ if ( !m_searchEngine && !initSearchEngine() )
+ return false;
+ }
+ else if ( !::mainWindow->chmFile()->hasSearchTable() )
+ {
+ QMessageBox::information ( this,
+ i18n( "Search is not available" ),
+ i18n( "<p>The search feature is not avaiable for this chm file."
+ "<p>The old search engine depends on indexes present in chm files itself. Not every chm file has an index; it is set up"
+ " during chm file creation. Therefore if the search index was not created during chm file creation, this makes search "
+ "impossible.<p>Solution: use new search engine (menu Settings/Advanced), which generates its own index.") );
+ return false;
+ }
+
+ if ( query.isEmpty() )
+ return false;
+
+ KCHMShowWaitCursor waitcursor;
+ bool result;
+
+ if ( appConfig.m_useSearchEngine == KCHMConfig::SEARCH_USE_MINE )
+ result = m_searchEngine->searchQuery( query, results );
+ else
+ result = ::mainWindow->chmFile()->searchQuery( query, results );
+
+ return result;
+}
diff --git a/src/kchmsearchwindow.h b/src/kchmsearchwindow.h
new file mode 100644
index 0000000..1834165
--- /dev/null
+++ b/src/kchmsearchwindow.h
@@ -0,0 +1,85 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMSEARCHWINDOW_H
+#define KCHMSEARCHWINDOW_H
+
+#include "kde-qt.h"
+
+#include "kchmsettings.h"
+#include "forwarddeclarations.h"
+
+
+/**
+@author Georgy Yunaev
+*/
+class KCHMSearchEngine;
+
+
+class KCHMClickableLabel : public QLabel
+{
+ Q_OBJECT
+ public:
+ KCHMClickableLabel( const QString& label, QWidget * parent )
+ : QLabel( label, parent ) {};
+
+ virtual ~KCHMClickableLabel() {};
+
+ signals:
+ void clicked();
+
+ protected:
+ virtual void mousePressEvent ( QMouseEvent * ) { emit clicked(); }
+};
+
+
+class KCHMSearchWindow : public QWidget
+{
+ Q_OBJECT
+ public:
+ KCHMSearchWindow ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+
+ void invalidate();
+ void restoreSettings (const KCHMSettings::search_saved_settings_t& settings);
+ void saveSettings (KCHMSettings::search_saved_settings_t& settings);
+ void execSearchQueryInGui( const QString& query );
+ bool searchQuery( const QString& query, QStringList * results );
+
+ public slots:
+ void slotContextMenuRequested ( QListViewItem *item, const QPoint &point, int column );
+
+ private slots:
+ void onHelpClicked();
+ void onReturnPressed ();
+ void onDoubleClicked ( QListViewItem *, const QPoint &, int);
+
+ private:
+ bool initSearchEngine();
+
+ private:
+ QComboBox * m_searchQuery;
+ KQListView * m_searchList;
+ KQPopupMenu * m_contextMenu;
+
+ KCHMSearchEngine* m_searchEngine;
+};
+
+#endif
diff --git a/src/kchmsettings.cpp b/src/kchmsettings.cpp
new file mode 100644
index 0000000..dcdcffa
--- /dev/null
+++ b/src/kchmsettings.cpp
@@ -0,0 +1,298 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qdatastream.h>
+
+#include "kchmsettings.h"
+#include "kchmconfig.h"
+
+static Q_INT32 SETTINGS_MAGIC = 0xD8AB4E76;
+static Q_INT32 SETTINGS_VERSION = 4;
+
+/*
+ * The order is important!
+ * To be compatible with next versions, you may add items ONLY before the MARKER_END!
+ */
+enum marker_t
+{
+ MARKER_FILESIZE = 1,
+ MARKER_FILETIME,
+
+ MARKER_ACTIVETABSYSTEM,
+ MARKER_ACTIVETABWINDOW,
+ MARKER_ACTIVEENCODING,
+ MARKER_SEARCHHISTORY,
+ MARKER_WINDOW_SIZE,
+
+ MARKER_BOOKMARKS,
+ MARKER_VIEWINDOWS,
+
+ MARKER_CONTENTSDATA,
+ MARKER_INDEXDATA,
+
+ // This should be the last
+ MARKER_END = 0x7FFF
+};
+
+// Helpers for serialization of SavedBookmark through QDataStream
+static inline QDataStream& operator<< ( QDataStream& s, const KCHMSettings::SavedBookmark& b )
+{
+ s << b.name;
+ s << b.url;
+ s << b.scroll_y;
+ return s;
+}
+
+static inline QDataStream& operator>> ( QDataStream& s, KCHMSettings::SavedBookmark& b )
+{
+ s >> b.name;
+ s >> b.url;
+ s >> b.scroll_y;
+ return s;
+}
+
+// Helpers for serialization of SavedViewWindow through QDataStream
+static inline QDataStream& operator<< ( QDataStream& s, const KCHMSettings::SavedViewWindow& b )
+{
+ // Store the version first. Later we can increase it when adding new members.
+ s << 1;
+ s << b.url;
+ s << b.scroll_y;
+ s << b.zoom;
+ return s;
+}
+
+static inline QDataStream& operator>> ( QDataStream& s, KCHMSettings::SavedViewWindow& b )
+{
+ Q_INT32 version;
+
+ s >> version;
+ s >> b.url;
+ s >> b.scroll_y;
+ s >> b.zoom;
+ return s;
+}
+
+
+KCHMSettings::KCHMSettings( )
+{
+ m_activetabsystem = 0;
+ m_activetabwindow = 0;
+ m_activeencodinglcid = 0;
+
+ m_window_size_x = 700;
+ m_window_size_y = 500;
+ m_window_size_splitter = 200;
+}
+
+
+bool KCHMSettings::loadSettings( const QString & filename )
+{
+ m_activetabsystem = 0;
+ m_activetabwindow = 0;
+ m_activeencodinglcid = 0;
+
+ m_searchhistory.clear();
+ m_bookmarks.clear();
+ m_viewwindows.clear();
+
+ QFileInfo finfo ( filename );
+
+ m_settingsFile = QString::null;
+ m_searchDictFile = QString::null;
+ m_searchDocFile = QString::null;
+
+ if ( !finfo.size() )
+ return false;
+
+ // Init those params, as they'll be used during save the first time even if the file is not here
+ m_currentfilesize = finfo.size();
+ m_currentfiledate = finfo.lastModified().toTime_t();
+
+ getFilenames( filename, &m_settingsFile, &m_searchDictFile, &m_searchDocFile );
+
+ QFile file( m_settingsFile );
+
+ if ( !file.open (IO_ReadOnly) )
+ return false; // it's ok, file may not exist
+
+ QDataStream stream (&file);
+
+ // Read and check header
+ Q_INT32 data;
+ bool complete_read = false;
+ stream >> data; // magic
+
+ if ( data != SETTINGS_MAGIC )
+ {
+ qWarning ("file %s has bad magic value, ignoring it.", file.name().ascii());
+ return false;
+ }
+
+ stream >> data; // version
+ if ( data > SETTINGS_VERSION )
+ {
+ qWarning ("file %s has unsupported data version %d, ignoring it.", file.name().ascii(), data);
+ return false;
+ }
+
+ // Read everything by marker
+ while ( 1 )
+ {
+ stream >> data; // marker
+ if ( data == MARKER_END )
+ {
+ complete_read = true;
+ break;
+ }
+
+ switch (data)
+ {
+ case MARKER_FILESIZE:
+ stream >> m_currentfilesize;
+ if ( m_currentfilesize != finfo.size() )
+ {
+ m_currentfilesize = finfo.size();
+ return false;
+ }
+ break;
+
+ case MARKER_FILETIME:
+ stream >> m_currentfiledate;
+ if ( m_currentfiledate != finfo.lastModified().toTime_t() )
+ {
+ m_currentfiledate = finfo.lastModified().toTime_t();
+ return false;
+ }
+ break;
+
+ case MARKER_ACTIVETABSYSTEM:
+ stream >> m_activetabsystem;
+ break;
+
+ case MARKER_ACTIVETABWINDOW:
+ stream >> m_activetabwindow;
+ break;
+
+ case MARKER_ACTIVEENCODING:
+ stream >> m_activeencodinglcid;
+ break;
+
+ case MARKER_WINDOW_SIZE:
+ stream >> m_window_size_x;
+ stream >> m_window_size_y;
+ stream >> m_window_size_splitter;
+ break;
+
+ case MARKER_SEARCHHISTORY:
+ stream >> m_searchhistory;
+ break;
+
+ case MARKER_BOOKMARKS:
+ stream >> m_bookmarks;
+ break;
+
+ case MARKER_VIEWINDOWS:
+ stream >> m_viewwindows;
+ break;
+ }
+ }
+
+ return complete_read;
+}
+
+
+bool KCHMSettings::saveSettings( )
+{
+ QFile file( m_settingsFile );
+ if ( !file.open (IO_WriteOnly) )
+ {
+ qWarning ("Could not write settings into file %s: %s", file.name().ascii(), file.errorString().ascii());
+ return false;
+ }
+
+ QDataStream stream (&file);
+
+ // Save header
+ stream << SETTINGS_MAGIC;
+ stream << SETTINGS_VERSION;
+
+ // Save size and last-modified
+ stream << MARKER_FILESIZE;
+ stream << m_currentfilesize;
+ stream << MARKER_FILETIME;
+ stream << m_currentfiledate;
+
+ // Save generic settings
+ stream << MARKER_ACTIVETABSYSTEM;
+ stream << m_activetabsystem;
+
+ // Save generic settings
+ stream << MARKER_ACTIVETABWINDOW;
+ stream << m_activetabwindow;
+
+ stream << MARKER_ACTIVEENCODING;
+ stream << m_activeencodinglcid;
+
+ // Save search history vector
+ stream << MARKER_SEARCHHISTORY;
+ stream << m_searchhistory;
+
+ // Save window size and splitter position
+ stream << MARKER_WINDOW_SIZE;
+ stream << m_window_size_x;
+ stream << m_window_size_y;
+ stream << m_window_size_splitter;
+
+ stream << MARKER_BOOKMARKS;
+ stream << m_bookmarks;
+
+ stream << MARKER_VIEWINDOWS;
+ stream << m_viewwindows;
+
+ stream << MARKER_END;
+ return true;
+}
+
+
+void KCHMSettings::removeSettings( const QString & filename )
+{
+ QString settingsfile, dictfile, doclistfile;
+
+ getFilenames( filename, &settingsfile, &dictfile, &doclistfile );
+
+ QFile::remove( settingsfile );
+ QFile::remove( dictfile );
+ QFile::remove( doclistfile );
+}
+
+
+void KCHMSettings::getFilenames(const QString & helpfilename, QString * settingsfile, QString * dictfile, QString * doclistfile )
+{
+ QFileInfo finfo ( helpfilename );
+ QString prefix = appConfig.m_datapath + "/" + finfo.baseName();
+
+ *settingsfile = prefix + ".kchmviewer";
+ *dictfile = prefix + ".dict";
+ *doclistfile = prefix + ".doclist";
+}
diff --git a/src/kchmsettings.h b/src/kchmsettings.h
new file mode 100644
index 0000000..2eb67b7
--- /dev/null
+++ b/src/kchmsettings.h
@@ -0,0 +1,94 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMSETTINGS_H
+#define KCHMSETTINGS_H
+
+#include <qstring.h>
+#include <qvaluelist.h>
+
+
+/**
+@author Georgy Yunaev
+*/
+class SavedBookmark;
+class QFileInfo;
+
+
+class KCHMSettings
+{
+ public:
+ KCHMSettings ();
+
+ bool loadSettings (const QString& filename);
+ bool saveSettings ( );
+ void removeSettings ( const QString& filename );
+
+ QString searchIndexDictFilename() const { return m_searchDictFile; }
+ QString searchIndexDocFilename() const { return m_searchDocFile; }
+
+ class SavedBookmark
+ {
+ public:
+ SavedBookmark() { scroll_y = 0; }
+ SavedBookmark (QString n, QString u, int y) : name(n), url(u), scroll_y(y) {};
+
+ QString name;
+ QString url;
+ int scroll_y;
+ };
+
+ class SavedViewWindow
+ {
+ public:
+ SavedViewWindow() { scroll_y = 0; zoom = 0; }
+ SavedViewWindow (QString u, int y, int z) : url(u), scroll_y(y), zoom(z) {};
+
+ QString url;
+ int scroll_y;
+ int zoom;
+ };
+
+ typedef QValueList<QString> search_saved_settings_t;
+ typedef QValueList<SavedBookmark> bookmark_saved_settings_t;
+ typedef QValueList<SavedViewWindow> viewindow_saved_settings_t;
+
+ int m_window_size_x;
+ int m_window_size_y;
+ int m_window_size_splitter;
+ int m_activetabsystem;
+ int m_activetabwindow;
+ int m_activeencodinglcid;
+ search_saved_settings_t m_searchhistory;
+ bookmark_saved_settings_t m_bookmarks;
+ viewindow_saved_settings_t m_viewwindows;
+
+ private:
+ void getFilenames(const QString & helpfilename, QString * settingsfile, QString * dictfile, QString * doclistfile );
+
+ unsigned int m_currentfilesize;
+ unsigned int m_currentfiledate;
+ QString m_settingsFile;
+ QString m_searchDictFile;
+ QString m_searchDocFile;
+};
+
+#endif
diff --git a/src/kchmsetupdialog.cpp b/src/kchmsetupdialog.cpp
new file mode 100644
index 0000000..05c1647
--- /dev/null
+++ b/src/kchmsetupdialog.cpp
@@ -0,0 +1,395 @@
+/****************************************************************************
+** Form implementation generated from reading ui file './kchmsetupdialog.ui'
+**
+** Created: Sat Jun 16 22:08:58 2007
+** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.8 edited Jan 11 14:47 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "kchmsetupdialog.h"
+
+#include <qvariant.h>
+#include <qpushbutton.h>
+#include <qtabwidget.h>
+#include <qwidget.h>
+#include <qbuttongroup.h>
+#include <qradiobutton.h>
+#include <qlabel.h>
+#include <qspinbox.h>
+#include <qcheckbox.h>
+#include <qgroupbox.h>
+#include <qlineedit.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/*
+ * Constructs a KCHMSetupDialog as a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'.
+ *
+ * The dialog will by default be modeless, unless you set 'modal' to
+ * TRUE to construct a modal dialog.
+ */
+KCHMSetupDialog::KCHMSetupDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
+ : QDialog( parent, name, modal, fl )
+{
+ if ( !name )
+ setName( "MyDialog1" );
+ setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
+ setSizeGripEnabled( FALSE );
+ setModal( TRUE );
+ MyDialog1Layout = new QVBoxLayout( this, 11, 6, "MyDialog1Layout");
+ MyDialog1Layout->setResizeMode( QLayout::Minimum );
+
+ tabWidget = new QTabWidget( this, "tabWidget" );
+
+ Widget8 = new QWidget( tabWidget, "Widget8" );
+ Widget8Layout = new QVBoxLayout( Widget8, 11, 6, "Widget8Layout");
+
+ layout4 = new QHBoxLayout( 0, 0, 6, "layout4");
+
+ buttonGroup1 = new QButtonGroup( Widget8, "buttonGroup1" );
+ buttonGroup1->setColumnLayout(0, Qt::Vertical );
+ buttonGroup1->layout()->setSpacing( 6 );
+ buttonGroup1->layout()->setMargin( 11 );
+ buttonGroup1Layout = new QVBoxLayout( buttonGroup1->layout() );
+ buttonGroup1Layout->setAlignment( Qt::AlignTop );
+
+ m_radioOnBeginOpenDialog = new QRadioButton( buttonGroup1, "m_radioOnBeginOpenDialog" );
+ buttonGroup1Layout->addWidget( m_radioOnBeginOpenDialog );
+
+ m_radioOnBeginOpenLast = new QRadioButton( buttonGroup1, "m_radioOnBeginOpenLast" );
+ buttonGroup1Layout->addWidget( m_radioOnBeginOpenLast );
+ layout4->addWidget( buttonGroup1 );
+
+ buttonGroup2 = new QButtonGroup( Widget8, "buttonGroup2" );
+ buttonGroup2->setColumnLayout(0, Qt::Vertical );
+ buttonGroup2->layout()->setSpacing( 6 );
+ buttonGroup2->layout()->setMargin( 11 );
+ buttonGroup2Layout = new QVBoxLayout( buttonGroup2->layout() );
+ buttonGroup2Layout->setAlignment( Qt::AlignTop );
+
+ layout3 = new QHBoxLayout( 0, 0, 6, "layout3");
+
+ textLabel1 = new QLabel( buttonGroup2, "textLabel1" );
+ layout3->addWidget( textLabel1 );
+
+ m_historySize = new QSpinBox( buttonGroup2, "m_historySize" );
+ m_historySize->setValue( 10 );
+ layout3->addWidget( m_historySize );
+
+ textLabel2 = new QLabel( buttonGroup2, "textLabel2" );
+ layout3->addWidget( textLabel2 );
+ buttonGroup2Layout->addLayout( layout3 );
+
+ m_rememberHistoryInfo = new QCheckBox( buttonGroup2, "m_rememberHistoryInfo" );
+ buttonGroup2Layout->addWidget( m_rememberHistoryInfo );
+ layout4->addWidget( buttonGroup2 );
+ Widget8Layout->addLayout( layout4 );
+
+ groupBox1 = new QGroupBox( Widget8, "groupBox1" );
+ groupBox1->setColumnLayout(0, Qt::Vertical );
+ groupBox1->layout()->setSpacing( 6 );
+ groupBox1->layout()->setMargin( 11 );
+ groupBox1Layout = new QHBoxLayout( groupBox1->layout() );
+ groupBox1Layout->setAlignment( Qt::AlignTop );
+
+ buttonGroup4 = new QButtonGroup( groupBox1, "buttonGroup4" );
+ buttonGroup4->setColumnLayout(0, Qt::Vertical );
+ buttonGroup4->layout()->setSpacing( 6 );
+ buttonGroup4->layout()->setMargin( 11 );
+ buttonGroup4Layout = new QVBoxLayout( buttonGroup4->layout() );
+ buttonGroup4Layout->setAlignment( Qt::AlignTop );
+
+ m_radioExtLinkOpenAlways = new QRadioButton( buttonGroup4, "m_radioExtLinkOpenAlways" );
+ buttonGroup4Layout->addWidget( m_radioExtLinkOpenAlways );
+
+ m_radioExtLinkAsk = new QRadioButton( buttonGroup4, "m_radioExtLinkAsk" );
+ buttonGroup4Layout->addWidget( m_radioExtLinkAsk );
+
+ m_radioExtLinkOpenNever = new QRadioButton( buttonGroup4, "m_radioExtLinkOpenNever" );
+ buttonGroup4Layout->addWidget( m_radioExtLinkOpenNever );
+ groupBox1Layout->addWidget( buttonGroup4 );
+
+ buttonGroup5 = new QButtonGroup( groupBox1, "buttonGroup5" );
+ buttonGroup5->setColumnLayout(0, Qt::Vertical );
+ buttonGroup5->layout()->setSpacing( 6 );
+ buttonGroup5->layout()->setMargin( 11 );
+ buttonGroup5Layout = new QVBoxLayout( buttonGroup5->layout() );
+ buttonGroup5Layout->setAlignment( Qt::AlignTop );
+
+ m_radioNewChmOpenAlways = new QRadioButton( buttonGroup5, "m_radioNewChmOpenAlways" );
+ buttonGroup5Layout->addWidget( m_radioNewChmOpenAlways );
+
+ m_radioNewChmAsk = new QRadioButton( buttonGroup5, "m_radioNewChmAsk" );
+ buttonGroup5Layout->addWidget( m_radioNewChmAsk );
+
+ m_radioNewChmOpenNever = new QRadioButton( buttonGroup5, "m_radioNewChmOpenNever" );
+ buttonGroup5Layout->addWidget( m_radioNewChmOpenNever );
+ groupBox1Layout->addWidget( buttonGroup5 );
+ Widget8Layout->addWidget( groupBox1 );
+ tabWidget->insertTab( Widget8, QString::fromLatin1("") );
+
+ Widget9 = new QWidget( tabWidget, "Widget9" );
+ Widget9Layout = new QVBoxLayout( Widget9, 11, 6, "Widget9Layout");
+
+ m_groupQtsettings = new QGroupBox( Widget9, "m_groupQtsettings" );
+ m_groupQtsettings->setColumnLayout(0, Qt::Vertical );
+ m_groupQtsettings->layout()->setSpacing( 6 );
+ m_groupQtsettings->layout()->setMargin( 11 );
+ m_groupQtsettingsLayout = new QHBoxLayout( m_groupQtsettings->layout() );
+ m_groupQtsettingsLayout->setAlignment( Qt::AlignTop );
+
+ textLabel1_2 = new QLabel( m_groupQtsettings, "textLabel1_2" );
+ textLabel1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, textLabel1_2->sizePolicy().hasHeightForWidth() ) );
+ textLabel1_2->setLineWidth( 1 );
+ textLabel1_2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
+ m_groupQtsettingsLayout->addWidget( textLabel1_2 );
+
+ m_qtBrowserPath = new QLineEdit( m_groupQtsettings, "m_qtBrowserPath" );
+ m_qtBrowserPath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, m_qtBrowserPath->sizePolicy().hasHeightForWidth() ) );
+ m_groupQtsettingsLayout->addWidget( m_qtBrowserPath );
+ Widget9Layout->addWidget( m_groupQtsettings );
+
+ m_groupKDEsettings = new QGroupBox( Widget9, "m_groupKDEsettings" );
+ m_groupKDEsettings->setColumnLayout(0, Qt::Vertical );
+ m_groupKDEsettings->layout()->setSpacing( 6 );
+ m_groupKDEsettings->layout()->setMargin( 11 );
+ m_groupKDEsettingsLayout = new QHBoxLayout( m_groupKDEsettings->layout() );
+ m_groupKDEsettingsLayout->setAlignment( Qt::AlignTop );
+
+ buttonGroup5_2 = new QButtonGroup( m_groupKDEsettings, "buttonGroup5_2" );
+ buttonGroup5_2->setColumnLayout(0, Qt::Vertical );
+ buttonGroup5_2->layout()->setSpacing( 6 );
+ buttonGroup5_2->layout()->setMargin( 11 );
+ buttonGroup5_2Layout = new QVBoxLayout( buttonGroup5_2->layout() );
+ buttonGroup5_2Layout->setAlignment( Qt::AlignTop );
+
+ m_radioUseQtextBrowser = new QRadioButton( buttonGroup5_2, "m_radioUseQtextBrowser" );
+ buttonGroup5_2Layout->addWidget( m_radioUseQtextBrowser );
+
+ m_radioUseKHTMLPart = new QRadioButton( buttonGroup5_2, "m_radioUseKHTMLPart" );
+ buttonGroup5_2Layout->addWidget( m_radioUseKHTMLPart );
+ m_groupKDEsettingsLayout->addWidget( buttonGroup5_2 );
+
+ groupKhtmlSecurity = new QGroupBox( m_groupKDEsettings, "groupKhtmlSecurity" );
+ groupKhtmlSecurity->setColumnLayout(0, Qt::Vertical );
+ groupKhtmlSecurity->layout()->setSpacing( 6 );
+ groupKhtmlSecurity->layout()->setMargin( 11 );
+ groupKhtmlSecurityLayout = new QGridLayout( groupKhtmlSecurity->layout() );
+ groupKhtmlSecurityLayout->setAlignment( Qt::AlignTop );
+
+ m_enableJS = new QCheckBox( groupKhtmlSecurity, "m_enableJS" );
+
+ groupKhtmlSecurityLayout->addWidget( m_enableJS, 0, 0 );
+
+ m_enablePlugins = new QCheckBox( groupKhtmlSecurity, "m_enablePlugins" );
+
+ groupKhtmlSecurityLayout->addWidget( m_enablePlugins, 0, 1 );
+
+ m_enableJava = new QCheckBox( groupKhtmlSecurity, "m_enableJava" );
+
+ groupKhtmlSecurityLayout->addWidget( m_enableJava, 1, 0 );
+
+ m_enableRefresh = new QCheckBox( groupKhtmlSecurity, "m_enableRefresh" );
+
+ groupKhtmlSecurityLayout->addWidget( m_enableRefresh, 1, 1 );
+ m_groupKDEsettingsLayout->addWidget( groupKhtmlSecurity );
+ Widget9Layout->addWidget( m_groupKDEsettings );
+ tabWidget->insertTab( Widget9, QString::fromLatin1("") );
+
+ TabPage = new QWidget( tabWidget, "TabPage" );
+ TabPageLayout = new QVBoxLayout( TabPage, 11, 6, "TabPageLayout");
+
+ buttonGroup7 = new QButtonGroup( TabPage, "buttonGroup7" );
+ buttonGroup7->setColumnLayout(0, Qt::Vertical );
+ buttonGroup7->layout()->setSpacing( 6 );
+ buttonGroup7->layout()->setMargin( 11 );
+ buttonGroup7Layout = new QVBoxLayout( buttonGroup7->layout() );
+ buttonGroup7Layout->setAlignment( Qt::AlignTop );
+
+ m_advViewSourceInternal = new QRadioButton( buttonGroup7, "m_advViewSourceInternal" );
+ buttonGroup7Layout->addWidget( m_advViewSourceInternal );
+
+ m_advViewSourceExternal = new QRadioButton( buttonGroup7, "m_advViewSourceExternal" );
+ buttonGroup7Layout->addWidget( m_advViewSourceExternal );
+
+ layout4_2 = new QHBoxLayout( 0, 0, 6, "layout4_2");
+
+ textLabel1_3 = new QLabel( buttonGroup7, "textLabel1_3" );
+ layout4_2->addWidget( textLabel1_3 );
+
+ m_advExternalProgramName = new QLineEdit( buttonGroup7, "m_advExternalProgramName" );
+ layout4_2->addWidget( m_advExternalProgramName );
+ buttonGroup7Layout->addLayout( layout4_2 );
+ TabPageLayout->addWidget( buttonGroup7 );
+
+ groupBox6 = new QButtonGroup( TabPage, "groupBox6" );
+ groupBox6->setColumnLayout(0, Qt::Vertical );
+ groupBox6->layout()->setSpacing( 6 );
+ groupBox6->layout()->setMargin( 11 );
+ groupBox6Layout = new QGridLayout( groupBox6->layout() );
+ groupBox6Layout->setAlignment( Qt::AlignTop );
+
+ m_useSearchEngineInternal = new QRadioButton( groupBox6, "m_useSearchEngineInternal" );
+
+ groupBox6Layout->addWidget( m_useSearchEngineInternal, 1, 0 );
+
+ m_labelUseSearchEngineInternal = new QLabel( groupBox6, "m_labelUseSearchEngineInternal" );
+ m_labelUseSearchEngineInternal->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 10, 0, m_labelUseSearchEngineInternal->sizePolicy().hasHeightForWidth() ) );
+ m_labelUseSearchEngineInternal->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
+
+ groupBox6Layout->addWidget( m_labelUseSearchEngineInternal, 1, 1 );
+
+ m_useSearchEngineNew = new QRadioButton( groupBox6, "m_useSearchEngineNew" );
+
+ groupBox6Layout->addWidget( m_useSearchEngineNew, 0, 0 );
+
+ m_labelUseSearchEngineNew = new QLabel( groupBox6, "m_labelUseSearchEngineNew" );
+ m_labelUseSearchEngineNew->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 10, 0, m_labelUseSearchEngineNew->sizePolicy().hasHeightForWidth() ) );
+ m_labelUseSearchEngineNew->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
+
+ groupBox6Layout->addWidget( m_labelUseSearchEngineNew, 0, 1 );
+ TabPageLayout->addWidget( groupBox6 );
+ tabWidget->insertTab( TabPage, QString::fromLatin1("") );
+ MyDialog1Layout->addWidget( tabWidget );
+
+ Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1");
+
+ buttonHelp = new QPushButton( this, "buttonHelp" );
+ buttonHelp->setAutoDefault( TRUE );
+ Layout1->addWidget( buttonHelp );
+ Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ Layout1->addItem( Horizontal_Spacing2 );
+
+ buttonOk = new QPushButton( this, "buttonOk" );
+ buttonOk->setAutoDefault( TRUE );
+ buttonOk->setDefault( TRUE );
+ Layout1->addWidget( buttonOk );
+
+ buttonCancel = new QPushButton( this, "buttonCancel" );
+ buttonCancel->setAutoDefault( TRUE );
+ Layout1->addWidget( buttonCancel );
+ MyDialog1Layout->addLayout( Layout1 );
+ languageChange();
+ resize( QSize(654, 343).expandedTo(minimumSizeHint()) );
+ clearWState( WState_Polished );
+
+ // signals and slots connections
+ connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
+ connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+ connect( m_radioUseKHTMLPart, SIGNAL( toggled(bool) ), groupKhtmlSecurity, SLOT( setEnabled(bool) ) );
+ connect( m_advViewSourceExternal, SIGNAL( toggled(bool) ), m_advExternalProgramName, SLOT( setEnabled(bool) ) );
+ connect( m_radioUseQtextBrowser, SIGNAL( toggled(bool) ), groupKhtmlSecurity, SLOT( setDisabled(bool) ) );
+
+ // tab order
+ setTabOrder( m_advViewSourceInternal, m_advViewSourceExternal );
+ setTabOrder( m_advViewSourceExternal, m_useSearchEngineNew );
+ setTabOrder( m_useSearchEngineNew, m_useSearchEngineInternal );
+ setTabOrder( m_useSearchEngineInternal, tabWidget );
+ setTabOrder( tabWidget, m_radioOnBeginOpenDialog );
+ setTabOrder( m_radioOnBeginOpenDialog, m_radioOnBeginOpenLast );
+ setTabOrder( m_radioOnBeginOpenLast, m_historySize );
+ setTabOrder( m_historySize, m_rememberHistoryInfo );
+ setTabOrder( m_rememberHistoryInfo, m_radioExtLinkOpenAlways );
+ setTabOrder( m_radioExtLinkOpenAlways, m_radioExtLinkAsk );
+ setTabOrder( m_radioExtLinkAsk, m_radioExtLinkOpenNever );
+ setTabOrder( m_radioExtLinkOpenNever, m_radioNewChmOpenAlways );
+ setTabOrder( m_radioNewChmOpenAlways, m_radioNewChmAsk );
+ setTabOrder( m_radioNewChmAsk, m_radioNewChmOpenNever );
+ setTabOrder( m_radioNewChmOpenNever, m_qtBrowserPath );
+ setTabOrder( m_qtBrowserPath, m_radioUseQtextBrowser );
+ setTabOrder( m_radioUseQtextBrowser, m_radioUseKHTMLPart );
+ setTabOrder( m_radioUseKHTMLPart, m_enableJS );
+ setTabOrder( m_enableJS, m_enablePlugins );
+ setTabOrder( m_enablePlugins, m_enableJava );
+ setTabOrder( m_enableJava, m_enableRefresh );
+ setTabOrder( m_enableRefresh, m_advExternalProgramName );
+ setTabOrder( m_advExternalProgramName, buttonHelp );
+ setTabOrder( buttonHelp, buttonOk );
+ setTabOrder( buttonOk, buttonCancel );
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+KCHMSetupDialog::~KCHMSetupDialog()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ * Sets the strings of the subwidgets using the current
+ * language.
+ */
+void KCHMSetupDialog::languageChange()
+{
+ setCaption( tr( "KchmViewer settings" ) );
+ buttonGroup1->setTitle( tr( "If no arguments given on load" ) );
+ m_radioOnBeginOpenDialog->setText( tr( "Open the 'open CHM file' dialog" ) );
+ m_radioOnBeginOpenLast->setText( tr( "Open the &last used CHM file, if exist" ) );
+ m_radioOnBeginOpenLast->setAccel( QKeySequence( tr( "Alt+L" ) ) );
+ buttonGroup2->setTitle( tr( "History" ) );
+ textLabel1->setText( tr( "Store history information for" ) );
+ m_historySize->setPrefix( QString::null );
+ textLabel2->setText( tr( "latest files" ) );
+ m_rememberHistoryInfo->setText( tr( "R&emember extra information for history files" ) );
+ m_rememberHistoryInfo->setAccel( QKeySequence( tr( "Alt+E" ) ) );
+ QToolTip::add( m_rememberHistoryInfo, tr( "Remembers the information about the files, which were opened. Remembers last opened page, search history, font size, bookmarks and so on." ) );
+ groupBox1->setTitle( tr( "CHM security settings" ) );
+ buttonGroup4->setTitle( tr( "When external link clicked" ) );
+ m_radioExtLinkOpenAlways->setText( tr( "Alwa&ys open it in external browser" ) );
+ m_radioExtLinkOpenAlways->setAccel( QKeySequence( tr( "Alt+Y" ) ) );
+ m_radioExtLinkAsk->setText( tr( "Ask for confirmation" ) );
+ m_radioExtLinkOpenNever->setText( tr( "Do not open the link" ) );
+ m_radioExtLinkOpenNever->setAccel( QKeySequence( QString::null ) );
+ buttonGroup5->setTitle( tr( "When link pointed to a new CHM file clicked" ) );
+ m_radioNewChmOpenAlways->setText( tr( "Always open a new CHM file" ) );
+ m_radioNewChmAsk->setText( tr( "Ask for confirmation" ) );
+ m_radioNewChmOpenNever->setText( tr( "Do not open a new CHM file" ) );
+ tabWidget->changeTab( Widget8, tr( "General behavior" ) );
+ m_groupQtsettings->setTitle( tr( "Qt version settings" ) );
+ textLabel1_2->setText( tr( "Enter the path to the program, which will be used as a browser for external links. A <i>%s</i> symbol will be replaced by the URL clicked." ) );
+ m_groupKDEsettings->setTitle( tr( "KDE version settings" ) );
+ buttonGroup5_2->setTitle( tr( "To show HTML content, use" ) );
+ m_radioUseQtextBrowser->setText( tr( "&QTextBrowser-based widget" ) );
+ m_radioUseQtextBrowser->setAccel( QKeySequence( tr( "Alt+Q" ) ) );
+ m_radioUseKHTMLPart->setText( tr( "&KHTMLPart-based widget" ) );
+ m_radioUseKHTMLPart->setAccel( QKeySequence( tr( "Alt+K" ) ) );
+ groupKhtmlSecurity->setTitle( tr( "KHTMLPart security" ) );
+ m_enableJS->setText( tr( "Enable Java&Script" ) );
+ m_enableJS->setAccel( QKeySequence( tr( "Alt+S" ) ) );
+ m_enablePlugins->setText( tr( "Enable &plugins" ) );
+ m_enablePlugins->setAccel( QKeySequence( tr( "Alt+P" ) ) );
+ m_enableJava->setText( tr( "Enable &Java" ) );
+ m_enableJava->setAccel( QKeySequence( tr( "Alt+J" ) ) );
+ m_enableRefresh->setText( tr( "Enable &refresh" ) );
+ m_enableRefresh->setAccel( QKeySequence( tr( "Alt+R" ) ) );
+ tabWidget->changeTab( Widget9, tr( "Version-specific settings" ) );
+ buttonGroup7->setTitle( tr( "View HTML source command uses" ) );
+ m_advViewSourceInternal->setText( tr( "Built-in HTML source viewer" ) );
+ m_advViewSourceInternal->setAccel( QKeySequence( QString::null ) );
+ m_advViewSourceExternal->setText( tr( "E&xternal program, specified below" ) );
+ m_advViewSourceExternal->setAccel( QKeySequence( tr( "Alt+X" ) ) );
+ textLabel1_3->setText( tr( "External program:" ) );
+ groupBox6->setTitle( tr( "Search engine to use" ) );
+ m_useSearchEngineInternal->setText( QString::null );
+ m_labelUseSearchEngineInternal->setText( tr( "Use the search based on internal CHM index. This engine cannot search for any symbols except underscode, does not support multibyte languages, and is not always available." ) );
+ m_useSearchEngineNew->setText( QString::null );
+ m_labelUseSearchEngineNew->setText( tr( "Use new kchmviewer internal search engine (recommended). This engine indexes symbols, so it is possible to search for special symbols (like \"C++\"). All languages are supported. The index will be generated before the first search." ) );
+ tabWidget->changeTab( TabPage, tr( "Advanced" ) );
+ buttonHelp->setText( tr( "&Help" ) );
+ buttonHelp->setAccel( QKeySequence( tr( "F1" ) ) );
+ buttonOk->setText( tr( "&OK" ) );
+ buttonOk->setAccel( QKeySequence( QString::null ) );
+ buttonCancel->setText( tr( "&Cancel" ) );
+ buttonCancel->setAccel( QKeySequence( QString::null ) );
+}
+
+void KCHMSetupDialog::m_radioUseKHTMLPart_toggled(bool)
+{
+ qWarning( "KCHMSetupDialog::m_radioUseKHTMLPart_toggled(bool): Not implemented yet" );
+}
+
+#include "kchmsetupdialog.moc"
diff --git a/src/kchmsetupdialog.ui b/src/kchmsetupdialog.ui
new file mode 100644
index 0000000..c65d0fa
--- /dev/null
+++ b/src/kchmsetupdialog.ui
@@ -0,0 +1,710 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>KCHMSetupDialog</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>MyDialog1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>654</width>
+ <height>343</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="caption">
+ <string>KchmViewer settings</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>false</bool>
+ </property>
+ <property name="modal">
+ <bool>true</bool>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="resizeMode">
+ <enum>Minimum</enum>
+ </property>
+ <widget class="QTabWidget">
+ <property name="name">
+ <cstring>tabWidget</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>Widget8</cstring>
+ </property>
+ <attribute name="title">
+ <string>General behavior</string>
+ </attribute>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout4</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup1</cstring>
+ </property>
+ <property name="title">
+ <string>If no arguments given on load</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>m_radioOnBeginOpenDialog</cstring>
+ </property>
+ <property name="text">
+ <string>Open the 'open CHM file' dialog</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>m_radioOnBeginOpenLast</cstring>
+ </property>
+ <property name="text">
+ <string>Open the &amp;last used CHM file, if exist</string>
+ </property>
+ <property name="accel">
+ <string>Alt+L</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup2</cstring>
+ </property>
+ <property name="title">
+ <string>History</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Store history information for</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>m_historySize</cstring>
+ </property>
+ <property name="prefix">
+ <string></string>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>latest files</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_rememberHistoryInfo</cstring>
+ </property>
+ <property name="text">
+ <string>R&amp;emember extra information for history files</string>
+ </property>
+ <property name="accel">
+ <string>Alt+E</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Remembers the information about the files, which were opened. Remembers last opened page, search history, font size, bookmarks and so on.</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>CHM security settings</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup4</cstring>
+ </property>
+ <property name="title">
+ <string>When external link clicked</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>m_radioExtLinkOpenAlways</cstring>
+ </property>
+ <property name="text">
+ <string>Alwa&amp;ys open it in external browser</string>
+ </property>
+ <property name="accel">
+ <string>Alt+Y</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>m_radioExtLinkAsk</cstring>
+ </property>
+ <property name="text">
+ <string>Ask for confirmation</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>m_radioExtLinkOpenNever</cstring>
+ </property>
+ <property name="text">
+ <string>Do not open the link</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup5</cstring>
+ </property>
+ <property name="title">
+ <string>When link pointed to a new CHM file clicked</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>m_radioNewChmOpenAlways</cstring>
+ </property>
+ <property name="text">
+ <string>Always open a new CHM file</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>m_radioNewChmAsk</cstring>
+ </property>
+ <property name="text">
+ <string>Ask for confirmation</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>m_radioNewChmOpenNever</cstring>
+ </property>
+ <property name="text">
+ <string>Do not open a new CHM file</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>Widget9</cstring>
+ </property>
+ <attribute name="title">
+ <string>Version-specific settings</string>
+ </attribute>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>m_groupQtsettings</cstring>
+ </property>
+ <property name="title">
+ <string>Qt version settings</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="lineWidth">
+ <number>1</number>
+ </property>
+ <property name="text">
+ <string>Enter the path to the program, which will be used as a browser for external links. A &lt;i&gt;%s&lt;/i&gt; symbol will be replaced by the URL clicked.</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>m_qtBrowserPath</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>m_groupKDEsettings</cstring>
+ </property>
+ <property name="title">
+ <string>KDE version settings</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup5_2</cstring>
+ </property>
+ <property name="title">
+ <string>To show HTML content, use</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>m_radioUseQtextBrowser</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;QTextBrowser-based widget</string>
+ </property>
+ <property name="accel">
+ <string>Alt+Q</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>m_radioUseKHTMLPart</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;KHTMLPart-based widget</string>
+ </property>
+ <property name="accel">
+ <string>Alt+K</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupKhtmlSecurity</cstring>
+ </property>
+ <property name="title">
+ <string>KHTMLPart security</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>m_enableJS</cstring>
+ </property>
+ <property name="text">
+ <string>Enable Java&amp;Script</string>
+ </property>
+ <property name="accel">
+ <string>Alt+S</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="1">
+ <property name="name">
+ <cstring>m_enablePlugins</cstring>
+ </property>
+ <property name="text">
+ <string>Enable &amp;plugins</string>
+ </property>
+ <property name="accel">
+ <string>Alt+P</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>m_enableJava</cstring>
+ </property>
+ <property name="text">
+ <string>Enable &amp;Java</string>
+ </property>
+ <property name="accel">
+ <string>Alt+J</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="1">
+ <property name="name">
+ <cstring>m_enableRefresh</cstring>
+ </property>
+ <property name="text">
+ <string>Enable &amp;refresh</string>
+ </property>
+ <property name="accel">
+ <string>Alt+R</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>TabPage</cstring>
+ </property>
+ <attribute name="title">
+ <string>Advanced</string>
+ </attribute>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup7</cstring>
+ </property>
+ <property name="title">
+ <string>View HTML source command uses</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>m_advViewSourceInternal</cstring>
+ </property>
+ <property name="text">
+ <string>Built-in HTML source viewer</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>m_advViewSourceExternal</cstring>
+ </property>
+ <property name="text">
+ <string>E&amp;xternal program, specified below</string>
+ </property>
+ <property name="accel">
+ <string>Alt+X</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout4</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_3</cstring>
+ </property>
+ <property name="text">
+ <string>External program:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>m_advExternalProgramName</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>groupBox6</cstring>
+ </property>
+ <property name="title">
+ <string>Search engine to use</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>m_useSearchEngineInternal</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="1">
+ <property name="name">
+ <cstring>m_labelUseSearchEngineInternal</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>10</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Use the search based on internal CHM index. This engine cannot search for any symbols except underscode, does not support multibyte languages, and is not always available.</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>m_useSearchEngineNew</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="1">
+ <property name="name">
+ <cstring>m_labelUseSearchEngineNew</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>10</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Use new kchmviewer internal search engine (recommended). This engine indexes symbols, so it is possible to search for special symbols (like "C++"). All languages are supported. The index will be generated before the first search.</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </vbox>
+ </widget>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonHelp</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ <property name="accel">
+ <string>F1</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Horizontal Spacing2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>MyDialog1</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>MyDialog1</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>m_radioUseKHTMLPart</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>groupKhtmlSecurity</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>m_advViewSourceExternal</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>m_advExternalProgramName</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>m_radioUseQtextBrowser</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>groupKhtmlSecurity</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>m_advViewSourceInternal</tabstop>
+ <tabstop>m_advViewSourceExternal</tabstop>
+ <tabstop>m_useSearchEngineNew</tabstop>
+ <tabstop>m_useSearchEngineInternal</tabstop>
+ <tabstop>tabWidget</tabstop>
+ <tabstop>m_radioOnBeginOpenDialog</tabstop>
+ <tabstop>m_radioOnBeginOpenLast</tabstop>
+ <tabstop>m_historySize</tabstop>
+ <tabstop>m_rememberHistoryInfo</tabstop>
+ <tabstop>m_radioExtLinkOpenAlways</tabstop>
+ <tabstop>m_radioExtLinkAsk</tabstop>
+ <tabstop>m_radioExtLinkOpenNever</tabstop>
+ <tabstop>m_radioNewChmOpenAlways</tabstop>
+ <tabstop>m_radioNewChmAsk</tabstop>
+ <tabstop>m_radioNewChmOpenNever</tabstop>
+ <tabstop>m_qtBrowserPath</tabstop>
+ <tabstop>m_radioUseQtextBrowser</tabstop>
+ <tabstop>m_radioUseKHTMLPart</tabstop>
+ <tabstop>m_enableJS</tabstop>
+ <tabstop>m_enablePlugins</tabstop>
+ <tabstop>m_enableJava</tabstop>
+ <tabstop>m_enableRefresh</tabstop>
+ <tabstop>m_advExternalProgramName</tabstop>
+ <tabstop>buttonHelp</tabstop>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+</tabstops>
+<slots>
+ <slot>m_radioUseKHTMLPart_toggled( bool )</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/kchmsourcefactory.cpp b/src/kchmsourcefactory.cpp
new file mode 100644
index 0000000..8b4232c
--- /dev/null
+++ b/src/kchmsourcefactory.cpp
@@ -0,0 +1,94 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <qcstring.h>
+#include <qimage.h>
+#include <qdir.h>
+
+#include "libchmfile.h"
+#include "libchmurlfactory.h"
+
+#include "kchmmainwindow.h"
+#include "kchmviewwindow.h"
+#include "kchmsourcefactory.h"
+#include "kchmviewwindow_qtextbrowser.h"
+
+
+KCHMSourceFactory::KCHMSourceFactory (KCHMViewWindow * viewwindow)
+ : QMimeSourceFactory()
+{
+ m_viewWindow = viewwindow;
+}
+
+
+const QMimeSource * KCHMSourceFactory::data( const QString & abs_name ) const
+{
+ QString data, file, path = abs_name;
+
+ // Retreive the data from chm file
+ LCHMFile * chm = ::mainWindow->chmFile();
+
+ if ( !chm )
+ return 0;
+
+ int pos = path.find ('#');
+ if ( pos != -1 )
+ path = path.left (pos);
+
+ // To handle a single-image pages, we need to generate the HTML page to show
+ // this image. We did it in KCHMViewWindow::handleStartPageAsImage; now we need
+ // to generate the HTML page, and set it.
+ if ( LCHMUrlFactory::handleFileType( path, data ) )
+ {
+ ((QMimeSourceFactory*)this)->setText (path, data);
+ }
+ else if ( path.endsWith (".htm") || path.endsWith (".html") )
+ {
+ if ( chm->getFileContentAsString( &data, path ) )
+ ((QMimeSourceFactory*)this)->setText (path, data);
+ }
+ else
+ {
+ // treat as image
+ QImage img;
+ QByteArray buf;
+
+ QString fpath = KCHMViewWindow_QTextBrowser::decodeUrl( path );
+
+ if ( chm->getFileContentAsBinary( &buf, fpath ) )
+ {
+ if ( img.loadFromData ( (const uchar *) buf.data(), buf.size() ) )
+ ((QMimeSourceFactory*)this)->setImage (path, img);
+ }
+ else
+ {
+ ((QMimeSourceFactory*)this)->setImage( path, img );
+ qWarning( "Could not resolve file %s\n", path.ascii() );
+ }
+ }
+
+ return QMimeSourceFactory::data (path);
+}
+
+QString KCHMSourceFactory::makeAbsolute ( const QString & abs_or_rel_name, const QString & ) const
+{
+ return m_viewWindow->makeURLabsolute ( abs_or_rel_name, false );
+}
diff --git a/src/kchmsourcefactory.h b/src/kchmsourcefactory.h
new file mode 100644
index 0000000..dd03968
--- /dev/null
+++ b/src/kchmsourcefactory.h
@@ -0,0 +1,43 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMSOURCEFACTORY_H
+#define KCHMSOURCEFACTORY_H
+
+#include <qmime.h>
+#include "forwarddeclarations.h"
+
+/**
+@author Georgy Yunaev
+*/
+class KCHMSourceFactory : public QMimeSourceFactory
+{
+public:
+ KCHMSourceFactory (KCHMViewWindow * viewwindow);
+
+ virtual const QMimeSource * data ( const QString & abs_name ) const;
+ virtual QString makeAbsolute ( const QString & abs_or_rel_name, const QString & context ) const;
+
+private:
+ KCHMViewWindow * m_viewWindow;
+};
+
+#endif
diff --git a/src/kchmtreeviewitem.cpp b/src/kchmtreeviewitem.cpp
new file mode 100644
index 0000000..7a82a39
--- /dev/null
+++ b/src/kchmtreeviewitem.cpp
@@ -0,0 +1,286 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <qstringlist.h>
+#include <qstyle.h>
+
+#include "kchmtreeviewitem.h"
+#include "kchmmainwindow.h"
+#include "kchmdialogchooseurlfromlist.h"
+#include "iconstorage.h"
+
+
+KCHMIndTocItem::KCHMIndTocItem( QListViewItem * parent, QListViewItem * after, QString name, QString aurl, int image) : QListViewItem(parent, after, name), url(aurl), image_number(image)
+{
+}
+
+KCHMIndTocItem::KCHMIndTocItem( QListView * parent, QListViewItem * after, QString name, QString aurl, int image) : QListViewItem(parent, after, name), url(aurl), image_number(image)
+{
+}
+
+
+const QPixmap * KCHMIndTocItem::pixmap( int i ) const
+{
+ int imagenum;
+
+ if ( i || image_number == LCHMBookIcons::IMAGE_NONE || image_number == LCHMBookIcons::IMAGE_INDEX )
+ return 0;
+
+ if ( firstChild () )
+ {
+ if ( isOpen() )
+ imagenum = (image_number == LCHMBookIcons::IMAGE_AUTO) ? 1 : image_number;
+ else
+ imagenum = (image_number == LCHMBookIcons::IMAGE_AUTO) ? 0 : image_number + 1;
+ }
+ else
+ imagenum = (image_number == LCHMBookIcons::IMAGE_AUTO) ? 10 : image_number;
+
+ return ::mainWindow->chmFile()->getBookIconPixmap( imagenum );
+}
+
+
+QString KCHMIndTocItem::getUrl( ) const
+{
+ if ( url.find ('|') == -1 )
+ return url;
+
+ // Create a dialog with URLs, and show it, so user can select an URL he/she wants.
+ QStringList urls = QStringList::split ('|', url);
+ QStringList titles;
+ LCHMFile * xchm = ::mainWindow->chmFile();
+
+ for ( unsigned int i = 0; i < urls.size(); i++ )
+ {
+ QString title = xchm->getTopicByUrl (urls[i]);
+
+ if ( !title )
+ {
+ qWarning ("Could not get item name for url '%s'", urls[i].ascii());
+ titles.push_back(QString::null);
+ }
+ else
+ titles.push_back(title);
+ }
+
+ KCHMDialogChooseUrlFromList dlg (urls, titles, ::mainWindow);
+
+ if ( dlg.exec() == QDialog::Accepted )
+ return dlg.getSelectedItemUrl();
+
+ return QString::null;
+}
+
+
+void KCHMIndTocItem::paintBranches( QPainter * p, const QColorGroup & cg, int w, int y, int h )
+{
+ if ( image_number != LCHMBookIcons::IMAGE_INDEX )
+ QListViewItem::paintBranches(p, cg, w, y, h);
+ else
+ {
+ // Too bad that listView()->paintEmptyArea( p, QRect( 0, 0, w, h ) ) is protected.
+ // Taken from qt-x11-free-3.0.4/src/widgets/qlistview.cpp
+ QStyleOption opt( 0, 0 );
+ QStyle::SFlags how = QStyle::Style_Default | QStyle::Style_Enabled;
+
+ listView()->style().drawComplexControl( QStyle::CC_ListView,
+ p, listView(), QRect( 0, 0, w, h ), cg,
+ how, QStyle::SC_ListView, QStyle::SC_None,
+ opt );
+ }
+}
+
+
+void KCHMIndTocItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align )
+{
+ QColorGroup newcg ( cg );
+ QColor c = newcg.text();
+
+ if ( url.find ('|') != -1 )
+ newcg.setColor( QColorGroup::Text, Qt::red );
+ else if ( url[0] == ':' )
+ newcg.setColor( QColorGroup::Text, Qt::lightGray );
+ else
+ {
+ QListViewItem::paintCell( p, cg, column, width, align );
+ return;
+ }
+
+ QListViewItem::paintCell( p, newcg, column, width, align );
+ newcg.setColor( QColorGroup::Text, c );
+}
+
+
+void KCHMIndTocItem::setOpen( bool open )
+{
+ if ( image_number != LCHMBookIcons::IMAGE_INDEX || open )
+ QListViewItem::setOpen (open);
+}
+
+void kchmFillListViewWithParsedData( QListView * list, const QValueVector< LCHMParsedEntry >& data, QMap<QString, KCHMIndTocItem*> * map )
+{
+ QValueVector< KCHMIndTocItem *> lastchild;
+ QValueVector< KCHMIndTocItem *> rootentry;
+
+ if ( map )
+ map->clear();
+
+ list->clear();
+
+ for ( unsigned int i = 0; i < data.size(); i++ )
+ {
+ unsigned int indent = data[i].indent;
+
+ // Do we need to add another indent?
+ if ( indent >= lastchild.size() )
+ {
+ lastchild.resize( indent + 1 );
+ lastchild[indent] = 0;
+
+ rootentry.resize( indent + 1 );
+ rootentry[indent] = 0;
+ }
+
+ // Create the node
+ KCHMIndTocItem * item;
+ QString url = data[i].urls.join ("|");
+
+ if ( indent == 0 )
+ item = new KCHMIndTocItem( list, lastchild[indent], data[i].name, url, data[i].imageid );
+ else
+ {
+ // New non-root entry. It is possible (for some buggy CHMs) that there is no previous entry: previoous entry had indent 1,
+ // and next entry has indent 3. Backtracking it up, creating missing entries.
+ if ( rootentry[indent-1] == 0 )
+ qFatal("Child entry indented as %d with no root entry!", indent);
+
+ item = new KCHMIndTocItem( rootentry[indent-1], lastchild[indent], data[i].name, url, data[i].imageid );
+ }
+
+ // Hack: if map is 0, we have index, so make it open
+ if ( map )
+ {
+ for ( unsigned int li = 0; li < data[i].urls.size(); li++ )
+ map->insert( data[i].urls[li], item );
+ }
+ else
+ item->setOpen( true );
+
+ lastchild[indent] = item;
+ rootentry[indent] = item;
+ }
+
+ list->triggerUpdate();
+/*
+ KCHMMainTreeViewItem * item;
+
+ if ( !root_indent_offset_set )
+ {
+ root_indent_offset_set = true;
+ root_indent_offset = indent;
+
+ if ( root_indent_offset > 1 )
+ qWarning("CHM has improper index; root indent offset is %d", root_indent_offset);
+ }
+
+ int real_indent = indent - root_indent_offset;
+ QString url = urls.join ("|");
+
+ if ( real_indent == 0 )
+ {
+ // New root entry
+ item = new KCHMMainTreeViewItem (tree, lastchild[real_indent], name, url, imagenum);
+ DEBUGPARSER(("<root object>: '%s', new rootentry %08X\n", name.ascii(), item));
+ }
+ else
+ {
+ // New non-root entry
+ if ( !rootentry[real_indent-1] )
+ qFatal("CHMFile::ParseAndFillTopicsTree: child entry \"%s\" indented as %d with no root entry!", name.ascii(), real_indent);
+
+ item = new KCHMMainTreeViewItem (rootentry[real_indent-1], lastchild[real_indent], name, url, imagenum);
+ DEBUGPARSER(("<object>: '%s', indent %d, rootentry %08X, item %08X\n", name.ascii(), real_indent, rootentry[real_indent-1], item));
+ }
+
+ lastchild[real_indent] = item;
+ rootentry[real_indent] = item;
+
+ if ( asIndex )
+ rootentry[real_indent]->setOpen(true);
+
+ // There are no 'titles' in index file
+ if ( add2treemap )
+ {
+ for ( unsigned int li = 0; li < urls.size(); li++ )
+ m_treeUrlMap[urls[li]] = item;
+ }
+ }
+ else
+ {
+ if ( !urls.isEmpty() )
+ qDebug ("CHMFile::ParseAndFillTopicsTree: <object> tag with url \"%s\" is parsed, but name is empty.", urls[0].ascii());
+ else
+ qDebug ("CHMFile::ParseAndFillTopicsTree: <object> tag is parsed, but both name and url are empty.");
+ }
+
+ name = QString::null;
+ urls.clear();
+ in_object = false;
+ imagenum = defaultimagenum;
+ }
+ }
+ else if ( tagword == "ul" ) // increase indent level
+ {
+ // Fix for buggy help files
+ if ( ++indent >= MAX_NEST_DEPTH )
+ qFatal("CHMFile::ParseAndFillTopicsTree: max nest depth (%d) is reached, error in help file", MAX_NEST_DEPTH);
+
+ lastchild[indent] = 0;
+ rootentry[indent] = 0;
+
+ // This intended to fix <ul><ul>, which was seen in some buggy chm files,
+ // and brokes rootentry[indent-1] check
+ int real_indent = indent - root_indent_offset;
+ if ( real_indent > 1
+ && rootentry[real_indent - 1] == 0
+ && rootentry[real_indent - 2] != 0 )
+ {
+ rootentry[real_indent - 1] = rootentry[real_indent - 2];
+ qWarning("Broken CHM index/content: tree autocorrection enabled.");
+ }
+
+ DEBUGPARSER(("<ul>: new indent is %d, last rootentry was %08X\n", indent - root_indent_offset, rootentry[indent-1]));
+ }
+ else if ( tagword == "/ul" ) // decrease indent level
+ {
+ if ( --indent < root_indent_offset )
+ indent = root_indent_offset;
+
+ rootentry[indent] = 0;
+ DEBUGPARSER(("</ul>: new intent is %d\n", indent - root_indent_offset));
+ }
+
+ pos = i;
+ }
+
+ return true;
+*/
+}
diff --git a/src/kchmtreeviewitem.h b/src/kchmtreeviewitem.h
new file mode 100644
index 0000000..7dd7011
--- /dev/null
+++ b/src/kchmtreeviewitem.h
@@ -0,0 +1,100 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef CTREEVIEWITEM_H
+#define CTREEVIEWITEM_H
+
+#include <qlistview.h>
+#include <qvaluevector.h>
+
+#include "libchmfile.h"
+
+/**
+@author Georgy Yunaev
+*/
+//! This is a list item used both in Index and Table Of Content trees
+class KCHMIndTocItem : public QListViewItem
+{
+ public:
+ KCHMIndTocItem( QListViewItem* parent, QListViewItem* after, QString name, QString aurl, int image);
+ KCHMIndTocItem( QListView* parent, QListViewItem* after, QString name, QString url, int image);
+
+ QString getUrl() const;
+ virtual void setOpen ( bool open );
+
+ private:
+ virtual void paintBranches ( QPainter * p, const QColorGroup & cg, int w, int y, int h );
+ virtual void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align );
+ virtual const QPixmap * pixmap( int i ) const;
+
+ QString url;
+ int image_number;
+};
+
+
+class KCMSearchTreeViewItem : public QListViewItem
+{
+ public:
+ KCMSearchTreeViewItem (QListView* parent, QString name, QString loc, QString url)
+ : QListViewItem (parent, name, loc)
+ {
+ this->url = url;
+ }
+
+ QString getUrl() const { return url; }
+
+ private:
+ QString url;
+};
+
+
+class KCHMSingleTreeViewItem : public QListViewItem
+{
+ public:
+ KCHMSingleTreeViewItem (QListView* parent, QString name, QString url)
+ : QListViewItem (parent, name)
+ {
+ this->url = url;
+ }
+
+ QString getUrl() const { return url; }
+
+ private:
+ QString url;
+};
+
+
+class KCHMBookmarkTreeViewItem : public QListViewItem
+{
+ public:
+ KCHMBookmarkTreeViewItem (QListView* parent, QString n, QString u, int s)
+ : QListViewItem (parent, n), url(u), name(n), scroll_y(s) { menuid = 0; }
+
+ QString url;
+ QString name;
+ int scroll_y;
+ int menuid;
+};
+
+
+void kchmFillListViewWithParsedData( QListView * list, const QValueVector< LCHMParsedEntry >& data, QMap<QString, KCHMIndTocItem*> * map );
+
+#endif
diff --git a/src/kchmviewwindow.cpp b/src/kchmviewwindow.cpp
new file mode 100644
index 0000000..3eea6ca
--- /dev/null
+++ b/src/kchmviewwindow.cpp
@@ -0,0 +1,314 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+// Do not use tr() or i18n() in this file - this class is not derived from QObject.
+
+#include <qregexp.h>
+#include <qstring.h>
+#include <qdir.h>
+
+#include "libchmfile.h"
+#include "libchmurlfactory.h"
+
+#include "kchmconfig.h"
+#include "kchmviewwindow.h"
+#include "kchmmainwindow.h"
+#include "kchmviewwindowmgr.h"
+#include "kchmnavtoolbar.h"
+
+
+KCHMViewWindow::KCHMViewWindow( QTabWidget * parent )
+{
+ invalidate();
+ m_contextMenu = 0;
+ m_contextMenuLink = 0;
+ m_historyMaxSize = 25;
+
+ m_parentTabWidget = parent;
+}
+
+KCHMViewWindow::~KCHMViewWindow()
+{
+}
+
+void KCHMViewWindow::invalidate( )
+{
+ m_base_url = "/";
+ m_openedPage = QString::null;
+ m_newTabLinkKeeper = QString::null;
+
+ m_historyCurrentPos = 0;
+ m_history.clear();
+
+ updateNavigationToolbar();
+}
+
+
+
+QString KCHMViewWindow::makeURLabsolute ( const QString & url, bool set_as_base )
+{
+ QString p1, p2, newurl = url;
+
+ if ( !LCHMUrlFactory::isRemoteURL (url, p1)
+ && !LCHMUrlFactory::isJavascriptURL (url)
+ && !LCHMUrlFactory::isNewChmURL (url, p1, p2) )
+ {
+ newurl = QDir::cleanDirPath (url);
+
+ // Normalize url, so it becomes absolute
+ if ( newurl[0] != '/' )
+ newurl = m_base_url + "/" + newurl;
+
+ newurl = QDir::cleanDirPath (newurl);
+
+ if ( set_as_base )
+ {
+ m_base_url = newurl;
+
+ // and set up new baseurl
+ int i = newurl.findRev('/');
+ if ( i != -1 )
+ m_base_url = QDir::cleanDirPath (newurl.left (i + 1));
+ }
+ }
+
+//qDebug ("KCHMViewWindow::makeURLabsolute (%s) -> (%s)", url.ascii(), newurl.ascii());
+ return newurl;
+}
+
+bool KCHMViewWindow::openUrl ( const QString& origurl )
+{
+ QString chmfile, page, newurl = origurl;
+
+ if ( !origurl )
+ return true;
+
+ // URL could be a complete ms-its link. The file should be already loaded (for QTextBrowser),
+ // or will be loaded (for kio slave). We care only about the path component.
+ if ( LCHMUrlFactory::isNewChmURL( newurl, chmfile, page ) )
+ {
+ // If a new chm file is opened here, and we do not use KCHMLPart, we better abort
+ if ( chmfile != ::mainWindow->getOpenedFileName() && appConfig.m_kdeUseQTextBrowser )
+ qFatal("KCHMViewWindow::openUrl(): opened new chm file %s while current is %s",
+ chmfile.ascii(), ::mainWindow->getOpenedFileName().ascii() );
+
+ // It is OK to have a new file in chm for KHTMLPart
+ newurl = page;
+ }
+
+ makeURLabsolute (newurl);
+ handleStartPageAsImage( newurl );
+
+ if ( openPage (newurl) )
+ {
+ m_newTabLinkKeeper = QString::null;
+ m_openedPage = newurl;
+
+ mainWindow->viewWindowMgr()->setTabName( this );
+ return true;
+ }
+
+ return false;
+}
+
+void KCHMViewWindow::handleStartPageAsImage( QString & link )
+{
+ // Handle pics
+ if ( link.endsWith( ".jpg", false )
+ || link.endsWith( ".jpeg", false )
+ || link.endsWith( ".gif", false )
+ || link.endsWith( ".png", false )
+ || link.endsWith( ".bmp", false ) )
+ link += LCHMUrlFactory::getInternalUriExtension();
+}
+
+
+KQPopupMenu * KCHMViewWindow::createStandardContextMenu( QWidget * parent )
+{
+ KQPopupMenu * contextMenu = new KQPopupMenu( parent );
+
+ contextMenu->insertItem ( "&Copy", ::mainWindow, SLOT(slotBrowserCopy()) );
+ contextMenu->insertItem ( "&Select all", ::mainWindow, SLOT(slotBrowserSelectAll()) );
+
+ return contextMenu;
+}
+
+
+KQPopupMenu * KCHMViewWindow::getContextMenu( const QString & link, QWidget * parent )
+{
+ if ( link.isNull() )
+ {
+ // standard context menu
+ if ( !m_contextMenu )
+ m_contextMenu = createStandardContextMenu( parent );
+
+ return m_contextMenu;
+ }
+ else
+ {
+ // Open in New Tab context menu
+ // standard context menu
+ if ( !m_contextMenuLink )
+ {
+ m_contextMenuLink = createStandardContextMenu( parent );
+ m_contextMenuLink->insertSeparator();
+
+ m_contextMenuLink->insertItem ( "&Open this link in a new tab", ::mainWindow, SLOT(slotOpenPageInNewTab()), QKeySequence("Shift+Enter") );
+
+ m_contextMenuLink->insertItem ( "&Open this link in a new background tab", ::mainWindow, SLOT(slotOpenPageInNewBackgroundTab()), QKeySequence("Ctrl+Enter") );
+ }
+
+ setTabKeeper( link );
+ return m_contextMenuLink;
+ }
+}
+
+QString KCHMViewWindow::getTitle() const
+{
+ QString title = ::mainWindow->chmFile()->getTopicByUrl( m_openedPage );
+
+ if ( title.isEmpty() )
+ title = m_openedPage;
+
+ return title;
+}
+
+
+void KCHMViewWindow::navigateForward()
+{
+ if ( m_historyCurrentPos < m_history.size() )
+ {
+ m_historyCurrentPos++;
+ ::mainWindow->openPage( m_history[m_historyCurrentPos].getUrl() );
+ setScrollbarPosition( m_history[m_historyCurrentPos].getScrollPosition() );
+
+ // By default navigation starts with empty array, and a new entry is added when
+ // you change the current page (or it may not be added). So to have the whole system
+ // worked, the m_historyCurrentPos should never be m_history.size() - 1, it should be
+ // either greater or lesser.
+ //
+ // This is a dirty hack - but the whole navigation system now looks to me like
+ // it was written by some drunk monkey - which is probably not far from The Real Truth.
+ // Shame on me - Tim.
+ if ( m_historyCurrentPos == (m_history.size() - 1) )
+ m_historyCurrentPos++;
+ }
+
+ updateNavigationToolbar();
+}
+
+void KCHMViewWindow::navigateBack( )
+{
+ if ( m_historyCurrentPos > 0 )
+ {
+ // If we're on top of list, and pressing Back, the last page is still
+ // not in list - so add it, if it is not still here
+ if ( m_historyCurrentPos == m_history.size() )
+ {
+ if ( m_history[m_historyCurrentPos-1].getUrl() != m_openedPage )
+ m_history.push_back( KCHMUrlHistory( m_openedPage, getScrollbarPosition() ) );
+ else
+ {
+ // part 2 of the navigation hack - see navigateForward() comment
+ m_history[m_historyCurrentPos-1].setScrollPosition( getScrollbarPosition() );
+ m_historyCurrentPos--;
+ }
+ }
+
+ m_historyCurrentPos--;
+
+ ::mainWindow->openPage( m_history[m_historyCurrentPos].getUrl() );
+ setScrollbarPosition( m_history[m_historyCurrentPos].getScrollPosition() );
+ }
+
+ updateNavigationToolbar();
+}
+
+void KCHMViewWindow::navigateHome( )
+{
+ ::mainWindow->openPage( ::mainWindow->chmFile()->homeUrl() );
+}
+
+void KCHMViewWindow::addNavigationHistory( const QString & url, int scrollpos )
+{
+ // shred the 'forward' history
+ if ( m_historyCurrentPos < m_history.size() )
+ m_history.erase( m_history.at( m_historyCurrentPos ), m_history.end());
+
+ // do not grow the history if already max size
+ if ( m_history.size() >= m_historyMaxSize )
+ m_history.pop_front();
+
+ m_history.push_back( KCHMUrlHistory( url, scrollpos ) );
+ m_historyCurrentPos = m_history.size();
+
+ updateNavigationToolbar();
+}
+
+void KCHMViewWindow::updateNavigationToolbar( )
+{
+ // Dump navigation for debugging
+#if 0
+ qDebug("\nNavigation dump (%d entries, current pos %d)", m_history.size(), m_historyCurrentPos );
+ for ( unsigned int i = 0; i < m_history.size(); i++ )
+ qDebug("[%02d]: %s [%d]", i, m_history[i].getUrl().ascii(), m_history[i].getScrollPosition());
+#endif
+
+ if ( mainWindow )
+ {
+ mainWindow->navigationToolbar()->updateIconStatus(
+ m_historyCurrentPos > 0,
+ m_historyCurrentPos < (m_history.size() - 1) );
+ }
+}
+
+KQPopupMenu * KCHMViewWindow::createListItemContextMenu( QWidget * w )
+{
+ KQPopupMenu * contextMenu = new KQPopupMenu( w );
+
+ contextMenu->insertItem ( "&Open this link in a new tab",
+ ::mainWindow,
+ SLOT( slotOpenPageInNewTab() ),
+ QKeySequence( "Shift+Enter" ) );
+
+ contextMenu->insertItem ( "&Open this link in a new background tab",
+ ::mainWindow,
+ SLOT( slotOpenPageInNewBackgroundTab() ),
+ QKeySequence( "Ctrl+Enter" ) );
+
+ return contextMenu;
+}
+
+void KCHMViewWindow::setTabKeeper( const QString & link )
+{
+ // If we clicked on relative link, make sure we convert it to absolute right now,
+ // because later we will not have access to this view window variables
+ m_newTabLinkKeeper = link;
+ if ( m_newTabLinkKeeper[0] == '#' && !m_openedPage.isEmpty() )
+ {
+ // Clean up opened page URL
+ int pos = m_openedPage.find ('#');
+ QString fixedpath = pos == -1 ? m_openedPage : m_openedPage.left (pos);
+ m_newTabLinkKeeper = fixedpath + m_newTabLinkKeeper;
+ }
+
+ m_newTabLinkKeeper = makeURLabsolute( m_newTabLinkKeeper, false );
+}
diff --git a/src/kchmviewwindow.h b/src/kchmviewwindow.h
new file mode 100644
index 0000000..a114eac
--- /dev/null
+++ b/src/kchmviewwindow.h
@@ -0,0 +1,156 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMVIEWWINDOW_H
+#define KCHMVIEWWINDOW_H
+
+#include "forwarddeclarations.h"
+#include "kde-qt.h"
+
+/**
+@author Georgy Yunaev
+*/
+class KCHMViewWindow
+{
+public:
+ KCHMViewWindow ( QTabWidget * parent );
+ virtual ~KCHMViewWindow();
+
+ //! Open a page from current chm archive
+ bool openUrl (const QString& url );
+
+ QString getBaseUrl() const { return m_base_url; }
+ QString getOpenedPage() const { return m_openedPage; }
+ QString getNewTabLink() const { return m_newTabLinkKeeper; }
+ QString makeURLabsolute ( const QString &url, bool set_as_base = true );
+
+public:
+ // virtual members, which should be implemented by viewers
+ //! Invalidate current view, doing all the cleanups etc.
+ virtual void invalidate();
+
+ //! Popups the print dialog, and prints the current page on the printer.
+ virtual bool printCurrentPage() = 0;
+
+ //! Continues the find-in-page search forward or backward
+ virtual void searchWord( const QString & word, bool forward = true, bool casesensitive = false ) = 0;
+
+ //! Return current ZoomFactor.
+ virtual int getZoomFactor() const = 0;
+
+ //! Sets ZoomFactor. The value returned by getZoomFactor(), given to this function, should give the same result.
+ virtual void setZoomFactor (int zoom) = 0;
+
+ //! Relatively changes ZoomFactor. Most common values are -1 and 1.
+ virtual void addZoomFactor (int value) = 0;
+
+ virtual QObject * getQObject() = 0;
+ virtual QWidget * getQWidget() = 0;
+
+ /*!
+ * Return current scrollbar position in view window. Saved on program exit.
+ * There is no restriction on returned value, except that giving this value to
+ * setScrollbarPosition() should move the scrollbar in the same position.
+ */
+ virtual int getScrollbarPosition() = 0;
+
+ //! Sets the scrollbar position.
+ virtual void setScrollbarPosition(int pos) = 0;
+
+ //! Select the content of the whole page
+ virtual void clipSelectAll() = 0;
+
+ //! Copies the selected content to the clipboard
+ virtual void clipCopy() = 0;
+
+ //! Returns the window title
+ virtual QString getTitle() const;
+
+ //! Navigation stuff
+ virtual void navigateBack();
+ virtual void navigateHome();
+ virtual void navigateForward();
+
+ //! Navigation auxiliary stuff
+ virtual void setHistoryMaxSize (unsigned int size) { m_historyMaxSize = size; }
+ virtual void addNavigationHistory( const QString & url, int scrollpos );
+ virtual void updateNavigationToolbar();
+
+ /*!
+ * Used by contents window (and probably by other windows in future) to show
+ * context menu in listviews. Put here to futher reuse code in index and search windows.
+ */
+ KQPopupMenu * createListItemContextMenu ( QWidget * w );
+ void setTabKeeper ( const QString& link );
+
+
+protected: /* signals */
+ /*!
+ * Emitted when the user clicked on the link, before the page changed.
+ * If linkClicked() return false, the current page should NOT change.
+ * Otherwise it should be changed to the new link value.
+ */
+ virtual void signalLinkClicked ( const QString & newlink, bool& follow_link ) = 0;
+
+protected:
+ virtual bool openPage ( const QString& url ) = 0;
+ virtual void handleStartPageAsImage( QString& link );
+
+ KQPopupMenu * getContextMenu( const QString& link, QWidget * parent );
+ KQPopupMenu * createStandardContextMenu( QWidget * parent );
+
+ //! History
+ class KCHMUrlHistory
+ {
+ public:
+ KCHMUrlHistory() { scrollbarpos = 0; }
+ KCHMUrlHistory( const QString& _url, int _scrollbarpos )
+ : url(_url), scrollbarpos(_scrollbarpos) {};
+
+ const QString& getUrl() const { return url; }
+ int getScrollPosition() const { return scrollbarpos; }
+ void setScrollPosition( int pos ) { scrollbarpos = pos; }
+
+ private:
+ QString url;
+ int scrollbarpos;
+ };
+
+ unsigned int m_historyMaxSize;
+ unsigned int m_historyCurrentPos;
+
+ QValueList<KCHMUrlHistory> m_history;
+
+ KQPopupMenu * m_contextMenu;
+ KQPopupMenu * m_contextMenuLink;
+
+ // This member keeps a "open new tab" link between getContextMenu() call and appropriate
+ // slot call
+ QString m_newTabLinkKeeper;
+
+ QString m_openedPage;
+ QString m_lastOpenedPage;
+ QString m_base_url;
+
+ QTabWidget * m_parentTabWidget;
+};
+
+#endif
diff --git a/src/kchmviewwindow_qtextbrowser.cpp b/src/kchmviewwindow_qtextbrowser.cpp
new file mode 100644
index 0000000..1ab7bf6
--- /dev/null
+++ b/src/kchmviewwindow_qtextbrowser.cpp
@@ -0,0 +1,270 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <qprinter.h>
+#include <qpainter.h>
+#include <qsimplerichtext.h>
+#include <qpaintdevicemetrics.h>
+
+#include "kde-qt.h"
+#include "kchmmainwindow.h"
+#include "kchmviewwindow_qtextbrowser.h"
+
+/*
+ * If defined, all the data viewed is kept in source factory. It increases the response time
+ * when a user opens the page he has already seen, in cost of everything which has been opened
+ * is stored in memory, increasing memory usage.
+ *
+ * If not defined, on any page change the source factory cleans up, saving the memory, but
+ * increasing the page loading time in case the page has the same images, or the page is opened
+ * second time.
+ */
+#define KEEP_ALL_OPENED_DATA_IN_SOURCE_FACTORY
+
+KCHMViewWindow_QTextBrowser::KCHMViewWindow_QTextBrowser( QTabWidget * parent )
+ : QTextBrowser ( parent ), KCHMViewWindow ( parent )
+{
+ m_zoomfactor = 0;
+ m_sourcefactory = 0;
+ invalidate();
+
+ setTextFormat ( Qt::RichText );
+ connect( this, SIGNAL( linkClicked (const QString &) ), this, SLOT( slotLinkClicked(const QString &) ) );
+}
+
+
+KCHMViewWindow_QTextBrowser::~KCHMViewWindow_QTextBrowser()
+{
+ delete m_sourcefactory;
+}
+
+bool KCHMViewWindow_QTextBrowser::openPage (const QString& url)
+{
+ // If we're using a memory saving scheme, we destroy MimeSourceFactory (including all the stored data)
+ // when opening a new page. It saves some memory, but spends more time while looking for already loaded
+ // images and HTML pages
+#if !defined (KEEP_ALL_OPENED_DATA_IN_SOURCE_FACTORY)
+ delete m_sourcefactory;
+ m_sourcefactory = new KCHMSourceFactory;
+ setMimeSourceFactory (m_sourcefactory);
+#endif
+
+ setSource (url);
+ return true;
+}
+
+void KCHMViewWindow_QTextBrowser::setSource ( const QString & name )
+{
+ if ( m_allowSourceChange )
+ {
+ // Do URI decoding, qtextbrowser does stupid job.
+ QString fixedname = decodeUrl( name );
+ QTextBrowser::setSource (fixedname);
+ }
+ else
+ m_allowSourceChange = true;
+}
+
+void KCHMViewWindow_QTextBrowser::setZoomFactor( int zoom )
+{
+ m_zoomfactor = zoom;
+
+ if ( zoom < 0 )
+ QTextBrowser::zoomOut( -zoom );
+ else if ( zoom > 0 )
+ QTextBrowser::zoomIn( zoom);
+}
+
+void KCHMViewWindow_QTextBrowser::invalidate( )
+{
+ delete m_sourcefactory;
+ m_sourcefactory = new KCHMSourceFactory (this);
+ setMimeSourceFactory (m_sourcefactory);
+ m_zoomfactor = 0;
+ m_allowSourceChange = true;
+ m_searchLastIndex = 0;
+ m_searchLastParagraph = 0;
+ m_searchText = QString::null;
+ reload();
+
+ KCHMViewWindow::invalidate( );
+}
+
+int KCHMViewWindow_QTextBrowser::getScrollbarPosition( )
+{
+ return contentsY ();
+}
+
+void KCHMViewWindow_QTextBrowser::setScrollbarPosition( int pos )
+{
+ setContentsPos (0, pos);
+}
+
+void KCHMViewWindow_QTextBrowser::addZoomFactor( int value )
+{
+ setZoomFactor( value);
+}
+
+void KCHMViewWindow_QTextBrowser::slotLinkClicked( const QString & newlink )
+{
+ emit signalLinkClicked (newlink, m_allowSourceChange);
+}
+
+
+bool KCHMViewWindow_QTextBrowser::printCurrentPage( )
+{
+#if !defined (QT_NO_PRINTER)
+ QPrinter printer( QPrinter::HighResolution );
+ printer.setFullPage(TRUE);
+
+ if ( printer.setup( this ) )
+ {
+ QPainter p( &printer );
+
+ if( !p.isActive() ) // starting printing failed
+ return false;
+
+ QPaintDeviceMetrics metrics(p.device());
+ int dpiy = metrics.logicalDpiY();
+ int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins
+ QRect body( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin );
+ QSimpleRichText richText( text(),
+ QFont(),
+ context(),
+ styleSheet(),
+ mimeSourceFactory(),
+ body.height() );
+ richText.setWidth( &p, body.width() );
+ QRect view( body );
+
+ int page = 1;
+
+ do
+ {
+ richText.draw( &p, body.left(), body.top(), view, colorGroup() );
+ view.moveBy( 0, body.height() );
+ p.translate( 0 , -body.height() );
+ p.drawText( view.right() - p.fontMetrics().width( QString::number(page) ),
+ view.bottom() + p.fontMetrics().ascent() + 5, QString::number(page) );
+
+ if ( view.top() >= richText.height() )
+ break;
+
+ QString msg = i18n( "Printing (page %1)...") .arg(page);
+ ::mainWindow->showInStatusBar( msg );
+
+ printer.newPage();
+ page++;
+ }
+ while (TRUE);
+
+ ::mainWindow->showInStatusBar( i18n( "Printing completed") );
+ return true;
+ }
+
+ ::mainWindow->showInStatusBar( i18n( "Printing aborted") );
+ return false;
+
+#else /* QT_NO_PRINTER */
+
+ QMessageBox::warning( this,
+ i18n( "%1 - could not print") . arg(APP_NAME),
+ i18n( "Could not print.\nYour Qt library has been compiled without printing support");
+ return false;
+
+#endif /* QT_NO_PRINTER */
+}
+
+
+void KCHMViewWindow_QTextBrowser::searchWord( const QString & word, bool forward, bool )
+{
+ if ( m_searchText == word )
+ {
+ if ( forward && (m_searchLastIndex || m_searchLastParagraph) )
+ m_searchLastIndex += m_searchText.length();
+ }
+ else
+ {
+ m_searchLastParagraph = m_searchLastIndex = 0;
+ m_searchText = word;
+ }
+
+ if ( find (m_searchText, false, false, forward, &m_searchLastParagraph, &m_searchLastIndex) )
+ ::mainWindow->showInStatusBar( i18n( "Search failed") );
+}
+
+void KCHMViewWindow_QTextBrowser::clipSelectAll( )
+{
+ selectAll (TRUE);
+}
+
+void KCHMViewWindow_QTextBrowser::clipCopy( )
+{
+ copy ();
+}
+
+
+// Shamelessly stolen from Qt
+QString KCHMViewWindow_QTextBrowser::decodeUrl( const QString &input )
+{
+ QString temp;
+
+ int i = 0;
+ int len = input.length();
+ int a, b;
+ QChar c;
+ while (i < len)
+ {
+ c = input[i];
+ if (c == '%' && i + 2 < len)
+ {
+ a = input[++i];
+ b = input[++i];
+
+ if (a >= '0' && a <= '9') a -= '0';
+ else if (a >= 'a' && a <= 'f') a = a - 'a' + 10;
+ else if (a >= 'A' && a <= 'F') a = a - 'A' + 10;
+
+ if (b >= '0' && b <= '9') b -= '0';
+ else if (b >= 'a' && b <= 'f') b = b - 'a' + 10;
+ else if (b >= 'A' && b <= 'F') b = b - 'A' + 10;
+
+ temp.append( (QChar)((a << 4) | b ) );
+ }
+ else
+ {
+ temp.append( c );
+ }
+
+ ++i;
+ }
+
+ return temp;
+}
+
+QPopupMenu * KCHMViewWindow_QTextBrowser::createPopupMenu( const QPoint & pos )
+{
+ KQPopupMenu * menu = getContextMenu( anchorAt( pos ), this );
+ menu->exec( mapToGlobal( contentsToViewport( pos ) ) );
+ return 0;
+}
+
+#include "kchmviewwindow_qtextbrowser.moc"
diff --git a/src/kchmviewwindow_qtextbrowser.h b/src/kchmviewwindow_qtextbrowser.h
new file mode 100644
index 0000000..662bd57
--- /dev/null
+++ b/src/kchmviewwindow_qtextbrowser.h
@@ -0,0 +1,107 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMVIEWWINDOW_QTEXTBROWSER_H
+#define KCHMVIEWWINDOW_QTEXTBROWSER_H
+
+#include "kde-qt.h"
+
+#include "kchmviewwindow.h"
+#include "kchmsourcefactory.h"
+
+/**
+@author Georgy Yunaev
+*/
+class KCHMViewWindow_QTextBrowser : public QTextBrowser, public KCHMViewWindow
+{
+Q_OBJECT
+public:
+ KCHMViewWindow_QTextBrowser( QTabWidget * parent );
+ ~KCHMViewWindow_QTextBrowser();
+
+ //! Open a page from current chm archive
+ virtual bool openPage (const QString& url);
+
+ //! Invalidate current view, doing all the cleanups etc.
+ virtual void invalidate();
+
+ //! Return current ZoomFactor.
+ virtual int getZoomFactor() const { return m_zoomfactor; }
+
+ //! Sets ZoomFactor. The value returned by getZoomFactor(), given to this function, should give the same result.
+ virtual void setZoomFactor (int zoom);
+
+ //! Relatively changes ZoomFactor. Most common values are -1 and 1.
+ virtual void addZoomFactor (int value);
+
+ //! Popups the print dialog, and prints the current page on the printer.
+ virtual bool printCurrentPage();
+
+ //! Initiates the find-in-page search, if succeed, cursor moved to the first entry
+ virtual void searchWord( const QString & word, bool forward = true, bool casesensitive = false );
+
+ //! Select the content of the whole page
+ virtual void clipSelectAll();
+
+ //! Copies the selected content to the clipboard
+ virtual void clipCopy();
+
+ /*!
+ * Return current scrollbar position in view window. Saved on program exit.
+ * There is no restriction on returned value, except that giving this value to
+ * setScrollbarPosition() should move the scrollbar in the same position.
+ */
+ virtual int getScrollbarPosition();
+
+ //! Sets the scrollbar position.
+ virtual void setScrollbarPosition(int pos);
+
+ virtual QObject * getQObject() { return this; }
+ virtual QWidget * getQWidget() { return this; }
+
+ static QString decodeUrl( const QString &url );
+
+signals:
+ /*!
+ * Emitted when the user clicked on the link, before the page changed.
+ * If signalLinkClicked() sets follow_link to false, the current page should NOT change.
+ * Otherwise it should be changed to the new link value.
+ */
+ void signalLinkClicked ( const QString & newlink, bool& follow_link );
+
+private slots:
+ virtual void slotLinkClicked (const QString & newlink);
+
+private:
+ QPopupMenu * createPopupMenu ( const QPoint & pos );
+ void setSource ( const QString & name );
+
+ int m_zoomfactor;
+ bool m_allowSourceChange;
+ int m_searchLastIndex;
+ int m_searchLastParagraph;
+ QString m_searchText;
+
+ KCHMSourceFactory * m_sourcefactory;
+};
+
+
+#endif /* KCHMVIEWWINDOW_QTEXTBROWSER_H */
diff --git a/src/kchmviewwindowmgr.cpp b/src/kchmviewwindowmgr.cpp
new file mode 100644
index 0000000..dd6a984
--- /dev/null
+++ b/src/kchmviewwindowmgr.cpp
@@ -0,0 +1,344 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <qaccel.h>
+
+#include "kchmconfig.h"
+#include "kchmmainwindow.h"
+#include "kchmviewwindow.h"
+#include "kchmviewwindowmgr.h"
+#include "iconstorage.h"
+
+#include "kchmviewwindow_qtextbrowser.h"
+
+#if defined (USE_KDE)
+ #include "kde/kchmviewwindow_khtmlpart.h"
+#endif
+
+
+KCHMViewWindowMgr::KCHMViewWindowMgr( QWidget *parent )
+ : QTabWidget( parent ) //QTabWidget
+{
+ m_MenuWindow = 0;
+
+ // on current tab changed
+ connect( this, SIGNAL( currentChanged(QWidget *) ), this, SLOT( onTabChanged(QWidget *) ) );
+
+ // Create an iconset for the button
+ QIconSet iset( *gIconStorage.getCloseWindowIcon() );
+
+ // Create a pushbutton
+ m_closeButton = new QPushButton( iset, QString::null, this );
+ m_closeButton->setFlat( true );
+ m_closeButton->setEnabled( false );
+ connect( m_closeButton, SIGNAL( clicked() ), this, SLOT( closeCurrentWindow() ) );
+
+ setCornerWidget( m_closeButton, TopRight);
+}
+
+KCHMViewWindowMgr::~KCHMViewWindowMgr( )
+{
+}
+
+void KCHMViewWindowMgr::createMenu( KCHMMainWindow * parent )
+{
+ // Create the approptiate menu entries in 'View' main menu
+ m_MenuWindow = new KQPopupMenu( parent );
+ parent->menuBar()->insertItem( i18n( "&Window"), m_MenuWindow );
+
+ m_menuIdClose = m_MenuWindow->insertItem( i18n( "&Close"), this, SLOT( closeCurrentWindow()), CTRL+Key_W );
+ m_MenuWindow->insertSeparator();
+
+ //connect( m_MenuWindow, SIGNAL( activated(int) ), this, SLOT ( onCloseWindow(int) ));
+ connect( m_MenuWindow, SIGNAL( activated(int) ), this, SLOT ( onActiveWindow(int) ));
+}
+
+void KCHMViewWindowMgr::invalidate()
+{
+ deleteAllWindows();
+ addNewTab( true );
+}
+
+
+KCHMViewWindow * KCHMViewWindowMgr::current()
+{
+ QWidget * w = currentPage();
+ WindowsIterator it;
+
+ if ( !w || (it = m_Windows.find( w )) == m_Windows.end() )
+ qFatal( "KCHMViewWindowMgr::current called without any windows!" );
+
+ return it.data().window;
+}
+
+KCHMViewWindow * KCHMViewWindowMgr::addNewTab( bool set_active )
+{
+ KCHMViewWindow * viewvnd;
+
+#if defined (USE_KDE)
+ if ( !appConfig.m_kdeUseQTextBrowser )
+ viewvnd = new KCHMViewWindow_KHTMLPart( this );
+ else
+#endif
+ viewvnd = new KCHMViewWindow_QTextBrowser( this );
+
+ QWidget * widget = viewvnd->getQWidget();
+ m_Windows[widget].window = viewvnd;
+ m_Windows[widget].menuitem = 0;
+ m_Windows[widget].widget = widget;
+
+ addTab( widget, "" );
+
+ Q_ASSERT( m_Windows.size() == (unsigned int) count() );
+
+ // Set active if it is the first tab
+ if ( set_active || m_Windows.size() == 1 )
+ showPage( widget );
+
+ // Handle clicking on link in browser window
+ connect( viewvnd->getQObject(), SIGNAL( signalLinkClicked (const QString &, bool &) ), ::mainWindow, SLOT( slotLinkClicked(const QString &, bool &) ) );
+
+ return viewvnd;
+}
+
+void KCHMViewWindowMgr::deleteAllWindows( )
+{
+ // No it++ - we removing the window by every closeWindow call
+ while ( m_Windows.begin() != m_Windows.end() )
+ closeWindow( m_Windows.begin().data() );
+}
+
+void KCHMViewWindowMgr::setTabName( KCHMViewWindow * window )
+{
+ WindowsIterator it = m_Windows.find( window->getQWidget() );
+
+ if ( it == m_Windows.end() )
+ qFatal( "KCHMViewWindowMgr::setTabName called with unknown window!" );
+
+ QString title = window->getTitle();
+
+ // Trim too long string
+ if ( title.length() > 25 )
+ title = title.left( 22 ) + "...";
+
+ setTabLabel( window->getQWidget(), title );
+
+ if ( it.data().menuitem == 0 )
+ {
+ // find the empty menuid
+ int menuid;
+
+ if ( !m_idSlot.empty() )
+ {
+ menuid = *m_idSlot.begin();
+ m_idSlot.erase( m_idSlot.begin() );
+ }
+ else
+ menuid = m_Windows.size();
+
+ QString menutitle = "&" + QString::number(menuid) + " " + title;
+ it.data().menuitem = menuid;
+ m_MenuWindow->insertItem(menutitle, menuid);
+ updateTabAccel();
+ }
+ else
+ {
+ QString menutitle = "&" + QString::number(it.data().menuitem) + " " + title;
+ m_MenuWindow->changeItem( it.data().menuitem, menutitle );
+ }
+
+ updateCloseButtons();
+}
+
+void KCHMViewWindowMgr::closeCurrentWindow( )
+{
+ // Do not allow to close the last window
+ if ( m_Windows.size() == 1 )
+ return;
+
+ QWidget * w = currentPage();
+ WindowsIterator it;
+
+ if ( !w || (it = m_Windows.find( w )) == m_Windows.end() )
+ qFatal( "KCHMViewWindowMgr::closeCurrentWindow called without any windows!" );
+
+ closeWindow( it.data() );
+}
+
+void KCHMViewWindowMgr::closeWindow( const tab_window_t & tab )
+{
+ WindowsIterator it = m_Windows.find( tab.widget );
+
+ if ( it == m_Windows.end() )
+ qFatal( "KCHMViewWindowMgr::closeWindow called with unknown widget!" );
+
+ if ( tab.menuitem != 0 )
+ {
+ m_MenuWindow->removeItem( tab.menuitem );
+ m_idSlot.push_back( tab.menuitem );
+ }
+
+ removePage( tab.widget );
+ delete tab.window;
+
+ m_Windows.remove( it );
+ updateCloseButtons();
+ updateTabAccel();
+}
+
+void KCHMViewWindowMgr::onCloseWindow( int id )
+{
+ for ( WindowsIterator it = m_Windows.begin(); it != m_Windows.end(); it++ )
+ {
+ if ( it.data().menuitem != id )
+ continue;
+
+ closeWindow( it.data() );
+ break;
+ }
+}
+
+
+void KCHMViewWindowMgr::onActiveWindow(int id)
+{
+ for (WindowsIterator it = m_Windows.begin(); it != m_Windows.end(); ++it)
+ {
+ if ( it.data().menuitem != id )
+ continue;
+
+ QWidget *widget = it.data().widget;
+ showPage(widget);
+ break;
+ }
+}
+
+
+void KCHMViewWindowMgr::restoreSettings( const KCHMSettings::viewindow_saved_settings_t & settings )
+{
+ // Destroy pre-created tab
+ closeWindow( m_Windows.begin().data() );
+
+ for ( unsigned int i = 0; i < settings.size(); i++ )
+ {
+ KCHMViewWindow * window = addNewTab( false );
+ window->openUrl( settings[i].url ); // will call setTabName()
+ window->setScrollbarPosition( settings[i].scroll_y );
+ window->setZoomFactor( settings[i].zoom );
+ }
+}
+
+
+void KCHMViewWindowMgr::saveSettings( KCHMSettings::viewindow_saved_settings_t & settings )
+{
+ settings.clear();
+
+ for ( int i = 0; i < count(); i++ )
+ {
+ QWidget * p = page( i );
+ WindowsIterator it = m_Windows.find( p );
+
+ if ( it == m_Windows.end() )
+ qFatal( "KCHMViewWindowMgr::saveSettings: could not find widget!" );
+
+ settings.push_back(
+ KCHMSettings::SavedViewWindow(
+ it.data().window->getOpenedPage(),
+ it.data().window->getScrollbarPosition(),
+ it.data().window->getZoomFactor()) );
+ }
+}
+
+void KCHMViewWindowMgr::updateCloseButtons( )
+{
+ m_MenuWindow->setItemEnabled( m_menuIdClose, m_Windows.size() > 1 );
+ m_closeButton->setEnabled( m_Windows.size() > 1 );
+}
+
+void KCHMViewWindowMgr::onTabChanged( QWidget * newtab )
+{
+ WindowsIterator it = m_Windows.find( newtab );
+
+ if ( it == m_Windows.end() )
+ qFatal( "KCHMViewWindowMgr::onTabChanged called with unknown widget!" );
+
+ it.data().window->updateNavigationToolbar();
+ mainWindow->slotBrowserChanged( it.data().window );
+}
+
+
+void KCHMViewWindowMgr::updateTabAccel()
+{
+ WindowsIterator it;
+ for ( it = m_Windows.begin(); it != m_Windows.end(); ++it )
+ {
+ int menuid = it.data().menuitem;
+ int index = indexOf(it.data().widget);
+
+ if ( index <= 9 )
+ {
+ if ( index < 9 )
+ index++;
+ else
+ index = 0;
+
+ m_MenuWindow->setAccel(ALT + key(index), menuid);
+ }
+ }
+}
+
+QKeySequence KCHMViewWindowMgr::key(int i)
+{
+ switch (i)
+ {
+ case 0:
+ return Key_0;
+
+ case 1:
+ return Key_1;
+
+ case 2:
+ return Key_2;
+
+ case 3:
+ return Key_3;
+
+ case 4:
+ return Key_4;
+
+ case 5:
+ return Key_5;
+
+ case 6:
+ return Key_6;
+
+ case 7:
+ return Key_7;
+
+ case 8:
+ return Key_8;
+
+ default:
+ return Key_9;
+ }
+}
+
+
+#include "kchmviewwindowmgr.moc"
diff --git a/src/kchmviewwindowmgr.h b/src/kchmviewwindowmgr.h
new file mode 100644
index 0000000..2b07544
--- /dev/null
+++ b/src/kchmviewwindowmgr.h
@@ -0,0 +1,90 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef INCLUDE_KCHMVIEWWINDOWMGR_H
+#define INCLUDE_KCHMVIEWWINDOWMGR_H
+
+#include "kde-qt.h"
+#include "forwarddeclarations.h"
+#include "kchmsettings.h"
+
+#include <qvaluevector.h>
+
+class KCHMViewWindowMgr : public QTabWidget
+{
+ Q_OBJECT
+ public:
+ KCHMViewWindowMgr( QWidget *parent = 0 );
+ ~KCHMViewWindowMgr( );
+
+ // Returns a handle to a currently viewed window.
+ // Guaranteeed to return a valid handle, or aborts.
+ KCHMViewWindow * current();
+
+ // Adds a new tab, creating a new browser window
+ KCHMViewWindow * addNewTab( bool set_active );
+
+ // Sets the tab name and updates Windows menu
+ void setTabName( KCHMViewWindow* window );
+
+ void invalidate();
+
+ // Creates a Window menu
+ void createMenu( KCHMMainWindow * parent );
+
+ // Saves and restores current settings between sessions
+ void restoreSettings( const KCHMSettings::viewindow_saved_settings_t& settings );
+ void saveSettings( KCHMSettings::viewindow_saved_settings_t& settings );
+
+ public slots:
+ void closeCurrentWindow();
+
+ protected slots:
+ void onTabChanged( QWidget * newtab );
+ void onCloseWindow( int id );
+ void onActiveWindow( int id );
+ void updateCloseButtons();
+
+ private:
+ typedef struct
+ {
+ QWidget * widget;
+ KCHMViewWindow * window;
+ int menuitem;
+ } tab_window_t;
+
+ void closeWindow( const tab_window_t& tab );
+ void deleteAllWindows();
+ void updateTabAccel();
+ QKeySequence key(int);
+
+ QMap<QWidget*,tab_window_t> m_Windows;
+ typedef QMap<QWidget*,tab_window_t>::iterator WindowsIterator;
+
+ QValueList<int> m_idSlot;
+ typedef QValueList<int>::iterator IdIterator;
+
+ QPushButton * m_closeButton;
+ KQPopupMenu * m_MenuWindow;
+ int m_menuIdClose;
+};
+
+#endif /* INCLUDE_KCHMVIEWWINDOWMGR_H */
diff --git a/src/kde-qt.cpp b/src/kde-qt.cpp
new file mode 100644
index 0000000..6c3929f
--- /dev/null
+++ b/src/kde-qt.cpp
@@ -0,0 +1,52 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "kde-qt.h"
+
+#if defined (USE_KDE)
+KQListView::KQListView( QWidget * parent, const char * name, int )
+ : KListView (parent, name)
+#else
+KQListView::KQListView( QWidget * parent, const char * name, int f )
+ : QListView (parent, name, f)
+#endif
+{
+}
+
+#if defined (USE_KDE)
+KQProgressModalDialog::KQProgressModalDialog ( const QString & captionText, const QString & labelText, const QString & cancelButtonText, int totalSteps, QWidget * creator )
+ : KProgressDialog( creator, 0, captionText, labelText, true )
+{
+ setAllowCancel( true );
+ showCancelButton( true );
+ setAutoClose( true );
+ setButtonText( cancelButtonText );
+ setTotalSteps( totalSteps );
+ setMinimumDuration( 1 );
+}
+#else
+KQProgressModalDialog::KQProgressModalDialog ( const QString & captionText, const QString & labelText, const QString & cancelButtonText, int totalSteps, QWidget * creator )
+ : QProgressDialog( labelText, cancelButtonText, totalSteps, creator, 0, false )
+{
+ setCaption( captionText );
+ setMinimumDuration( 1 );
+}
+#endif
diff --git a/src/kde-qt.h b/src/kde-qt.h
new file mode 100644
index 0000000..58ee4a1
--- /dev/null
+++ b/src/kde-qt.h
@@ -0,0 +1,148 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KDE_QT_H
+#define KDE_QT_H
+
+#include "config.h"
+
+#if defined (USE_KDE)
+
+ #define KQ_CLASSNAME(name) K##name
+ #define KQ_DECLARECLASS(name) class KQ##name : public K##name
+
+ #include <kapplication.h>
+ #include <kmainwindow.h>
+ #include <kstatusbar.h>
+ #include <kmenubar.h>
+ #include <kcmdlineargs.h>
+ #include <klocale.h>
+ #include <klistview.h>
+ #include <kfiledialog.h>
+ #include <khtml_part.h>
+ #include <ktabwidget.h>
+ #include <kpopupmenu.h>
+ #include <kmessagebox.h>
+ #include <kprogress.h>
+ #include <krun.h>
+
+#else /* !USE_KDE */
+
+ #define KQ_CLASSNAME(name) Q##name
+
+ #include <qapplication.h>
+ #include <qmainwindow.h>
+ #include <qstring.h>
+ #include <qstatusbar.h>
+ #include <qlistview.h>
+ #include <qfiledialog.h>
+ #include <qmenubar.h>
+ #include <qtabwidget.h>
+ #include <qmessagebox.h>
+ #include <qprogressdialog.h>
+
+ #define i18n(A) tr(A)
+
+#endif /* USE_KDE */
+
+/* common non-wrapped UI classes */
+#include <qsplitter.h>
+#include <qtoolbutton.h>
+#include <qheader.h>
+#include <qtextbrowser.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qcombobox.h>
+#include <qpushbutton.h>
+
+/* common utility classes */
+#include <qwhatsthis.h>
+#include <qstring.h>
+#include <qtextedit.h>
+#include <qfile.h>
+#include <qdir.h>
+#include <qregexp.h>
+#include <qtimer.h>
+#include <qmap.h>
+#include <qeventloop.h>
+
+class KQMainWindow : public KQ_CLASSNAME(MainWindow)
+{
+public:
+ KQMainWindow ( QWidget * parent, const char * name, WFlags f )
+ : KQ_CLASSNAME(MainWindow) (parent, name, f) {};
+};
+
+
+class KQListView : public KQ_CLASSNAME(ListView)
+{
+public:
+ KQListView(QWidget *parent = 0, const char *name = 0, int f = 0);
+};
+
+
+class KQProgressModalDialog : public KQ_CLASSNAME(ProgressDialog)
+{
+ public:
+ KQProgressModalDialog ( const QString & captionText, const QString & labelText, const QString & cancelButtonText, int totalSteps, QWidget * creator = 0 );
+
+ // Seems like people have fun making classes incompatible
+#if defined (USE_KDE)
+ void setTotalSteps( int totalSteps ) { progressBar ()->setTotalSteps( totalSteps ); }
+ void setProgress( int progress ) { progressBar ()->setProgress( progress ); }
+#else
+ bool wasCancelled() { return wasCanceled(); }
+#endif
+};
+
+class KQTabWidget : public KQ_CLASSNAME(TabWidget)
+{
+public:
+ KQTabWidget (QWidget *parent = 0, const char *name = 0, int f = 0)
+ : KQ_CLASSNAME(TabWidget) (parent, name, f) {};
+};
+
+class KQPopupMenu : public KQ_CLASSNAME(PopupMenu)
+{
+public:
+ KQPopupMenu (QWidget *parent = 0 )
+ : KQ_CLASSNAME(PopupMenu) (parent) {};
+};
+
+#include <qinputdialog.h>
+#include <qcheckbox.h>
+#include <qtextedit.h>
+#include <qradiobutton.h>
+#include <qspinbox.h>
+#include <qgroupbox.h>
+#include <qbuttongroup.h>
+#include <qtooltip.h>
+
+
+class KCHMShowWaitCursor
+{
+ public:
+ KCHMShowWaitCursor() { QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); }
+ ~KCHMShowWaitCursor() { QApplication::restoreOverrideCursor(); }
+};
+
+
+#endif /* KDE_QT_H */
diff --git a/src/kde/Makefile.am b/src/kde/Makefile.am
new file mode 100644
index 0000000..e095be6
--- /dev/null
+++ b/src/kde/Makefile.am
@@ -0,0 +1,8 @@
+lib_LIBRARIES=libkdeextra.a
+libkdeextra_a_SOURCES = kchmdcopiface.cpp kchmdcopiface.skel kchmviewwindow_khtmlpart.cpp
+noinst_HEADERS = kchmdcopiface.h kchmviewwindow_khtmlpart.h
+
+INCLUDES = $(QT_INCLUDES) $(CHM_INCLUDES) $(KDE_INCLUDES) $(LIBCHMFILE_INCLUDES)
+
+METASOURCES = AUTO
+KDE_OPTIONS = qtonly
diff --git a/src/kde/kchmdcopiface.cpp b/src/kde/kchmdcopiface.cpp
new file mode 100644
index 0000000..967380e
--- /dev/null
+++ b/src/kde/kchmdcopiface.cpp
@@ -0,0 +1,86 @@
+/***************************************************************************
+ * Copyright (C) 2004-2005 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "kchmdcopiface.h"
+#include "kchmdcopiface.moc"
+
+#include "kchmmainwindow.h"
+#include "kchmsearchwindow.h"
+
+
+KCHMDCOPIface::KCHMDCOPIface(QObject *parent, const char *name)
+ : QObject(parent, name), DCOPObject( "KCHMDCOPIface" )
+{
+}
+
+
+KCHMDCOPIface::~KCHMDCOPIface()
+{
+}
+
+
+void KCHMDCOPIface::loadHelpFile( const QString & filename, const QString & page2open )
+{
+ QStringList args;
+
+ args.push_back( filename );
+ args.push_back( page2open );
+
+ qApp->postEvent( ::mainWindow, new KCHMUserEvent( "loadAndOpen", args ) );
+}
+
+
+void KCHMDCOPIface::openPage( const QString & page2open )
+{
+ QStringList args;
+
+ args.push_back( page2open );
+ qApp->postEvent( ::mainWindow, new KCHMUserEvent( "openPage", args ) );
+}
+
+
+void KCHMDCOPIface::guiFindInIndex( const QString & word )
+{
+ QStringList args;
+
+ args.push_back( word );
+ qApp->postEvent( ::mainWindow, new KCHMUserEvent( "findInIndex", args ) );
+}
+
+
+void KCHMDCOPIface::guiSearchQuery( const QString & query )
+{
+ QStringList args;
+
+ args.push_back( query );
+ qApp->postEvent( ::mainWindow, new KCHMUserEvent( "searchQuery", args ) );
+}
+
+QStringList KCHMDCOPIface::searchQuery( const QString & query )
+{
+ QStringList results;
+
+ if ( ::mainWindow->searchWindow()->searchQuery( query, &results ) )
+ return results;
+ else
+ return QStringList();
+}
+
diff --git a/src/kde/kchmdcopiface.h b/src/kde/kchmdcopiface.h
new file mode 100644
index 0000000..c062fc8
--- /dev/null
+++ b/src/kde/kchmdcopiface.h
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * Copyright (C) 2004-2005 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMDCOPIFACE_H
+#define KCHMDCOPIFACE_H
+
+#include <qobject.h>
+#include <dcopobject.h>
+#include <qstring.h>
+#include <qstringlist.h>
+
+class KCHMDCOPIface : public QObject, public DCOPObject
+{
+ Q_OBJECT
+ K_DCOP
+
+ public:
+ KCHMDCOPIface( QObject *parent = 0, const char *name = 0 );
+ ~KCHMDCOPIface();
+
+ k_dcop:
+ //! Loads a CHM file \a filename , and opens the URL \a url. Use URL "/" to open default homepage
+ void loadHelpFile( const QString& filename, const QString& url );
+
+ //! Opens a specific \a url inside the loaded CHM file
+ void openPage( const QString& url );
+
+ //! Tries to find word in index, opening the index window and scrolling it there
+ void guiFindInIndex( const QString& word );
+
+ //! Executes a search in GUI. \a query contains the complete search query.
+ void guiSearchQuery( const QString& query );
+
+ //! Executes a search; GUI is not involved and user sees nothing.
+ //! \a query contains the complete search query.
+ //! Returns a list of URLs, or empty array if nothing os
+ QStringList searchQuery( const QString& query );
+};
+
+#endif
diff --git a/src/kde/kchmdcopiface_skel.cpp b/src/kde/kchmdcopiface_skel.cpp
new file mode 100644
index 0000000..130a60f
--- /dev/null
+++ b/src/kde/kchmdcopiface_skel.cpp
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** DCOP Skeleton generated by dcopidl2cpp from kchmdcopiface.kidl
+**
+** WARNING! All changes made in this file will be lost!
+**
+*****************************************************************************/
+
+#include "./kchmdcopiface.h"
+
+#include <kdatastream.h>
+
+
+static const char* const KCHMDCOPIface_ftable[6][3] = {
+ { "void", "loadHelpFile(QString,QString)", "loadHelpFile(QString filename,QString url)" },
+ { "void", "openPage(QString)", "openPage(QString url)" },
+ { "void", "guiFindInIndex(QString)", "guiFindInIndex(QString word)" },
+ { "void", "guiSearchQuery(QString)", "guiSearchQuery(QString query)" },
+ { "QStringList", "searchQuery(QString)", "searchQuery(QString query)" },
+ { 0, 0, 0 }
+};
+static const int KCHMDCOPIface_ftable_hiddens[5] = {
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+};
+
+bool KCHMDCOPIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
+{
+ if ( fun == KCHMDCOPIface_ftable[0][1] ) { // void loadHelpFile(QString,QString)
+ QString arg0;
+ QString arg1;
+ QDataStream arg( data, IO_ReadOnly );
+ if (arg.atEnd()) return false;
+ arg >> arg0;
+ if (arg.atEnd()) return false;
+ arg >> arg1;
+ replyType = KCHMDCOPIface_ftable[0][0];
+ loadHelpFile(arg0, arg1 );
+ } else if ( fun == KCHMDCOPIface_ftable[1][1] ) { // void openPage(QString)
+ QString arg0;
+ QDataStream arg( data, IO_ReadOnly );
+ if (arg.atEnd()) return false;
+ arg >> arg0;
+ replyType = KCHMDCOPIface_ftable[1][0];
+ openPage(arg0 );
+ } else if ( fun == KCHMDCOPIface_ftable[2][1] ) { // void guiFindInIndex(QString)
+ QString arg0;
+ QDataStream arg( data, IO_ReadOnly );
+ if (arg.atEnd()) return false;
+ arg >> arg0;
+ replyType = KCHMDCOPIface_ftable[2][0];
+ guiFindInIndex(arg0 );
+ } else if ( fun == KCHMDCOPIface_ftable[3][1] ) { // void guiSearchQuery(QString)
+ QString arg0;
+ QDataStream arg( data, IO_ReadOnly );
+ if (arg.atEnd()) return false;
+ arg >> arg0;
+ replyType = KCHMDCOPIface_ftable[3][0];
+ guiSearchQuery(arg0 );
+ } else if ( fun == KCHMDCOPIface_ftable[4][1] ) { // QStringList searchQuery(QString)
+ QString arg0;
+ QDataStream arg( data, IO_ReadOnly );
+ if (arg.atEnd()) return false;
+ arg >> arg0;
+ replyType = KCHMDCOPIface_ftable[4][0];
+ QDataStream _replyStream( replyData, IO_WriteOnly );
+ _replyStream << searchQuery(arg0 );
+ } else {
+ return DCOPObject::process( fun, data, replyType, replyData );
+ }
+ return true;
+}
+
+QCStringList KCHMDCOPIface::interfaces()
+{
+ QCStringList ifaces = DCOPObject::interfaces();
+ ifaces += "KCHMDCOPIface";
+ return ifaces;
+}
+
+QCStringList KCHMDCOPIface::functions()
+{
+ QCStringList funcs = DCOPObject::functions();
+ for ( int i = 0; KCHMDCOPIface_ftable[i][2]; i++ ) {
+ if (KCHMDCOPIface_ftable_hiddens[i])
+ continue;
+ QCString func = KCHMDCOPIface_ftable[i][0];
+ func += ' ';
+ func += KCHMDCOPIface_ftable[i][2];
+ funcs << func;
+ }
+ return funcs;
+}
+
+
diff --git a/src/kde/kchmviewwindow_khtmlpart.cpp b/src/kde/kchmviewwindow_khtmlpart.cpp
new file mode 100644
index 0000000..e68e53d
--- /dev/null
+++ b/src/kde/kchmviewwindow_khtmlpart.cpp
@@ -0,0 +1,163 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <qclipboard.h>
+
+#include <khtmlview.h>
+#include <kfinddialog.h>
+
+#include "kde-qt.h"
+#include "kchmmainwindow.h"
+#include "kchmconfig.h"
+#include "kchmviewwindow_khtmlpart.h"
+
+#include "kchmviewwindow_khtmlpart.moc"
+
+
+QWidget * KCHMViewWindow_KHTMLPart::getQWidget()
+{
+ return view();
+}
+
+KCHMViewWindow_KHTMLPart::KCHMViewWindow_KHTMLPart( QTabWidget * parent )
+ : KHTMLPart ( parent ), KCHMViewWindow ( parent )
+{
+ m_zoomfactor = 0;
+ m_currentEncoding = 0;
+ m_searchForward = true;
+
+ invalidate();
+
+ connect( browserExtension(), SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
+ this, SLOT ( onOpenURLRequest( const KURL &, const KParts::URLArgs & )) );
+
+ connect( this, SIGNAL ( popupMenu ( const QString &, const QPoint &) ),
+ this, SLOT ( onPopupMenu ( const QString &, const QPoint &) ) );
+}
+
+
+KCHMViewWindow_KHTMLPart::~KCHMViewWindow_KHTMLPart()
+{
+}
+
+bool KCHMViewWindow_KHTMLPart::openPage (const QString& url)
+{
+ // Set or change the encoding
+ if ( m_currentEncoding != ::mainWindow->chmFile()->currentEncoding() )
+ {
+ m_currentEncoding = ::mainWindow->chmFile()->currentEncoding();
+ setEncoding ( m_currentEncoding->qtcodec, TRUE );
+ }
+
+ QString fullurl = "ms-its:" + ::mainWindow->getOpenedFileName() + "::" + url;
+ openURL ( KURL(fullurl) );
+
+ return true;
+}
+
+void KCHMViewWindow_KHTMLPart::setZoomFactor( int zoom )
+{
+ m_zoomfactor = zoom;
+
+ // Default ZoomFactor is 100, any increase or decrease should modify this value.
+ KHTMLPart::setZoomFactor ( 100 + (m_zoomfactor * 10) );
+}
+
+void KCHMViewWindow_KHTMLPart::invalidate( )
+{
+ m_zoomfactor = 0;
+ m_searchForward = true;
+ m_searchText = QString::null;
+
+ setJScriptEnabled ( appConfig.m_kdeEnableJS );
+ setJavaEnabled ( appConfig.m_kdeEnableJava );
+ setMetaRefreshEnabled ( appConfig.m_kdeEnableRefresh );
+ setPluginsEnabled ( appConfig.m_kdeEnablePlugins );
+
+ KCHMViewWindow::invalidate( );
+}
+
+int KCHMViewWindow_KHTMLPart::getScrollbarPosition( )
+{
+ return view()->contentsY ();
+}
+
+void KCHMViewWindow_KHTMLPart::setScrollbarPosition( int pos )
+{
+ view()->scrollBy (0, pos);
+}
+
+void KCHMViewWindow_KHTMLPart::addZoomFactor( int value )
+{
+ setZoomFactor( m_zoomfactor + value);
+}
+
+bool KCHMViewWindow_KHTMLPart::printCurrentPage()
+{
+ view()->print();
+ return true;
+}
+
+void KCHMViewWindow_KHTMLPart::searchWord( const QString & word, bool forward, bool )
+{
+ if ( word != m_searchText || forward != m_searchForward )
+ {
+ m_searchText = word;
+ m_searchForward = forward;
+
+ findText ( word, forward ? 0 : KFindDialog::FindBackwards, ::mainWindow, 0 );
+ }
+
+ findTextNext ();
+}
+
+void KCHMViewWindow_KHTMLPart::onOpenURLRequest( const KURL & url, const KParts::URLArgs & )
+{
+ bool sourcechange = true;
+ emit signalLinkClicked ( url.prettyURL(), sourcechange );
+}
+
+void KCHMViewWindow_KHTMLPart::slotLinkClicked( const QString & newlink )
+{
+ bool notused;
+ emit signalLinkClicked (newlink, notused);
+}
+
+
+void KCHMViewWindow_KHTMLPart::clipSelectAll()
+{
+ selectAll ();
+}
+
+void KCHMViewWindow_KHTMLPart::clipCopy()
+{
+ QString text = selectedText();
+
+ if ( !text.isEmpty() )
+ QApplication::clipboard()->setText( text );
+}
+
+void KCHMViewWindow_KHTMLPart::onPopupMenu ( const QString &url, const QPoint & point )
+{
+ KQPopupMenu * menu = getContextMenu( url, view() );
+ menu->exec( point );
+}
+
diff --git a/src/kde/kchmviewwindow_khtmlpart.h b/src/kde/kchmviewwindow_khtmlpart.h
new file mode 100644
index 0000000..5799f62
--- /dev/null
+++ b/src/kde/kchmviewwindow_khtmlpart.h
@@ -0,0 +1,114 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KCHMVIEWWINDOW_KHTMLPART_H
+#define KCHMVIEWWINDOW_KHTMLPART_H
+
+#include "kde-qt.h"
+
+#include "kchmviewwindow.h"
+#include "kchmsourcefactory.h"
+#include "libchmtextencoding.h"
+
+
+/**
+@author Georgy Yunaev
+*/
+/*
+ * For Qt-only version, we cannot compile KCHMViewWindow_KHTMLPart. However,
+ * we cannot just exclude it, because it would not generate a MOC file for a KDE
+ * version. Therefore we declare it, and compile the .moc file, but do not provide
+ * the class methods.
+ */
+#if defined (USE_KDE)
+class KCHMViewWindow_KHTMLPart : public KHTMLPart, public KCHMViewWindow
+{
+Q_OBJECT
+public:
+ KCHMViewWindow_KHTMLPart( QTabWidget * parent );
+ ~KCHMViewWindow_KHTMLPart();
+
+ //! Open a page from current chm archive
+ virtual bool openPage (const QString& url);
+
+ //! Invalidate current view, doing all the cleanups etc.
+ virtual void invalidate();
+
+ //! Return current ZoomFactor.
+ virtual int getZoomFactor() const { return m_zoomfactor; }
+
+ //! Sets ZoomFactor. The value returned by getZoomFactor(), given to this function, should give the same result.
+ virtual void setZoomFactor (int zoom);
+
+ //! Relatively changes ZoomFactor. Most common values are -1 and 1.
+ virtual void addZoomFactor (int value);
+
+ //! Popups the print dialog, and prints the current page on the printer.
+ virtual bool printCurrentPage();
+
+ //! Initiates the find-in-page search, if succeed, cursor moved to the first entry
+ virtual void searchWord( const QString & word, bool forward = true, bool casesensitive = false );
+
+ //! Select the content of the whole page
+ virtual void clipSelectAll();
+
+ //! Copies the selected content to the clipboard
+ virtual void clipCopy();
+
+ /*!
+ * Return current scrollbar position in view window. Saved on program exit.
+ * There is no restriction on returned value, except that giving this value to
+ * setScrollbarPosition() should move the scrollbar in the same position.
+ */
+ virtual int getScrollbarPosition();
+
+ //! Sets the scrollbar position.
+ virtual void setScrollbarPosition(int pos);
+
+ virtual QObject * getQObject() { return this; }
+ virtual QWidget * getQWidget();
+
+signals:
+ /*!
+ * Emitted when the user clicked on the link, before the page changed.
+ * If signalLinkClicked() sets follow_link to false, the current page should NOT change.
+ * Otherwise it should be changed to the new link value.
+ */
+ void signalLinkClicked ( const QString & newlink, bool& follow_link );
+
+private slots:
+ virtual void slotLinkClicked ( const QString & newlink);
+ virtual void onOpenURLRequest( const KURL &, const KParts::URLArgs & );
+ virtual void onPopupMenu ( const QString & url, const QPoint & point );
+
+private:
+ void setSource ( const QString & name );
+
+ int m_zoomfactor;
+ bool m_searchForward;
+ QString m_searchText;
+
+ const LCHMTextEncoding * m_currentEncoding;
+};
+
+#endif /* USE_KDE */
+
+#endif /* KCHMVIEWWINDOW_KHTMLPART_H */
diff --git a/src/kqrunprocess.h b/src/kqrunprocess.h
new file mode 100644
index 0000000..4ac1b9a
--- /dev/null
+++ b/src/kqrunprocess.h
@@ -0,0 +1,52 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <stdlib.h>
+#include <unistd.h>
+
+static bool run_process( const QString& command, const QString& filename )
+{
+ QString safefilename = filename;
+ QString preparedcommand = command;
+
+ // To be safe, URL should contain no quotes, apostrofes and \0 symbols
+ safefilename.remove (QRegExp ("['\"\0]"));
+ preparedcommand.replace( "%s", safefilename );
+
+ // And run an external command with fork()s
+ switch ( fork() )
+ {
+ case -1:
+ return false;
+
+ case 0: // child
+ if ( fork() != 0 )
+ exit(0); // exit immediately - our child is now has init as his parent
+
+ system( preparedcommand.ascii() );
+ exit (0);
+
+ default: // parent
+ break;
+ }
+
+ return true;
+}
diff --git a/src/kqtempfile.cpp b/src/kqtempfile.cpp
new file mode 100644
index 0000000..46018c4
--- /dev/null
+++ b/src/kqtempfile.cpp
@@ -0,0 +1,72 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <time.h>
+#include <stdio.h>
+
+#include "kqtempfile.h"
+
+
+KQTempFileKeeper::KQTempFileKeeper( )
+{
+#if defined(WIN32)
+ m_tempDir = ::GetTempDirectory();
+#else
+ if ( getenv("TEMP") )
+ m_tempDir = getenv("TEMP");
+ else if ( getenv("TMP") )
+ m_tempDir = getenv("TMP");
+ else
+ m_tempDir = "/tmp";
+#endif
+
+ m_fileNumber = 1;
+}
+
+KQTempFileKeeper::~ KQTempFileKeeper( )
+{
+ destroyTempFiles();
+}
+
+bool KQTempFileKeeper::generateTempFile( QFile & file, const QString & tempdir )
+{
+ QString usetempdir = ((tempdir != QString::null) ? tempdir : m_tempDir) + "/";
+
+ while( 1 )
+ {
+ char fnbuf[128];
+ sprintf( fnbuf, "KQTEMPFILE%d-%d-%d.tmp", (int) getpid(), (int) time(0), m_fileNumber++ );
+
+ file.setName( usetempdir + fnbuf );
+ if ( file.open( IO_WriteOnly ) )
+ break;
+ }
+
+ return true;
+}
+
+void KQTempFileKeeper::destroyTempFiles( )
+{
+ for ( unsigned int i = 0; i < m_tempFiles.size(); i++ )
+ QFile::remove( m_tempFiles[i] );
+}
diff --git a/src/kqtempfile.h b/src/kqtempfile.h
new file mode 100644
index 0000000..6440067
--- /dev/null
+++ b/src/kqtempfile.h
@@ -0,0 +1,53 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef KQTEMPFILE_H
+#define KQTEMPFILE_H
+
+#include <qvaluevector.h>
+#include <qfile.h>
+
+/*
+ * This class generates temp file names in race condition-safe way,
+ * returns QFile and filename pairs, keeps the track of opened temp files,
+ * and deletes them when program exist.
+ */
+
+class KQTempFileKeeper
+{
+ public:
+ KQTempFileKeeper();
+ ~KQTempFileKeeper();
+
+ //! Generates a temporary file name, and creates it on disk at the same time.
+ //! Returns the file. If tempdir is not empty, it is used as temp directory.
+ bool generateTempFile( QFile& file, const QString& tempdir = QString::null );
+
+ //! Closes and removes all the files from disk
+ void destroyTempFiles();
+
+ private:
+ QValueVector<QString> m_tempFiles;
+ QString m_tempDir;
+ unsigned int m_fileNumber;
+};
+
+#endif /* KQTEMPFILE_H */
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..f79bbca
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,96 @@
+/***************************************************************************
+ * Copyright (C) 2004-2007 by Georgy Yunaev, gyunaev@ulduzsoft.com *
+ * Please do not use email address above for bug reports; see *
+ * the README file *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "kde-qt.h"
+
+#include "kchmmainwindow.h"
+#include "kchmconfig.h"
+#include "kchmkeyeventfilter.h"
+
+#if defined (USE_KDE)
+ #include <kaboutdata.h>
+ #include <dcopclient.h>
+
+ #include "kde/kchmdcopiface.h"
+#endif
+
+KCHMMainWindow * mainWindow;
+
+
+int main( int argc, char ** argv )
+{
+#if defined (USE_KDE)
+ static KCmdLineOptions options[] =
+ {
+ { "autotestmode", "Perform auto testing", 0 },
+ { "shortautotestmode", "Perform short auto testing", 0 },
+ { "+[chmfile]", "A CHM file to show", 0 },
+ { "search <query>", I18N_NOOP("'--search <query>' specifies the search query to search, and activate the first entry if found"), 0 },
+ { "sindex <word>", I18N_NOOP("'--sindex <word>' specifies the word to find in index, and activate if found"), 0 },
+ KCmdLineLastOption
+ };
+
+ KAboutData aboutdata ( "kchmviewer",
+ APP_NAME,
+ APP_VERSION,
+ I18N_NOOP("CHM file viewer"),
+ KAboutData::License_GPL,
+ "(c) 2004-2007 George Yunaev, gyunaev@ulduzsoft.com",
+ 0,
+ "http://www.kchmviewer.net",
+ "gyunaev@ulduzsoft.com");
+
+ KLocale::setMainCatalogue( "kchmviewer" );
+ KCmdLineArgs::init (argc, argv, &aboutdata);
+ KCmdLineArgs::addCmdLineOptions( options );
+
+ KApplication app;
+#else
+ QApplication app( argc, argv );
+#endif
+
+ appConfig.load();
+ app.installEventFilter( &gKeyEventFilter );
+
+#if defined(USE_KDE)
+ // DCOP stuff
+ KCHMDCOPIface iface;
+
+ DCOPClient *client = kapp->dcopClient();
+
+ if ( !client->attach() )
+ qWarning("DCOP attach failed");
+
+ //QCString realAppId = client->registerAs( kapp->name() );
+ QCString realAppId = client->registerAs( "kchmviewer" );
+#endif
+
+ mainWindow = new KCHMMainWindow();
+ mainWindow->show();
+
+#if !defined(USE_KDE)
+ app.connect( &app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()) );
+#else
+ app.setMainWidget( mainWindow );
+#endif
+
+ return app.exec();
+}
diff --git a/src/pics/Makefile.am b/src/pics/Makefile.am
new file mode 100644
index 0000000..d085bb3
--- /dev/null
+++ b/src/pics/Makefile.am
@@ -0,0 +1,2 @@
+# Install the icons into the global KDE directories
+KDE_ICON = AUTO
diff --git a/src/pics/cr128-app-kchmviewer.png b/src/pics/cr128-app-kchmviewer.png
new file mode 100644
index 0000000..6635d97
--- /dev/null
+++ b/src/pics/cr128-app-kchmviewer.png
Binary files differ
diff --git a/src/pics/cr48-app-kchmviewer.png b/src/pics/cr48-app-kchmviewer.png
new file mode 100644
index 0000000..5a42d77
--- /dev/null
+++ b/src/pics/cr48-app-kchmviewer.png
Binary files differ
diff --git a/src/pics/cr64-app-kchmviewer.png b/src/pics/cr64-app-kchmviewer.png
new file mode 100644
index 0000000..970dbf2
--- /dev/null
+++ b/src/pics/cr64-app-kchmviewer.png
Binary files differ
diff --git a/stamp-h.in b/stamp-h.in
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/stamp-h.in
diff --git a/subdirs b/subdirs
new file mode 100644
index 0000000..2841462
--- /dev/null
+++ b/subdirs
@@ -0,0 +1,4 @@
+kchmviewer-3.1
+lib
+po
+src